mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
chore: create extended root store (#4796)
* chore: create extended root store * chore: rename core root store
This commit is contained in:
parent
d81a476e0b
commit
703aac597c
8
web/ce/store/root.store.ts
Normal file
8
web/ce/store/root.store.ts
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
// store
|
||||||
|
import { CoreRootStore } from "@/store/root.store";
|
||||||
|
|
||||||
|
export class RootStore extends CoreRootStore {
|
||||||
|
constructor() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
}
|
@ -1,8 +1,8 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { ReactElement, createContext } from "react";
|
import { ReactElement, createContext } from "react";
|
||||||
// mobx store
|
// plane web store
|
||||||
import { RootStore } from "@/store/root.store";
|
import { RootStore } from "@/plane-web/store/root.store";
|
||||||
|
|
||||||
export let rootStore = new RootStore();
|
export let rootStore = new RootStore();
|
||||||
|
|
||||||
|
@ -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 { RootStore } from "@/store/root.store";
|
|
||||||
|
|
||||||
export interface ICycleStore {
|
export interface ICycleStore {
|
||||||
// loaders
|
// loaders
|
||||||
|
@ -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";
|
||||||
// store
|
// plane web store
|
||||||
import { RootStore } from "@/store/root.store";
|
import { RootStore } from "@/plane-web/store/root.store";
|
||||||
|
|
||||||
export interface ICycleFilterStore {
|
export interface ICycleFilterStore {
|
||||||
// observables
|
// observables
|
||||||
|
@ -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";
|
||||||
// stores
|
|
||||||
import { RootStore } from "@/store/root.store";
|
|
||||||
|
|
||||||
export interface IDashboardStore {
|
export interface IDashboardStore {
|
||||||
// error states
|
// error states
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
import set from "lodash/set";
|
import set from "lodash/set";
|
||||||
import { action, computed, makeObservable, observable, runInAction } from "mobx";
|
import { action, computed, makeObservable, observable, runInAction } from "mobx";
|
||||||
|
// types
|
||||||
import { IEstimate, IEstimatePoint as IEstimatePointType } from "@plane/types";
|
import { IEstimate, IEstimatePoint as IEstimatePointType } 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
|
|
||||||
import { RootStore } from "@/store/root.store";
|
|
||||||
|
|
||||||
type TErrorCodes = {
|
type TErrorCodes = {
|
||||||
status: string;
|
status: string;
|
||||||
|
@ -3,6 +3,7 @@ import set from "lodash/set";
|
|||||||
import unset from "lodash/unset";
|
import unset from "lodash/unset";
|
||||||
import { action, computed, makeObservable, observable, runInAction } from "mobx";
|
import { action, computed, makeObservable, observable, runInAction } from "mobx";
|
||||||
import { computedFn } from "mobx-utils";
|
import { computedFn } from "mobx-utils";
|
||||||
|
// types
|
||||||
import {
|
import {
|
||||||
IEstimate as IEstimateType,
|
IEstimate as IEstimateType,
|
||||||
IEstimatePoint as IEstimatePointType,
|
IEstimatePoint as IEstimatePointType,
|
||||||
@ -10,11 +11,12 @@ import {
|
|||||||
IEstimateFormData,
|
IEstimateFormData,
|
||||||
TEstimatePointsObject,
|
TEstimatePointsObject,
|
||||||
} from "@plane/types";
|
} 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 { IEstimatePoint, EstimatePoint } from "@/store/estimates/estimate-point";
|
import { IEstimatePoint, EstimatePoint } from "@/store/estimates/estimate-point";
|
||||||
import { RootStore } from "@/store/root.store";
|
|
||||||
|
|
||||||
type TErrorCodes = {
|
type TErrorCodes = {
|
||||||
status: string;
|
status: string;
|
||||||
|
@ -4,12 +4,14 @@ import unset from "lodash/unset";
|
|||||||
import update from "lodash/update";
|
import update from "lodash/update";
|
||||||
import { action, computed, makeObservable, observable, runInAction } from "mobx";
|
import { action, computed, makeObservable, observable, runInAction } from "mobx";
|
||||||
import { computedFn } from "mobx-utils";
|
import { computedFn } from "mobx-utils";
|
||||||
|
// 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 { RootStore } from "@/store/root.store";
|
|
||||||
|
|
||||||
type TEstimateLoader = "init-loader" | "mutation-loader" | undefined;
|
type TEstimateLoader = "init-loader" | "mutation-loader" | undefined;
|
||||||
type TErrorCodes = {
|
type TErrorCodes = {
|
||||||
|
@ -14,7 +14,8 @@ import {
|
|||||||
getWorkspaceEventPayload,
|
getWorkspaceEventPayload,
|
||||||
getPageEventPayload,
|
getPageEventPayload,
|
||||||
} from "@/constants/event-tracker";
|
} from "@/constants/event-tracker";
|
||||||
import { RootStore } from "./root.store";
|
// plane web store
|
||||||
|
import { RootStore } from "@/plane-web/store/root.store";
|
||||||
|
|
||||||
export interface IEventTrackerStore {
|
export interface IEventTrackerStore {
|
||||||
// properties
|
// properties
|
||||||
|
@ -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";
|
||||||
// types
|
|
||||||
import { RootStore } from "@/store/root.store";
|
|
||||||
|
|
||||||
export interface IGlobalViewStore {
|
export interface IGlobalViewStore {
|
||||||
// observables
|
// observables
|
||||||
|
@ -4,11 +4,11 @@ import { makeObservable, observable, runInAction, action } from "mobx";
|
|||||||
import { TIssue, TInboxIssue, TInboxIssueStatus, TInboxDuplicateIssueDetails } from "@plane/types";
|
import { TIssue, TInboxIssue, TInboxIssueStatus, TInboxDuplicateIssueDetails } from "@plane/types";
|
||||||
// helpers
|
// helpers
|
||||||
import { EInboxIssueStatus } from "@/helpers/inbox.helper";
|
import { EInboxIssueStatus } 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";
|
||||||
import { IssueService } from "@/services/issue";
|
import { IssueService } from "@/services/issue";
|
||||||
// root store
|
|
||||||
import { RootStore } from "@/store/root.store";
|
|
||||||
|
|
||||||
export interface IInboxIssueStore {
|
export interface IInboxIssueStore {
|
||||||
isLoading: boolean;
|
isLoading: boolean;
|
||||||
@ -44,7 +44,12 @@ export class InboxIssueStore implements IInboxIssueStore {
|
|||||||
inboxIssueService;
|
inboxIssueService;
|
||||||
issueService;
|
issueService;
|
||||||
|
|
||||||
constructor(workspaceSlug: string, projectId: string, data: TInboxIssue, private store: RootStore) {
|
constructor(
|
||||||
|
workspaceSlug: string,
|
||||||
|
projectId: string,
|
||||||
|
data: TInboxIssue,
|
||||||
|
private store: RootStore
|
||||||
|
) {
|
||||||
this.id = data.id;
|
this.id = data.id;
|
||||||
this.status = data.status;
|
this.status = data.status;
|
||||||
this.issue = data?.issue;
|
this.issue = data?.issue;
|
||||||
|
@ -15,11 +15,12 @@ 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 { RootStore } from "@/store/root.store";
|
|
||||||
|
|
||||||
type TLoader =
|
type TLoader =
|
||||||
| "init-loading"
|
| "init-loading"
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
import { action, computed, makeObservable, observable } from "mobx";
|
import { action, computed, makeObservable, observable } from "mobx";
|
||||||
import { computedFn } from "mobx-utils";
|
import { computedFn } from "mobx-utils";
|
||||||
import { IssueRootStore } from "./root.store";
|
|
||||||
import { TIssueGroupByOptions } from "@plane/types";
|
|
||||||
import { DRAG_ALLOWED_GROUPS } from "@/constants/issue";
|
|
||||||
// types
|
// types
|
||||||
|
import { TIssueGroupByOptions } from "@plane/types";
|
||||||
|
// constants
|
||||||
|
import { DRAG_ALLOWED_GROUPS } from "@/constants/issue";
|
||||||
|
// store
|
||||||
|
import { IssueRootStore } from "./root.store";
|
||||||
|
|
||||||
export interface IIssueKanBanViewStore {
|
export interface IIssueKanBanViewStore {
|
||||||
kanBanToggle: {
|
kanBanToggle: {
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
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 { RootStore } 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";
|
||||||
|
@ -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 { RootStore } from "@/store/root.store";
|
|
||||||
|
|
||||||
export interface ILabelStore {
|
export interface ILabelStore {
|
||||||
//Loaders
|
//Loaders
|
||||||
|
@ -1,7 +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";
|
||||||
import { RootStore } from "@/store/root.store";
|
// plane web store
|
||||||
|
import { RootStore } from "@/plane-web/store/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";
|
||||||
|
|
||||||
|
@ -6,10 +6,11 @@ import { computedFn } from "mobx-utils";
|
|||||||
import { IProjectBulkAddFormData, IProjectMember, IProjectMembership, IUserLite } from "@plane/types";
|
import { IProjectBulkAddFormData, IProjectMember, IProjectMembership, IUserLite } from "@plane/types";
|
||||||
// constants
|
// constants
|
||||||
import { EUserProjectRoles } from "@/constants/project";
|
import { EUserProjectRoles } from "@/constants/project";
|
||||||
|
// plane web store
|
||||||
|
import { RootStore } from "@/plane-web/store/root.store";
|
||||||
// services
|
// services
|
||||||
import { ProjectMemberService } from "@/services/project";
|
import { ProjectMemberService } from "@/services/project";
|
||||||
// store
|
// store
|
||||||
import { RootStore } from "@/store/root.store";
|
|
||||||
import { IRouterStore } from "@/store/router.store";
|
import { IRouterStore } from "@/store/router.store";
|
||||||
import { IUserStore } from "@/store/user";
|
import { IUserStore } from "@/store/user";
|
||||||
import { IMemberRootStore } from ".";
|
import { IMemberRootStore } from ".";
|
||||||
|
@ -6,10 +6,11 @@ import { computedFn } from "mobx-utils";
|
|||||||
import { IWorkspaceBulkInviteFormData, IWorkspaceMember, IWorkspaceMemberInvitation } from "@plane/types";
|
import { IWorkspaceBulkInviteFormData, IWorkspaceMember, IWorkspaceMemberInvitation } from "@plane/types";
|
||||||
// constants
|
// constants
|
||||||
import { EUserWorkspaceRoles } from "@/constants/workspace";
|
import { EUserWorkspaceRoles } from "@/constants/workspace";
|
||||||
|
// 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";
|
||||||
// types
|
// types
|
||||||
import { RootStore } from "@/store/root.store";
|
|
||||||
import { IRouterStore } from "@/store/router.store";
|
import { IRouterStore } from "@/store/router.store";
|
||||||
import { IUserStore } from "@/store/user";
|
import { IUserStore } from "@/store/user";
|
||||||
import { IMemberRootStore } from ".";
|
import { IMemberRootStore } from ".";
|
||||||
|
@ -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 { RootStore } from "@/store/root.store";
|
|
||||||
|
|
||||||
export interface IModuleStore {
|
export interface IModuleStore {
|
||||||
//Loaders
|
//Loaders
|
||||||
|
@ -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";
|
||||||
// store
|
// plane web store
|
||||||
import { RootStore } from "@/store/root.store";
|
import { RootStore } from "@/plane-web/store/root.store";
|
||||||
|
|
||||||
export interface IModuleFilterStore {
|
export interface IModuleFilterStore {
|
||||||
// observables
|
// observables
|
||||||
|
@ -5,9 +5,10 @@ import { TLogoProps, TPage } from "@plane/types";
|
|||||||
// constants
|
// constants
|
||||||
import { EPageAccess } from "@/constants/page";
|
import { EPageAccess } from "@/constants/page";
|
||||||
import { EUserProjectRoles } from "@/constants/project";
|
import { EUserProjectRoles } from "@/constants/project";
|
||||||
|
// plane web store
|
||||||
|
import { RootStore } from "@/plane-web/store/root.store";
|
||||||
// services
|
// services
|
||||||
import { ProjectPageService } from "@/services/page";
|
import { ProjectPageService } from "@/services/page";
|
||||||
import { RootStore } from "../root.store";
|
|
||||||
|
|
||||||
export type TLoader = "submitting" | "submitted" | "saved";
|
export type TLoader = "submitting" | "submitted" | "saved";
|
||||||
|
|
||||||
|
@ -6,11 +6,12 @@ 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 { IPageStore, PageStore } from "@/store/pages/page.store";
|
import { IPageStore, PageStore } from "@/store/pages/page.store";
|
||||||
import { RootStore } from "../root.store";
|
|
||||||
|
|
||||||
type TLoader = "init-loader" | "mutation-loader" | undefined;
|
type TLoader = "init-loader" | "mutation-loader" | undefined;
|
||||||
|
|
||||||
|
@ -3,9 +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";
|
||||||
import { RootStore } from "@/store/root.store";
|
|
||||||
|
|
||||||
export interface IProjectViewStore {
|
export interface IProjectViewStore {
|
||||||
//Loaders
|
//Loaders
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import { RootStore } from "@/store/root.store";
|
// plane web 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";
|
||||||
|
@ -6,11 +6,11 @@ import { computedFn } from "mobx-utils";
|
|||||||
import { IProject } from "@plane/types";
|
import { IProject } from "@plane/types";
|
||||||
// helpers
|
// helpers
|
||||||
import { orderProjects, shouldFilterProject } from "@/helpers/project.helper";
|
import { orderProjects, shouldFilterProject } from "@/helpers/project.helper";
|
||||||
|
// plane web store
|
||||||
|
import { RootStore } from "@/plane-web/store/root.store";
|
||||||
// services
|
// services
|
||||||
import { IssueLabelService, IssueService } from "@/services/issue";
|
import { IssueLabelService, IssueService } from "@/services/issue";
|
||||||
import { ProjectService, ProjectStateService, ProjectArchiveService } from "@/services/project";
|
import { ProjectService, ProjectStateService, ProjectArchiveService } from "@/services/project";
|
||||||
// store
|
|
||||||
import { RootStore } from "../root.store";
|
|
||||||
|
|
||||||
export interface IProjectStore {
|
export interface IProjectStore {
|
||||||
// observables
|
// observables
|
||||||
|
@ -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 { TProjectDisplayFilters, TProjectFilters, TProjectAppliedDisplayFilterKeys } from "@plane/types";
|
import { TProjectDisplayFilters, TProjectFilters, TProjectAppliedDisplayFilterKeys } from "@plane/types";
|
||||||
// store
|
// plane web store
|
||||||
import { RootStore } from "@/store/root.store";
|
import { RootStore } from "@/plane-web/store/root.store";
|
||||||
|
|
||||||
export interface IProjectFilterStore {
|
export interface IProjectFilterStore {
|
||||||
// observables
|
// observables
|
||||||
|
@ -26,7 +26,7 @@ import { IWorkspaceRootStore, WorkspaceRootStore } from "./workspace";
|
|||||||
|
|
||||||
enableStaticRendering(typeof window === "undefined");
|
enableStaticRendering(typeof window === "undefined");
|
||||||
|
|
||||||
export class RootStore {
|
export class CoreRootStore {
|
||||||
workspaceRoot: IWorkspaceRootStore;
|
workspaceRoot: IWorkspaceRootStore;
|
||||||
projectRoot: IProjectRootStore;
|
projectRoot: IProjectRootStore;
|
||||||
memberRoot: IMemberRootStore;
|
memberRoot: IMemberRootStore;
|
||||||
|
@ -2,14 +2,14 @@ import groupBy from "lodash/groupBy";
|
|||||||
import set from "lodash/set";
|
import set from "lodash/set";
|
||||||
import { makeObservable, observable, computed, action, runInAction } from "mobx";
|
import { makeObservable, observable, computed, action, runInAction } from "mobx";
|
||||||
import { computedFn } from "mobx-utils";
|
import { computedFn } from "mobx-utils";
|
||||||
import { IState } from "@plane/types";
|
|
||||||
// store
|
|
||||||
import { sortStates } from "@/helpers/state.helper";
|
|
||||||
import { ProjectStateService } from "@/services/project";
|
|
||||||
import { RootStore } from "./root.store";
|
|
||||||
// types
|
// types
|
||||||
// services
|
import { IState } from "@plane/types";
|
||||||
// helpers
|
// helpers
|
||||||
|
import { sortStates } from "@/helpers/state.helper";
|
||||||
|
// plane web store
|
||||||
|
import { RootStore } from "@/plane-web/store/root.store";
|
||||||
|
// services
|
||||||
|
import { ProjectStateService } from "@/services/project";
|
||||||
|
|
||||||
export interface IStateStore {
|
export interface IStateStore {
|
||||||
//Loaders
|
//Loaders
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { action, observable, makeObservable } from "mobx";
|
import { action, observable, makeObservable } from "mobx";
|
||||||
// store types
|
// plane web store
|
||||||
import { RootStore } from "@/store/root.store";
|
import { RootStore } from "@/plane-web/store/root.store";
|
||||||
|
|
||||||
export interface IThemeStore {
|
export interface IThemeStore {
|
||||||
// observables
|
// observables
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
import set from "lodash/set";
|
import set from "lodash/set";
|
||||||
import { makeObservable, observable } from "mobx";
|
import { makeObservable, observable } from "mobx";
|
||||||
|
// types
|
||||||
import { IUserAccount } from "@plane/types";
|
import { IUserAccount } from "@plane/types";
|
||||||
|
// plane web store
|
||||||
|
import { RootStore } from "@/plane-web/store/root.store";
|
||||||
// services
|
// services
|
||||||
import { UserService } from "@/services/user.service";
|
import { UserService } from "@/services/user.service";
|
||||||
// stores
|
|
||||||
import { RootStore } from "@/store/root.store";
|
|
||||||
|
|
||||||
export interface IAccountStore {
|
export interface IAccountStore {
|
||||||
// observables
|
// observables
|
||||||
|
@ -5,11 +5,12 @@ 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 { RootStore } 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";
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
import cloneDeep from "lodash/cloneDeep";
|
import cloneDeep from "lodash/cloneDeep";
|
||||||
import set from "lodash/set";
|
import set from "lodash/set";
|
||||||
import { action, makeObservable, observable, runInAction } from "mobx";
|
import { action, makeObservable, observable, runInAction } from "mobx";
|
||||||
// services
|
|
||||||
import { UserService } from "@/services/user.service";
|
|
||||||
// types
|
// types
|
||||||
import { IUserTheme, TUserProfile } from "@plane/types";
|
import { IUserTheme, TUserProfile } from "@plane/types";
|
||||||
import { RootStore } from "@/store/root.store";
|
// plane web store
|
||||||
|
import { RootStore } from "@/plane-web/store/root.store";
|
||||||
|
// services
|
||||||
|
import { UserService } from "@/services/user.service";
|
||||||
|
|
||||||
type TError = {
|
type TError = {
|
||||||
status: string;
|
status: string;
|
||||||
|
@ -5,12 +5,12 @@ import { IWorkspaceMemberMe, IProjectMember, IUserProjectsRole } from "@plane/ty
|
|||||||
// constants
|
// constants
|
||||||
import { EUserProjectRoles } from "@/constants/project";
|
import { EUserProjectRoles } from "@/constants/project";
|
||||||
import { EUserWorkspaceRoles } from "@/constants/workspace";
|
import { EUserWorkspaceRoles } from "@/constants/workspace";
|
||||||
|
// plane web store
|
||||||
|
import { RootStore } from "@/plane-web/store/root.store";
|
||||||
// services
|
// services
|
||||||
import { ProjectMemberService } from "@/services/project";
|
import { ProjectMemberService } from "@/services/project";
|
||||||
import { UserService } from "@/services/user.service";
|
import { UserService } from "@/services/user.service";
|
||||||
import { WorkspaceService } from "@/services/workspace.service";
|
import { WorkspaceService } from "@/services/workspace.service";
|
||||||
// store
|
|
||||||
import { RootStore } from "../root.store";
|
|
||||||
|
|
||||||
export interface IUserMembershipStore {
|
export interface IUserMembershipStore {
|
||||||
// observables
|
// observables
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
// mobx
|
|
||||||
import { action, observable, makeObservable, runInAction } from "mobx";
|
import { action, observable, makeObservable, runInAction } from "mobx";
|
||||||
import { computedFn } from "mobx-utils";
|
import { computedFn } from "mobx-utils";
|
||||||
import { APITokenService } from "@/services/api_token.service";
|
|
||||||
import { IApiToken } from "@plane/types";
|
|
||||||
import { RootStore } from "../root.store";
|
|
||||||
// types
|
// types
|
||||||
|
import { IApiToken } from "@plane/types";
|
||||||
|
// plane web store
|
||||||
|
import { RootStore } from "@/plane-web/store/root.store";
|
||||||
|
// services
|
||||||
|
import { APITokenService } from "@/services/api_token.service";
|
||||||
|
|
||||||
export interface IApiTokenStore {
|
export interface IApiTokenStore {
|
||||||
// observables
|
// observables
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
import set from "lodash/set";
|
import set from "lodash/set";
|
||||||
import { action, computed, observable, makeObservable, runInAction } from "mobx";
|
import { action, computed, observable, makeObservable, runInAction } from "mobx";
|
||||||
import { IWorkspace } from "@plane/types";
|
|
||||||
import { WorkspaceService } from "@/services/workspace.service";
|
|
||||||
import { RootStore } from "../root.store";
|
|
||||||
// types
|
// 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";
|
||||||
// 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";
|
||||||
|
@ -1,9 +1,12 @@
|
|||||||
// mobx
|
// mobx
|
||||||
import { action, observable, makeObservable, computed, runInAction } from "mobx";
|
import { action, observable, makeObservable, computed, runInAction } from "mobx";
|
||||||
import { computedFn } from "mobx-utils";
|
import { computedFn } from "mobx-utils";
|
||||||
|
// types
|
||||||
import { IWebhook } from "@plane/types";
|
import { IWebhook } from "@plane/types";
|
||||||
|
// plane web store
|
||||||
|
import { RootStore } from "@/plane-web/store/root.store";
|
||||||
|
// services
|
||||||
import { WebhookService } from "@/services/webhook.service";
|
import { WebhookService } from "@/services/webhook.service";
|
||||||
import { RootStore } from "../root.store";
|
|
||||||
|
|
||||||
export interface IWebhookStore {
|
export interface IWebhookStore {
|
||||||
// observables
|
// observables
|
||||||
|
Loading…
Reference in New Issue
Block a user