refactor: move web utils to packages (#7145)
* refactor: move web utils to packages * fix: build and lint errors * chore: update drag handle plugin * chore: update table cell type to fix build errors * fix: build errors * chore: sync few changes * fix: build errors * chore: minor fixes related to duplicate assets imports * fix: build errors * chore: minor changes
This commit is contained in:
parent
dffcc6dc10
commit
2014400bed
614 changed files with 1999 additions and 3030 deletions
|
|
@ -1,5 +1,5 @@
|
|||
// helpers
|
||||
import { API_BASE_URL } from "@/helpers/common.helper";
|
||||
import { API_BASE_URL } from "@plane/constants";
|
||||
// plane web constants
|
||||
import { AI_EDITOR_TASKS } from "@/plane-web/constants/ai";
|
||||
// services
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
// plane imports
|
||||
import { API_BASE_URL } from "@plane/constants";
|
||||
import { IAnalyticsResponse, TAnalyticsTabsBase, TAnalyticsGraphsBase, TAnalyticsFilterParams } from "@plane/types";
|
||||
// services
|
||||
import { APIService } from "./api.service";
|
||||
|
||||
export class AnalyticsService extends APIService {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { API_BASE_URL } from "@plane/constants";
|
||||
import { IApiToken } from "@plane/types";
|
||||
import { API_BASE_URL } from "@/helpers/common.helper";
|
||||
import { APIService } from "./api.service";
|
||||
|
||||
export class APITokenService extends APIService {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// services
|
||||
import { API_BASE_URL } from "@/helpers/common.helper";
|
||||
import { API_BASE_URL } from "@plane/constants";
|
||||
import { APIService } from "@/services/api.service";
|
||||
// helper
|
||||
// types
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// services
|
||||
import { API_BASE_URL } from "@/helpers/common.helper";
|
||||
import { API_BASE_URL } from "@plane/constants";
|
||||
import { APIService } from "@/services/api.service";
|
||||
// helpers
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// types
|
||||
import { API_BASE_URL } from "@plane/constants";
|
||||
import { ICsrfTokenData, IEmailCheckData, IEmailCheckResponse } from "@plane/types";
|
||||
// helpers
|
||||
import { API_BASE_URL } from "@/helpers/common.helper";
|
||||
// services
|
||||
import { APIService } from "@/services/api.service";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
// services
|
||||
import { API_BASE_URL } from "@plane/constants";
|
||||
import type {
|
||||
CycleDateCheckData,
|
||||
ICycle,
|
||||
|
|
@ -8,7 +9,6 @@ import type {
|
|||
TProgressSnapshot,
|
||||
TCycleEstimateDistribution,
|
||||
} from "@plane/types";
|
||||
import { API_BASE_URL } from "@/helpers/common.helper";
|
||||
import { APIService } from "@/services/api.service";
|
||||
|
||||
export class CycleService extends APIService {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// type
|
||||
import { API_BASE_URL } from "@plane/constants";
|
||||
import { ICycle } from "@plane/types";
|
||||
// helpers
|
||||
import { API_BASE_URL } from "@/helpers/common.helper";
|
||||
// services
|
||||
import { APIService } from "@/services/api.service";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { API_BASE_URL } from "@plane/constants";
|
||||
import { THomeDashboardResponse, TWidget, TWidgetStatsResponse, TWidgetStatsRequestParams } from "@plane/types";
|
||||
import { API_BASE_URL } from "@/helpers/common.helper";
|
||||
import { APIService } from "@/services/api.service";
|
||||
// helpers
|
||||
// types
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { API_BASE_URL } from "@plane/constants";
|
||||
import type { IFavorite } from "@plane/types";
|
||||
// helpers
|
||||
import { API_BASE_URL } from "@/helpers/common.helper";
|
||||
// services
|
||||
import { APIService } from "@/services/api.service";
|
||||
// types
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import { AxiosRequestConfig } from "axios";
|
||||
// plane types
|
||||
import { API_BASE_URL } from "@plane/constants";
|
||||
import { TFileEntityInfo, TFileSignedURLResponse } from "@plane/types";
|
||||
// helpers
|
||||
import { API_BASE_URL } from "@/helpers/common.helper";
|
||||
import { generateFileUploadPayload, getAssetIdFromUrl, getFileMetaDataForUpload } from "@/helpers/file.helper";
|
||||
import { generateFileUploadPayload, getAssetIdFromUrl, getFileMetaDataForUpload } from "@plane/utils";
|
||||
// services
|
||||
import { APIService } from "@/services/api.service";
|
||||
import { FileUploadService } from "@/services/file-upload.service";
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
// plane imports
|
||||
import { EInboxIssueSource, TInboxIssue } from "@plane/constants";
|
||||
import { EInboxIssueSource, TInboxIssue, API_BASE_URL } from "@plane/constants";
|
||||
import type { TIssue, TInboxIssueWithPagination } from "@plane/types";
|
||||
// helpers
|
||||
import { API_BASE_URL } from "@/helpers/common.helper";
|
||||
// services
|
||||
import { APIService } from "@/services/api.service";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// plane imports
|
||||
import { API_BASE_URL } from "@plane/constants";
|
||||
import { type TDescriptionVersionsListResponse, type TDescriptionVersionDetails } from "@plane/types";
|
||||
// helpers
|
||||
import { API_BASE_URL } from "@/helpers/common.helper";
|
||||
// services
|
||||
import { APIService } from "@/services/api.service";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// types
|
||||
import { API_BASE_URL } from "@plane/constants";
|
||||
import type { IInstanceInfo, TPage } from "@plane/types";
|
||||
// helpers
|
||||
import { API_BASE_URL } from "@/helpers/common.helper";
|
||||
// services
|
||||
import { APIService } from "@/services/api.service";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { API_BASE_URL } from "@plane/constants";
|
||||
import { IGithubRepoInfo, IGithubServiceImportFormData } from "@plane/types";
|
||||
import { API_BASE_URL } from "@/helpers/common.helper";
|
||||
import { APIService } from "@/services/api.service";
|
||||
// helpers
|
||||
// types
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { API_BASE_URL } from "@plane/constants";
|
||||
import { IAppIntegration, IImporterService, IWorkspaceIntegration, IExportServiceResponse } from "@plane/types";
|
||||
import { API_BASE_URL } from "@/helpers/common.helper";
|
||||
import { APIService } from "@/services/api.service";
|
||||
// types
|
||||
// helper
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { API_BASE_URL } from "@plane/constants";
|
||||
import { IJiraMetadata, IJiraResponse, IJiraImporterForm } from "@plane/types";
|
||||
import { API_BASE_URL } from "@/helpers/common.helper";
|
||||
import { APIService } from "@/services/api.service";
|
||||
// types
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { EIssueServiceType } from "@plane/constants";
|
||||
// types
|
||||
import { EIssueServiceType, API_BASE_URL } from "@plane/constants";
|
||||
import {
|
||||
TIssueParams,
|
||||
type IIssueDisplayProperties,
|
||||
|
|
@ -12,8 +12,7 @@ import {
|
|||
type TIssueSubIssues,
|
||||
} from "@plane/types";
|
||||
// helpers
|
||||
import { API_BASE_URL } from "@/helpers/common.helper";
|
||||
import { getIssuesShouldFallbackToServer } from "@/helpers/issue.helper";
|
||||
import { getIssuesShouldFallbackToServer } from "@plane/utils";
|
||||
import { persistence } from "@/local-db/storage.sqlite";
|
||||
// services
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import { EIssueServiceType } from "@plane/constants";
|
||||
import { EIssueServiceType, API_BASE_URL } from "@plane/constants";
|
||||
import { TIssueActivity, TIssueServiceType } from "@plane/types";
|
||||
import { API_BASE_URL } from "@/helpers/common.helper";
|
||||
import { APIService } from "@/services/api.service";
|
||||
// types
|
||||
// helper
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import { EIssueServiceType } from "@plane/constants";
|
||||
import { EIssueServiceType, API_BASE_URL } from "@plane/constants";
|
||||
import { TIssue, TIssueServiceType } from "@plane/types";
|
||||
import { API_BASE_URL } from "@/helpers/common.helper";
|
||||
import { APIService } from "@/services/api.service";
|
||||
// types
|
||||
// constants
|
||||
|
|
|
|||
|
|
@ -1,10 +1,9 @@
|
|||
import { AxiosRequestConfig } from "axios";
|
||||
import { EIssueServiceType } from "@plane/constants";
|
||||
import { EIssueServiceType, API_BASE_URL } from "@plane/constants";
|
||||
// plane types
|
||||
import { TIssueAttachment, TIssueAttachmentUploadResponse, TIssueServiceType } from "@plane/types";
|
||||
// helpers
|
||||
import { API_BASE_URL } from "@/helpers/common.helper";
|
||||
import { generateFileUploadPayload, getFileMetaDataForUpload } from "@/helpers/file.helper";
|
||||
import { generateFileUploadPayload, getFileMetaDataForUpload } from "@plane/utils";
|
||||
// services
|
||||
import { APIService } from "@/services/api.service";
|
||||
import { FileUploadService } from "@/services/file-upload.service";
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
import { EIssueServiceType } from "@plane/constants";
|
||||
// plane types
|
||||
import { EIssueServiceType, API_BASE_URL } from "@plane/constants";
|
||||
import { TFileSignedURLResponse, TIssueComment, TIssueServiceType } from "@plane/types";
|
||||
// helpers
|
||||
import { API_BASE_URL } from "@/helpers/common.helper";
|
||||
import { generateFileUploadPayload, getFileMetaDataForUpload } from "@/helpers/file.helper";
|
||||
import { generateFileUploadPayload, getFileMetaDataForUpload } from "@plane/utils";
|
||||
// services
|
||||
import { APIService } from "@/services/api.service";
|
||||
import { FileUploadService } from "@/services/file-upload.service";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { API_BASE_URL } from "@plane/constants";
|
||||
import { TIssue, TIssuesResponse } from "@plane/types";
|
||||
import { API_BASE_URL } from "@/helpers/common.helper";
|
||||
import { APIService } from "@/services/api.service";
|
||||
// helpers
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { API_BASE_URL } from "@plane/constants";
|
||||
import { IIssueLabel } from "@plane/types";
|
||||
import { API_BASE_URL } from "@/helpers/common.helper";
|
||||
// services
|
||||
import { APIService } from "@/services/api.service";
|
||||
// types
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import { EIssueServiceType } from "@plane/constants";
|
||||
import { EIssueServiceType, API_BASE_URL } from "@plane/constants";
|
||||
import { type TIssueCommentReaction, type TIssueReaction, type TIssueServiceType } from "@plane/types";
|
||||
import { API_BASE_URL } from "@/helpers/common.helper";
|
||||
// services
|
||||
import { APIService } from "@/services/api.service";
|
||||
// types
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { API_BASE_URL } from "@plane/constants";
|
||||
import type { TIssueRelation, TIssue } from "@plane/types";
|
||||
// helpers
|
||||
import { API_BASE_URL } from "@/helpers/common.helper";
|
||||
// Plane-web
|
||||
import { TIssueRelationTypes } from "@/plane-web/types";
|
||||
// services
|
||||
|
|
|
|||
|
|
@ -1,12 +1,11 @@
|
|||
// plane imports
|
||||
import { EIssueServiceType } from "@plane/constants";
|
||||
import { EIssueServiceType, API_BASE_URL } from "@plane/constants";
|
||||
import {
|
||||
type TDescriptionVersionsListResponse,
|
||||
type TDescriptionVersionDetails,
|
||||
type TIssueServiceType,
|
||||
} from "@plane/types";
|
||||
// helpers
|
||||
import { API_BASE_URL } from "@/helpers/common.helper";
|
||||
// services
|
||||
import { APIService } from "@/services/api.service";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { API_BASE_URL } from "@plane/constants";
|
||||
import { TIssue, TWorkspaceDraftIssue, TWorkspaceDraftPaginationInfo } from "@plane/types";
|
||||
// helpers
|
||||
import { API_BASE_URL } from "@/helpers/common.helper";
|
||||
// services
|
||||
import { APIService } from "@/services/api.service";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// services
|
||||
import { API_BASE_URL } from "@plane/constants";
|
||||
import type { IIssueFiltersResponse } from "@plane/types";
|
||||
import { API_BASE_URL } from "@/helpers/common.helper";
|
||||
import { APIService } from "@/services/api.service";
|
||||
// types
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// types
|
||||
import { API_BASE_URL } from "@plane/constants";
|
||||
import type { IModule, ILinkDetails, ModuleLink, TIssuesResponse } from "@plane/types";
|
||||
// services
|
||||
import { API_BASE_URL } from "@/helpers/common.helper";
|
||||
import { APIService } from "@/services/api.service";
|
||||
|
||||
export class ModuleService extends APIService {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// type
|
||||
import { API_BASE_URL } from "@plane/constants";
|
||||
import { IModule } from "@plane/types";
|
||||
// helpers
|
||||
import { API_BASE_URL } from "@/helpers/common.helper";
|
||||
// services
|
||||
import { APIService } from "@/services/api.service";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// plane types
|
||||
import { API_BASE_URL } from "@plane/constants";
|
||||
import { TPageVersion } from "@plane/types";
|
||||
// helpers
|
||||
import { API_BASE_URL } from "@/helpers/common.helper";
|
||||
// services
|
||||
import { APIService } from "@/services/api.service";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// types
|
||||
import { API_BASE_URL } from "@plane/constants";
|
||||
import { TDocumentPayload, TPage } from "@plane/types";
|
||||
// helpers
|
||||
import { API_BASE_URL } from "@/helpers/common.helper";
|
||||
// services
|
||||
import { APIService } from "@/services/api.service";
|
||||
import { FileUploadService } from "@/services/file-upload.service";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// helpers
|
||||
import { API_BASE_URL } from "@/helpers/common.helper";
|
||||
import { API_BASE_URL } from "@plane/constants";
|
||||
// services
|
||||
import { APIService } from "@/services/api.service";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { API_BASE_URL } from "@/helpers/common.helper";
|
||||
import { API_BASE_URL } from "@plane/constants";
|
||||
import { APIService } from "@/services/api.service";
|
||||
// helpers
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// types
|
||||
import { API_BASE_URL } from "@plane/constants";
|
||||
import type { IProjectBulkAddFormData, TProjectMembership } from "@plane/types";
|
||||
import { API_BASE_URL } from "@/helpers/common.helper";
|
||||
// services
|
||||
import { APIService } from "@/services/api.service";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// types
|
||||
import { API_BASE_URL } from "@plane/constants";
|
||||
import { TProjectPublishSettings } from "@plane/types";
|
||||
// helpers
|
||||
import { API_BASE_URL } from "@/helpers/common.helper";
|
||||
// services
|
||||
import { APIService } from "@/services/api.service";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// services
|
||||
import { API_BASE_URL } from "@plane/constants";
|
||||
import type { IState } from "@plane/types";
|
||||
import { API_BASE_URL } from "@/helpers/common.helper";
|
||||
import { APIService } from "@/services/api.service";
|
||||
// helpers
|
||||
// types
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
import { API_BASE_URL } from "@plane/constants";
|
||||
import type {
|
||||
GithubRepositoriesResponse,
|
||||
ISearchIssueResponse,
|
||||
|
|
@ -6,7 +7,6 @@ import type {
|
|||
TProjectIssuesSearchParams,
|
||||
} from "@plane/types";
|
||||
// helpers
|
||||
import { API_BASE_URL } from "@/helpers/common.helper";
|
||||
// plane web types
|
||||
import { TProject, TPartialProject } from "@/plane-web/types";
|
||||
// services
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
// helpers
|
||||
import { STICKIES_PER_PAGE } from "@plane/constants";
|
||||
import { STICKIES_PER_PAGE, API_BASE_URL } from "@plane/constants";
|
||||
import { TSticky } from "@plane/types";
|
||||
import { API_BASE_URL } from "@/helpers/common.helper";
|
||||
// services
|
||||
import { APIService } from "@/services/api.service";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { API_BASE_URL } from "@plane/constants";
|
||||
import { TTimezones } from "@plane/types";
|
||||
// helpers
|
||||
import { API_BASE_URL } from "@/helpers/common.helper";
|
||||
// api services
|
||||
import { APIService } from "@/services/api.service";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
// services
|
||||
import { API_BASE_URL } from "@plane/constants";
|
||||
import type {
|
||||
TIssue,
|
||||
IUser,
|
||||
|
|
@ -11,7 +12,6 @@ import type {
|
|||
TIssuesResponse,
|
||||
TUserProfile,
|
||||
} from "@plane/types";
|
||||
import { API_BASE_URL } from "@/helpers/common.helper";
|
||||
import { APIService } from "@/services/api.service";
|
||||
// types
|
||||
// helpers
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// api services
|
||||
import { API_BASE_URL } from "@plane/constants";
|
||||
import { IWebhook } from "@plane/types";
|
||||
import { API_BASE_URL } from "@/helpers/common.helper";
|
||||
import { APIService } from "@/services/api.service";
|
||||
// helpers
|
||||
// types
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
/* eslint-disable no-useless-catch */
|
||||
|
||||
import { API_BASE_URL } from "@plane/constants";
|
||||
import type {
|
||||
TNotificationPaginatedInfo,
|
||||
TNotificationPaginatedInfoQueryParams,
|
||||
|
|
@ -7,7 +8,6 @@ import type {
|
|||
TUnreadNotificationsCount,
|
||||
} from "@plane/types";
|
||||
// helpers
|
||||
import { API_BASE_URL } from "@/helpers/common.helper";
|
||||
// services
|
||||
import { APIService } from "@/services/api.service";
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue