From 89c01c595ba2d3b545f0bd982dfed1798df26578 Mon Sep 17 00:00:00 2001 From: Gregory Linford Date: Mon, 18 Nov 2024 13:19:41 +0100 Subject: [PATCH] Cleanup - unused files / unused exports / duplicate exports --- .../drive/src/app/components/AppErrorBoundary.tsx | 2 +- .../components/FileBrowser/ListView/ItemRow.tsx | 2 +- .../components/FileBrowser/ListView/ListHeader.tsx | 2 +- .../components/FileBrowser/state/useSelection.tsx | 6 ---- .../src/app/components/FolderTree/FolderTree.tsx | 2 +- .../FolderTree/hooks/useFloatingEllipsisContext.ts | 4 +-- .../hooks/useFloatingEllipsisEventBasedUpdater.ts | 2 -- .../SharedPage/Bookmarks/SaveToDriveButton.tsx | 2 +- .../Layout/ClosePartialPublicViewButton.tsx | 2 +- .../app/components/SharedPage/Layout/UserInfo.tsx | 2 +- .../app/components/TransferManager/ProgressBar.tsx | 1 - .../app/components/TransferManager/interfaces.ts | 10 ------ .../src/app/components/TransferManager/transfer.ts | 10 ------ .../src/app/components/layout/DriveWindow.tsx | 2 +- .../layout/sidebar/ActionMenu/ActionMenuButton.tsx | 4 +-- .../layout/sidebar/DriveSidebar/DriveSidebar.tsx | 2 +- .../DriveSidebarDevices/SidebarDeviceItem.tsx | 2 +- .../src/app/components/modals/ConflictModal.tsx | 2 +- .../src/app/components/modals/CreateFileModal.tsx | 2 +- .../app/components/modals/CreateFolderModal.tsx | 2 +- .../src/app/components/modals/DetailsModal.tsx | 2 +- .../DriveOnboardingV2Modal.tsx | 11 ++---- .../DriveOnboardingV2Modal/steps/UploadStep.tsx | 2 +- .../app/components/modals/RevisionsModal/index.ts | 1 - .../DirectSharing/MemberPermissionsSelect.tsx | 0 .../helpers/ShareInviteeValidationError.ts | 9 ++--- .../DirectSharing/useShareInvitees.test.ts | 6 ++-- .../DirectSharing/useShareInvitees.ts | 8 ++--- .../ShareLinkModal/_legacy/DateTimeLEGACY.tsx | 16 --------- .../modals/SignupFlowModal/SignupFlowModal.tsx | 2 +- .../components/onboarding/GiftFloatingButton.tsx | 2 +- .../revisions/getCategorizedRevisions.ts | 2 +- .../components/sections/Devices/EmptyDevices.tsx | 2 +- .../app/components/sections/Drive/DriveView.tsx | 2 +- .../sections/Drive/FolderContextMenu.tsx | 4 +-- .../Drive/ToolbarButtons/UploadFileButton.tsx | 2 +- .../Drive/ToolbarButtons/UploadFolderButton.tsx | 2 +- .../sections/FileBrowser/contentCells.tsx | 2 +- .../app/components/sections/Photos/EmptyPhotos.tsx | 2 -- .../sections/Photos/hooks/usePhotosSelection.ts | 4 +-- .../Photos/toolbar/PhotosDownloadButton.tsx | 2 -- .../src/app/components/sections/Search/Search.tsx | 2 +- .../app/components/sections/Search/SearchView.tsx | 2 +- .../SharedLinks/ShareFileSidebarButton.tsx | 41 ---------------------- .../sections/SharedLinks/SharedLinksView.tsx | 2 +- .../sections/SharedWithMe/SharedWithMeView.tsx | 2 +- .../ToolbarButtons/DesktopDownloadDropdown.tsx | 2 +- .../app/components/sections/Trash/TrashView.tsx | 2 +- .../src/app/containers/DriveDummyContainer.tsx | 0 .../drive/src/app/containers/FolderContainer.tsx | 2 +- .../drive/src/app/containers/PreviewContainer.tsx | 2 +- .../drive/src/app/hooks/drive/useActiveShare.tsx | 2 -- .../app/hooks/drive/useDesktopDownloads.test.tsx | 2 +- .../src/app/hooks/drive/useDesktopDownloads.tsx | 2 -- .../drive/src/app/store/_bookmarks/index.ts | 1 - .../drive/src/app/store/_bookmarks/interface.ts | 7 ---- .../drive/src/app/store/_crypto/driveCrypto.ts | 6 ---- .../src/app/store/_documents/useOpenDocument.ts | 4 +-- .../store/_downloads/download/downloadBlocks.ts | 2 +- .../drive/src/app/store/_downloads/interface.ts | 19 ++-------- .../drive/src/app/store/_events/interface.ts | 2 +- .../src/app/store/_events/useDriveEventManager.tsx | 7 ---- .../src/app/store/_links/extendedAttributes.ts | 2 +- .../drive/src/app/store/_links/interface.ts | 2 +- .../drive/src/app/store/_links/useLinksQueue.ts | 2 -- .../src/app/store/_search/indexing/processEvent.ts | 4 +-- .../src/app/store/_search/indexing/useKeysCache.ts | 7 ++-- .../drive/src/app/store/_shares/interface.ts | 22 ++---------- .../drive/src/app/store/_uploads/interface.ts | 26 +------------- .../src/app/store/_uploads/media/getMediaInfo.ts | 2 +- applications/drive/src/app/store/_views/index.ts | 2 +- .../src/app/store/_views/useBookmarksPublicView.ts | 2 +- .../drive/src/app/store/_views/useLinkPath.tsx | 2 +- .../drive/src/app/store/_views/usePhotosView.ts | 2 -- .../store/_views/utils/useIsActiveLinkReadOnly.ts | 2 +- .../app/store/_views/utils/useSortingDevices.ts | 2 +- .../src/app/store/_volumes/useVolumesState.tsx | 2 +- applications/drive/src/app/store/index.ts | 1 - applications/drive/src/app/utils/file.ts | 40 --------------------- .../drive/src/app/utils/publicRedirectSpotlight.ts | 2 +- applications/drive/src/app/utils/telemetry.ts | 2 -- .../drive/src/app/utils/test/shareMapLink.ts | 15 -------- 82 files changed, 73 insertions(+), 325 deletions(-) delete mode 100644 applications/drive/src/app/components/modals/RevisionsModal/index.ts delete mode 100644 applications/drive/src/app/components/modals/ShareLinkModal/DirectSharing/MemberPermissionsSelect.tsx delete mode 100644 applications/drive/src/app/components/modals/ShareLinkModal/_legacy/DateTimeLEGACY.tsx delete mode 100644 applications/drive/src/app/components/sections/SharedLinks/ShareFileSidebarButton.tsx delete mode 100644 applications/drive/src/app/containers/DriveDummyContainer.tsx delete mode 100644 applications/drive/src/app/store/_bookmarks/interface.ts delete mode 100644 applications/drive/src/app/utils/file.ts delete mode 100644 applications/drive/src/app/utils/test/shareMapLink.ts diff --git a/applications/drive/src/app/components/AppErrorBoundary.tsx b/applications/drive/src/app/components/AppErrorBoundary.tsx index ee3d468a82..39a6685cb2 100644 --- a/applications/drive/src/app/components/AppErrorBoundary.tsx +++ b/applications/drive/src/app/components/AppErrorBoundary.tsx @@ -15,7 +15,7 @@ import { RESPONSE_CODE } from '@proton/shared/lib/drive/constants'; import { ApiError } from '@proton/shared/lib/fetch/ApiError'; import generateUID from '@proton/utils/generateUID'; -import useActiveShare from '../hooks/drive/useActiveShare'; +import { useActiveShare } from '../hooks/drive/useActiveShare'; interface Props { children: React.ReactNode; diff --git a/applications/drive/src/app/components/FileBrowser/ListView/ItemRow.tsx b/applications/drive/src/app/components/FileBrowser/ListView/ItemRow.tsx index b2f812d9ae..731b4ef031 100644 --- a/applications/drive/src/app/components/FileBrowser/ListView/ItemRow.tsx +++ b/applications/drive/src/app/components/FileBrowser/ListView/ItemRow.tsx @@ -9,7 +9,7 @@ import useDragAndDrop from '../hooks/useDragAndDrop'; import useFileBrowserItem from '../hooks/useFileBrowserItem'; import type { DragMoveControls, FileBrowserBaseItem } from '../interface'; -export interface ListItemProps { +interface ListItemProps { Cells: React.FC<{ item: any }>[]; item: T; style?: React.CSSProperties; diff --git a/applications/drive/src/app/components/FileBrowser/ListView/ListHeader.tsx b/applications/drive/src/app/components/FileBrowser/ListView/ListHeader.tsx index 37442cbee4..1b9e013c9e 100644 --- a/applications/drive/src/app/components/FileBrowser/ListView/ListHeader.tsx +++ b/applications/drive/src/app/components/FileBrowser/ListView/ListHeader.tsx @@ -22,7 +22,7 @@ interface Props { isMultiSelectionDisabled?: boolean; } -export enum HeaderCellsPresets { +enum HeaderCellsPresets { Checkbox, Placeholder, } diff --git a/applications/drive/src/app/components/FileBrowser/state/useSelection.tsx b/applications/drive/src/app/components/FileBrowser/state/useSelection.tsx index 4ea9b837f0..128b121037 100644 --- a/applications/drive/src/app/components/FileBrowser/state/useSelection.tsx +++ b/applications/drive/src/app/components/FileBrowser/state/useSelection.tsx @@ -5,12 +5,6 @@ import type { SelectionState } from '../hooks/useSelectionControls'; import { useSelectionControls } from '../hooks/useSelectionControls'; import type { BrowserItemId } from '../interface'; -export interface Item { - id: BrowserItemId; - data: T; - disabled?: boolean; -} - interface SelectionFunctions { selectedItemIds: BrowserItemId[]; toggleSelectItem: (id: BrowserItemId) => void; diff --git a/applications/drive/src/app/components/FolderTree/FolderTree.tsx b/applications/drive/src/app/components/FolderTree/FolderTree.tsx index 58c7ede925..5c9b243ddb 100644 --- a/applications/drive/src/app/components/FolderTree/FolderTree.tsx +++ b/applications/drive/src/app/components/FolderTree/FolderTree.tsx @@ -5,7 +5,7 @@ import { TableRowBusy } from '@proton/components'; import type { DecryptedLink, TreeItem } from '../../store'; import ExpandableRow from './ExpandableRow'; import { FloatingEllipsisContext } from './FloatingEllipsisContext'; -import useFloatingEllipsisContext from './hooks/useFloatingEllipsisContext'; +import { useFloatingEllipsisContext } from './hooks/useFloatingEllipsisContext'; interface Props { treeItems: TreeItem | TreeItem[]; diff --git a/applications/drive/src/app/components/FolderTree/hooks/useFloatingEllipsisContext.ts b/applications/drive/src/app/components/FolderTree/hooks/useFloatingEllipsisContext.ts index 095b1e9be2..eb8bad5737 100644 --- a/applications/drive/src/app/components/FolderTree/hooks/useFloatingEllipsisContext.ts +++ b/applications/drive/src/app/components/FolderTree/hooks/useFloatingEllipsisContext.ts @@ -8,7 +8,7 @@ export interface FloatingEllipsisContextValue { getDimensions: () => FloatingEllipsisContainerDimensions; } -export interface FloatingEllipsisContainerDimensions { +interface FloatingEllipsisContainerDimensions { scrollWidth: number; scrollLeft: number; } @@ -58,5 +58,3 @@ export const useFloatingEllipsisContext = ({ return context; }; - -export default useFloatingEllipsisContext; diff --git a/applications/drive/src/app/components/FolderTree/hooks/useFloatingEllipsisEventBasedUpdater.ts b/applications/drive/src/app/components/FolderTree/hooks/useFloatingEllipsisEventBasedUpdater.ts index 92d307ab96..82e1459b5a 100644 --- a/applications/drive/src/app/components/FolderTree/hooks/useFloatingEllipsisEventBasedUpdater.ts +++ b/applications/drive/src/app/components/FolderTree/hooks/useFloatingEllipsisEventBasedUpdater.ts @@ -45,5 +45,3 @@ export const useFloatingEllipsisEventBasedUpdater = ({ return updateVisibility; }; - -export default useFloatingEllipsisEventBasedUpdater; diff --git a/applications/drive/src/app/components/SharedPage/Bookmarks/SaveToDriveButton.tsx b/applications/drive/src/app/components/SharedPage/Bookmarks/SaveToDriveButton.tsx index 38337544ab..936ea5d322 100644 --- a/applications/drive/src/app/components/SharedPage/Bookmarks/SaveToDriveButton.tsx +++ b/applications/drive/src/app/components/SharedPage/Bookmarks/SaveToDriveButton.tsx @@ -19,7 +19,7 @@ import { import { Actions, countActionWithTelemetry } from '../../../utils/telemetry'; import { useSignupFlowModal } from '../../modals/SignupFlowModal/SignupFlowModal'; -export interface Props { +interface Props { onClick: () => Promise; alreadyBookmarked: boolean; className?: string; diff --git a/applications/drive/src/app/components/SharedPage/Layout/ClosePartialPublicViewButton.tsx b/applications/drive/src/app/components/SharedPage/Layout/ClosePartialPublicViewButton.tsx index f881bcf392..7c84fa1ae6 100644 --- a/applications/drive/src/app/components/SharedPage/Layout/ClosePartialPublicViewButton.tsx +++ b/applications/drive/src/app/components/SharedPage/Layout/ClosePartialPublicViewButton.tsx @@ -7,7 +7,7 @@ import { APPS } from '@proton/shared/lib/constants'; import { usePublicSessionUser } from '../../../store'; -export interface Props { +interface Props { className?: string; } export const ClosePartialPublicViewButton = ({ className }: Props) => { diff --git a/applications/drive/src/app/components/SharedPage/Layout/UserInfo.tsx b/applications/drive/src/app/components/SharedPage/Layout/UserInfo.tsx index 2a9ce36d11..c2408ee732 100644 --- a/applications/drive/src/app/components/SharedPage/Layout/UserInfo.tsx +++ b/applications/drive/src/app/components/SharedPage/Layout/UserInfo.tsx @@ -12,7 +12,7 @@ import { saveUrlPasswordForRedirection } from '../../../utils/url/password'; import './UserInfo.scss'; -export interface Props { +interface Props { user: UserModel; } diff --git a/applications/drive/src/app/components/TransferManager/ProgressBar.tsx b/applications/drive/src/app/components/TransferManager/ProgressBar.tsx index 488ed0c41e..a1419ea8ae 100644 --- a/applications/drive/src/app/components/TransferManager/ProgressBar.tsx +++ b/applications/drive/src/app/components/TransferManager/ProgressBar.tsx @@ -5,7 +5,6 @@ export enum ProgressBarStatus { Disabled = 'disabled', Running = 'running', Success = 'success', - Warning = 'warning', Error = 'error', } diff --git a/applications/drive/src/app/components/TransferManager/interfaces.ts b/applications/drive/src/app/components/TransferManager/interfaces.ts index b81ce2e501..536d4ba3f2 100644 --- a/applications/drive/src/app/components/TransferManager/interfaces.ts +++ b/applications/drive/src/app/components/TransferManager/interfaces.ts @@ -4,16 +4,6 @@ import type { IconName } from '@proton/components'; import type { Download, TransferType, Upload } from './transfer'; -export interface DownloadProps { - transfer: Download; - type: TransferType.Download; -} - -export interface UploadProps { - transfer: Upload; - type: TransferType.Upload; -} - export interface TransferProps { transfer: T extends TransferType.Download ? Download : Upload; type: T; diff --git a/applications/drive/src/app/components/TransferManager/transfer.ts b/applications/drive/src/app/components/TransferManager/transfer.ts index 83943109a3..36fd157e42 100644 --- a/applications/drive/src/app/components/TransferManager/transfer.ts +++ b/applications/drive/src/app/components/TransferManager/transfer.ts @@ -71,18 +71,8 @@ export interface Download { scanIssueError?: Error; } -export interface PartialDownload extends Download { - partOf: string; -} - export type Transfer = Upload | Download; -export interface ThumbnailMeta { - modifyTime: number; -} - -export type API = (query: any) => any; - export interface TransferHistoryStats { active: boolean; progress: number; diff --git a/applications/drive/src/app/components/layout/DriveWindow.tsx b/applications/drive/src/app/components/layout/DriveWindow.tsx index ccbb9c9e7f..15ece36249 100644 --- a/applications/drive/src/app/components/layout/DriveWindow.tsx +++ b/applications/drive/src/app/components/layout/DriveWindow.tsx @@ -28,7 +28,7 @@ import FileRecoveryBanner from '../ResolveLockedVolumes/LockedVolumesBanner'; import DriveQuickSettings from '../drawer/DriveQuickSettings'; import { DriveHeaderPrivate } from './DriveHeader'; import { getDriveDrawerPermissions } from './drawerPermissions'; -import ActionMenuButton from './sidebar/ActionMenu/ActionMenuButton'; +import { ActionMenuButton } from './sidebar/ActionMenu/ActionMenuButton'; import DriveSidebar from './sidebar/DriveSidebar'; interface Props { diff --git a/applications/drive/src/app/components/layout/sidebar/ActionMenu/ActionMenuButton.tsx b/applications/drive/src/app/components/layout/sidebar/ActionMenu/ActionMenuButton.tsx index faf6660d1f..9a95c8e889 100644 --- a/applications/drive/src/app/components/layout/sidebar/ActionMenu/ActionMenuButton.tsx +++ b/applications/drive/src/app/components/layout/sidebar/ActionMenu/ActionMenuButton.tsx @@ -15,7 +15,7 @@ import { getCanWrite } from '@proton/shared/lib/drive/permissions'; import { getDevice } from '@proton/shared/lib/helpers/browser'; import clsx from '@proton/utils/clsx'; -import useActiveShare from '../../../../hooks/drive/useActiveShare'; +import { useActiveShare } from '../../../../hooks/drive/useActiveShare'; import { useFileUploadInput, useFolderUploadInput, useFolderView } from '../../../../store'; import { useDocumentActions, useDriveDocsFeatureFlag } from '../../../../store/_documents'; import { useCreateFolderModal } from '../../../modals/CreateFolderModal'; @@ -92,5 +92,3 @@ export const ActionMenuButton = ({ disabled, className }: PropsWithChildren ); }; - -export default ActionMenuButton; diff --git a/applications/drive/src/app/components/layout/sidebar/DriveSidebar/DriveSidebar.tsx b/applications/drive/src/app/components/layout/sidebar/DriveSidebar/DriveSidebar.tsx index 77a4d01824..6ac1f1cb94 100644 --- a/applications/drive/src/app/components/layout/sidebar/DriveSidebar/DriveSidebar.tsx +++ b/applications/drive/src/app/components/layout/sidebar/DriveSidebar/DriveSidebar.tsx @@ -7,7 +7,7 @@ import useDisplayContactsWidget from '@proton/components/hooks/useDisplayContact import useEffectOnce from '@proton/hooks/useEffectOnce'; import { APPS } from '@proton/shared/lib/constants'; -import useActiveShare from '../../../../hooks/drive/useActiveShare'; +import { useActiveShare } from '../../../../hooks/drive/useActiveShare'; import { useDebug } from '../../../../hooks/drive/useDebug'; import type { ShareWithKey } from '../../../../store'; import { useDefaultShare } from '../../../../store'; diff --git a/applications/drive/src/app/components/layout/sidebar/DriveSidebar/DriveSidebarDevices/SidebarDeviceItem.tsx b/applications/drive/src/app/components/layout/sidebar/DriveSidebar/DriveSidebarDevices/SidebarDeviceItem.tsx index af0d362f12..0830170c0a 100644 --- a/applications/drive/src/app/components/layout/sidebar/DriveSidebar/DriveSidebarDevices/SidebarDeviceItem.tsx +++ b/applications/drive/src/app/components/layout/sidebar/DriveSidebar/DriveSidebarDevices/SidebarDeviceItem.tsx @@ -1,6 +1,6 @@ import { useEffect } from 'react'; -import useActiveShare from '../../../../../hooks/drive/useActiveShare'; +import { useActiveShare } from '../../../../../hooks/drive/useActiveShare'; import { useFolderTree } from '../../../../../store'; import type { Device } from '../../../../../store/_devices'; import ExpandButton from '../DriveSidebarFolders/DriveExpandButton'; diff --git a/applications/drive/src/app/components/modals/ConflictModal.tsx b/applications/drive/src/app/components/modals/ConflictModal.tsx index f6be40c42f..bfa005ef2a 100644 --- a/applications/drive/src/app/components/modals/ConflictModal.tsx +++ b/applications/drive/src/app/components/modals/ConflictModal.tsx @@ -19,7 +19,7 @@ import { import { TransferConflictStrategy } from '../../store/_uploads/interface'; -export interface ConflictModalProps { +interface ConflictModalProps { name: string; isFolder?: boolean; originalIsDraft?: boolean; diff --git a/applications/drive/src/app/components/modals/CreateFileModal.tsx b/applications/drive/src/app/components/modals/CreateFileModal.tsx index c94a8306ae..694b79a2c2 100644 --- a/applications/drive/src/app/components/modals/CreateFileModal.tsx +++ b/applications/drive/src/app/components/modals/CreateFileModal.tsx @@ -18,7 +18,7 @@ import { import { useLoading } from '@proton/hooks'; import noop from '@proton/utils/noop'; -import useActiveShare from '../../hooks/drive/useActiveShare'; +import { useActiveShare } from '../../hooks/drive/useActiveShare'; import { formatLinkName, useActions, validateLinkNameField } from '../../store'; interface Props { diff --git a/applications/drive/src/app/components/modals/CreateFolderModal.tsx b/applications/drive/src/app/components/modals/CreateFolderModal.tsx index ed8289d91e..331c4701ce 100644 --- a/applications/drive/src/app/components/modals/CreateFolderModal.tsx +++ b/applications/drive/src/app/components/modals/CreateFolderModal.tsx @@ -18,7 +18,7 @@ import { import { useLoading } from '@proton/hooks'; import noop from '@proton/utils/noop'; -import useActiveShare from '../../hooks/drive/useActiveShare'; +import { useActiveShare } from '../../hooks/drive/useActiveShare'; import { formatLinkName, useActions, validateLinkNameField } from '../../store'; interface Props { diff --git a/applications/drive/src/app/components/modals/DetailsModal.tsx b/applications/drive/src/app/components/modals/DetailsModal.tsx index e0f6bc2e2b..716810bae2 100644 --- a/applications/drive/src/app/components/modals/DetailsModal.tsx +++ b/applications/drive/src/app/components/modals/DetailsModal.tsx @@ -33,7 +33,7 @@ import ModalContentLoader from './ModalContentLoader'; const { UserNameCell, LocationCell, TimeCell, DescriptiveTypeCell, MimeTypeCell } = Cells; -export interface Props { +interface Props { shareId: string; linkId: string; onClose?: () => void; diff --git a/applications/drive/src/app/components/modals/DriveOnboardingV2Modal/DriveOnboardingV2Modal.tsx b/applications/drive/src/app/components/modals/DriveOnboardingV2Modal/DriveOnboardingV2Modal.tsx index c9b57c0f55..430902a7bd 100644 --- a/applications/drive/src/app/components/modals/DriveOnboardingV2Modal/DriveOnboardingV2Modal.tsx +++ b/applications/drive/src/app/components/modals/DriveOnboardingV2Modal/DriveOnboardingV2Modal.tsx @@ -3,20 +3,13 @@ import { type FC, useEffect, useMemo, useState } from 'react'; import { useUserSettings, useWelcomeFlags } from '@proton/account'; import type { ModalStateProps } from '@proton/components'; -import { - Loader, - ModalTwo, - ModalTwoContent, - ModalTwoFooter, - useApi, - useDrivePlan -} from '@proton/components'; +import { Loader, ModalTwo, ModalTwoContent, ModalTwoFooter, useApi, useDrivePlan } from '@proton/components'; import { updateFlags, updateWelcomeFlags } from '@proton/shared/lib/api/settings'; import { isMobile } from '@proton/shared/lib/helpers/browser'; import isTruthy from '@proton/utils/isTruthy'; import noop from '@proton/utils/noop'; -import useDesktopDownloads from '../../../hooks/drive/useDesktopDownloads'; +import { useDesktopDownloads } from '../../../hooks/drive/useDesktopDownloads'; import { Actions, countActionWithTelemetry } from '../../../utils/telemetry'; import { useOnboarding } from '../../onboarding/useOnboarding'; import { Header } from './Header'; diff --git a/applications/drive/src/app/components/modals/DriveOnboardingV2Modal/steps/UploadStep.tsx b/applications/drive/src/app/components/modals/DriveOnboardingV2Modal/steps/UploadStep.tsx index da5086c915..5925995b2b 100644 --- a/applications/drive/src/app/components/modals/DriveOnboardingV2Modal/steps/UploadStep.tsx +++ b/applications/drive/src/app/components/modals/DriveOnboardingV2Modal/steps/UploadStep.tsx @@ -6,7 +6,7 @@ import { Button } from '@proton/atoms'; import { Icon } from '@proton/components'; import clsx from '@proton/utils/clsx'; -import useActiveShare from '../../../../hooks/drive/useActiveShare'; +import { useActiveShare } from '../../../../hooks/drive/useActiveShare'; import { useFileDrop } from '../../../../hooks/drive/useFileDrop'; import { useFileUploadInput, useFolderUploadInput } from '../../../../store/_uploads/useUploadInput'; import { Actions, countActionWithTelemetry } from '../../../../utils/telemetry'; diff --git a/applications/drive/src/app/components/modals/RevisionsModal/index.ts b/applications/drive/src/app/components/modals/RevisionsModal/index.ts deleted file mode 100644 index cc25a08b0a..0000000000 --- a/applications/drive/src/app/components/modals/RevisionsModal/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { default } from './RevisionsModal'; diff --git a/applications/drive/src/app/components/modals/ShareLinkModal/DirectSharing/MemberPermissionsSelect.tsx b/applications/drive/src/app/components/modals/ShareLinkModal/DirectSharing/MemberPermissionsSelect.tsx deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/applications/drive/src/app/components/modals/ShareLinkModal/DirectSharing/helpers/ShareInviteeValidationError.ts b/applications/drive/src/app/components/modals/ShareLinkModal/DirectSharing/helpers/ShareInviteeValidationError.ts index 94e291d8cd..ea6141aab3 100644 --- a/applications/drive/src/app/components/modals/ShareLinkModal/DirectSharing/helpers/ShareInviteeValidationError.ts +++ b/applications/drive/src/app/components/modals/ShareLinkModal/DirectSharing/helpers/ShareInviteeValidationError.ts @@ -1,7 +1,5 @@ import { c } from 'ttag'; -import type { EncryptionPreferencesError } from '@proton/shared/lib/mail/encryptionPreferences'; - export enum VALIDATION_ERROR_TYPES { INVALID_EMAIL, EXTERNAL_INVITE_DISABLED, @@ -10,6 +8,7 @@ export enum VALIDATION_ERROR_TYPES { EXISTING_MEMBER, NOT_INTERNAL_ACCOUNT, } + const { INVALID_EMAIL, EXTERNAL_INVITE_DISABLED, @@ -41,15 +40,13 @@ const getValidationErrorMessage = (type: VALIDATION_ERROR_TYPES) => { return c('Error').t`Validation error`; }; -export class ShareInviteeValdidationError extends Error { +export class ShareInviteeValidationError extends Error { type: VALIDATION_ERROR_TYPES; constructor(type: VALIDATION_ERROR_TYPES) { const message = getValidationErrorMessage(type); super(message); this.type = type; - Object.setPrototypeOf(this, ShareInviteeValdidationError.prototype); + Object.setPrototypeOf(this, ShareInviteeValidationError.prototype); } } - -export type RecipientError = ShareInviteeValdidationError | EncryptionPreferencesError; diff --git a/applications/drive/src/app/components/modals/ShareLinkModal/DirectSharing/useShareInvitees.test.ts b/applications/drive/src/app/components/modals/ShareLinkModal/DirectSharing/useShareInvitees.test.ts index 91789c97fa..85447066a3 100644 --- a/applications/drive/src/app/components/modals/ShareLinkModal/DirectSharing/useShareInvitees.test.ts +++ b/applications/drive/src/app/components/modals/ShareLinkModal/DirectSharing/useShareInvitees.test.ts @@ -7,7 +7,7 @@ import { CryptoProxy } from '@proton/crypto'; import noop from '@proton/utils/noop'; import { useGetPublicKeysForEmail } from '../../../../../app/store'; -import { ShareInviteeValdidationError, VALIDATION_ERROR_TYPES } from './helpers/ShareInviteeValidationError'; +import { ShareInviteeValidationError, VALIDATION_ERROR_TYPES } from './helpers/ShareInviteeValidationError'; import { useShareInvitees } from './useShareInvitees'; // Internal and proton account @@ -153,7 +153,7 @@ describe('useShareInvitees', () => { expect(result.current.invitees).toEqual([ { ...inviteeInternal, - error: new ShareInviteeValdidationError(VALIDATION_ERROR_TYPES.EXISTING_MEMBER), + error: new ShareInviteeValidationError(VALIDATION_ERROR_TYPES.EXISTING_MEMBER), }, ]) ); @@ -171,7 +171,7 @@ describe('useShareInvitees', () => { { ...inviteeInternal, email: 'lucienTest.com', - error: new ShareInviteeValdidationError(VALIDATION_ERROR_TYPES.INVALID_EMAIL), + error: new ShareInviteeValidationError(VALIDATION_ERROR_TYPES.INVALID_EMAIL), }, ]) ); diff --git a/applications/drive/src/app/components/modals/ShareLinkModal/DirectSharing/useShareInvitees.ts b/applications/drive/src/app/components/modals/ShareLinkModal/DirectSharing/useShareInvitees.ts index 69b6b97d4c..e651822fdf 100644 --- a/applications/drive/src/app/components/modals/ShareLinkModal/DirectSharing/useShareInvitees.ts +++ b/applications/drive/src/app/components/modals/ShareLinkModal/DirectSharing/useShareInvitees.ts @@ -8,7 +8,7 @@ import { canonicalizeInternalEmail, validateEmailAddress } from '@proton/shared/ import type { ShareInvitee } from '../../../../store'; import { useDriveSharingFlags, useGetPublicKeysForEmail } from '../../../../store'; -import { ShareInviteeValdidationError, VALIDATION_ERROR_TYPES } from './helpers/ShareInviteeValidationError'; +import { ShareInviteeValidationError, VALIDATION_ERROR_TYPES } from './helpers/ShareInviteeValidationError'; /** * useShareInvitees hook is used to manage a list of user that we want to add to a drive share. @@ -86,7 +86,7 @@ export const useShareInvitees = (existingEmails: string[]) => { if (!validateEmailAddress(address)) { acc.badInvitees.set(address, { ...newRecipient, - error: new ShareInviteeValdidationError(VALIDATION_ERROR_TYPES.INVALID_EMAIL), + error: new ShareInviteeValidationError(VALIDATION_ERROR_TYPES.INVALID_EMAIL), }); return acc; } @@ -94,7 +94,7 @@ export const useShareInvitees = (existingEmails: string[]) => { if (canonicalizeExistingEmails.includes(canonicalizedAddress)) { acc.badInvitees.set(address, { ...newRecipient, - error: new ShareInviteeValdidationError(VALIDATION_ERROR_TYPES.EXISTING_MEMBER), + error: new ShareInviteeValidationError(VALIDATION_ERROR_TYPES.EXISTING_MEMBER), }); } else if ( [...canonicalizeCurrentEmails, ...acc.addedCanonicalizedAddresses].includes(canonicalizedAddress) @@ -125,7 +125,7 @@ export const useShareInvitees = (existingEmails: string[]) => { copy.set(email, { ...filteredInvitee, error: disabledExternalInvite - ? new ShareInviteeValdidationError( + ? new ShareInviteeValidationError( isSharingExternalInviteDisabled ? VALIDATION_ERROR_TYPES.EXTERNAL_INVITE_DISABLED : VALIDATION_ERROR_TYPES.EXTERNAL_INVITE_NOT_AVAILABLE diff --git a/applications/drive/src/app/components/modals/ShareLinkModal/_legacy/DateTimeLEGACY.tsx b/applications/drive/src/app/components/modals/ShareLinkModal/_legacy/DateTimeLEGACY.tsx deleted file mode 100644 index 10360a3022..0000000000 --- a/applications/drive/src/app/components/modals/ShareLinkModal/_legacy/DateTimeLEGACY.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import * as React from 'react'; - -import { format as formatDate, fromUnixTime } from 'date-fns'; - -import { dateLocale } from '@proton/shared/lib/i18n'; - -interface Props extends React.HTMLAttributes { - value: number; - format?: string; -} - -const DateTimeLEGACY = ({ value, format = 'PPp', ...rest }: Props) => { - return ; -}; - -export default DateTimeLEGACY; diff --git a/applications/drive/src/app/components/modals/SignupFlowModal/SignupFlowModal.tsx b/applications/drive/src/app/components/modals/SignupFlowModal/SignupFlowModal.tsx index 5255076d5d..34fe8e9bd9 100644 --- a/applications/drive/src/app/components/modals/SignupFlowModal/SignupFlowModal.tsx +++ b/applications/drive/src/app/components/modals/SignupFlowModal/SignupFlowModal.tsx @@ -32,7 +32,7 @@ import { RedirectionReason, drivePublicRedirectionReasonKey } from '../../../hoo import { Actions, countActionWithTelemetry, traceTelemetry } from '../../../utils/telemetry'; import { deleteStoredUrlPassword, saveUrlPasswordForRedirection } from '../../../utils/url/password'; -export interface Props { +interface Props { customPassword?: string; } export const SignupFlowModal = ({ customPassword, onClose, ...modalProps }: Props & ModalStateProps) => { diff --git a/applications/drive/src/app/components/onboarding/GiftFloatingButton.tsx b/applications/drive/src/app/components/onboarding/GiftFloatingButton.tsx index f9905ffbbf..28f7cd141c 100644 --- a/applications/drive/src/app/components/onboarding/GiftFloatingButton.tsx +++ b/applications/drive/src/app/components/onboarding/GiftFloatingButton.tsx @@ -21,7 +21,7 @@ import { ChecklistKey } from '@proton/shared/lib/interfaces'; import spotlightIcon from '@proton/styles/assets/img/illustrations/spotlight-stars.svg'; import clsx from '@proton/utils/clsx'; -import useActiveShare from '../../hooks/drive/useActiveShare'; +import { useActiveShare } from '../../hooks/drive/useActiveShare'; import { useFileUploadInput } from '../../store'; import { useFileSharingModal } from '../modals/SelectLinkToShareModal/SelectLinkToShareModal'; import { useLinkSharingModal } from '../modals/ShareLinkModal/ShareLinkModal'; diff --git a/applications/drive/src/app/components/revisions/getCategorizedRevisions.ts b/applications/drive/src/app/components/revisions/getCategorizedRevisions.ts index ea5691ef0a..e2cdb9a735 100644 --- a/applications/drive/src/app/components/revisions/getCategorizedRevisions.ts +++ b/applications/drive/src/app/components/revisions/getCategorizedRevisions.ts @@ -6,7 +6,7 @@ import isLastWeek from '@proton/utils/isLastWeek'; import type { DriveFileRevision } from '../../store'; -export type RevisionCategory = { title: string; list: DriveFileRevision[] }; +type RevisionCategory = { title: string; list: DriveFileRevision[] }; export type CategorizedRevisions = Map; export function getCategorizedRevisions( revisions: DriveFileRevision[], diff --git a/applications/drive/src/app/components/sections/Devices/EmptyDevices.tsx b/applications/drive/src/app/components/sections/Devices/EmptyDevices.tsx index 6da556d1c7..4b785e1174 100644 --- a/applications/drive/src/app/components/sections/Devices/EmptyDevices.tsx +++ b/applications/drive/src/app/components/sections/Devices/EmptyDevices.tsx @@ -7,7 +7,7 @@ import { Button } from '@proton/atoms'; import { Icon } from '@proton/components'; import emptyDevicesImg from '@proton/styles/assets/img/illustrations/empty-devices.svg'; -import useDesktopDownloads from '../../../hooks/drive/useDesktopDownloads'; +import { useDesktopDownloads } from '../../../hooks/drive/useDesktopDownloads'; import { DriveEmptyView } from '../../layout/DriveEmptyView'; type Props = {}; diff --git a/applications/drive/src/app/components/sections/Drive/DriveView.tsx b/applications/drive/src/app/components/sections/Drive/DriveView.tsx index e5a6dba00c..fa92de868c 100644 --- a/applications/drive/src/app/components/sections/Drive/DriveView.tsx +++ b/applications/drive/src/app/components/sections/Drive/DriveView.tsx @@ -5,7 +5,7 @@ import type { LinkURLType } from '@proton/shared/lib/drive/constants'; import { RESPONSE_CODE } from '@proton/shared/lib/drive/constants'; import { getCanWrite } from '@proton/shared/lib/drive/permissions'; -import useActiveShare from '../../../hooks/drive/useActiveShare'; +import { useActiveShare } from '../../../hooks/drive/useActiveShare'; import useNavigate from '../../../hooks/drive/useNavigate'; import { useFolderView } from '../../../store'; import DriveBreadcrumbs from '../../DriveBreadcrumbs'; diff --git a/applications/drive/src/app/components/sections/Drive/FolderContextMenu.tsx b/applications/drive/src/app/components/sections/Drive/FolderContextMenu.tsx index 7cfa24db30..6207ce2634 100644 --- a/applications/drive/src/app/components/sections/Drive/FolderContextMenu.tsx +++ b/applications/drive/src/app/components/sections/Drive/FolderContextMenu.tsx @@ -2,10 +2,10 @@ import { useEffect, useMemo } from 'react'; import * as React from 'react'; import { ContextMenu, ContextSeparator } from '@proton/components'; -import type { SHARE_MEMBER_PERMISSIONS} from '@proton/shared/lib/drive/permissions'; +import type { SHARE_MEMBER_PERMISSIONS } from '@proton/shared/lib/drive/permissions'; import { getCanAdmin, getCanWrite } from '@proton/shared/lib/drive/permissions'; -import useActiveShare from '../../../hooks/drive/useActiveShare'; +import { useActiveShare } from '../../../hooks/drive/useActiveShare'; import { useDriveSharingFlags, useFileUploadInput, useFolderUploadInput } from '../../../store'; import { useDocumentActions, useDriveDocsFeatureFlag } from '../../../store/_documents'; import type { ContextMenuProps } from '../../FileBrowser/interface'; diff --git a/applications/drive/src/app/components/sections/Drive/ToolbarButtons/UploadFileButton.tsx b/applications/drive/src/app/components/sections/Drive/ToolbarButtons/UploadFileButton.tsx index 4d068f240f..d3f16f50b0 100644 --- a/applications/drive/src/app/components/sections/Drive/ToolbarButtons/UploadFileButton.tsx +++ b/applications/drive/src/app/components/sections/Drive/ToolbarButtons/UploadFileButton.tsx @@ -2,7 +2,7 @@ import { c } from 'ttag'; import { Icon, ToolbarButton } from '@proton/components'; -import useActiveShare from '../../../../hooks/drive/useActiveShare'; +import { useActiveShare } from '../../../../hooks/drive/useActiveShare'; import { useFileUploadInput } from '../../../../store'; const UploadFileButton = () => { diff --git a/applications/drive/src/app/components/sections/Drive/ToolbarButtons/UploadFolderButton.tsx b/applications/drive/src/app/components/sections/Drive/ToolbarButtons/UploadFolderButton.tsx index 1bd600003e..43d0f804bd 100644 --- a/applications/drive/src/app/components/sections/Drive/ToolbarButtons/UploadFolderButton.tsx +++ b/applications/drive/src/app/components/sections/Drive/ToolbarButtons/UploadFolderButton.tsx @@ -2,7 +2,7 @@ import { c } from 'ttag'; import { Icon, ToolbarButton } from '@proton/components'; -import useActiveShare from '../../../../hooks/drive/useActiveShare'; +import { useActiveShare } from '../../../../hooks/drive/useActiveShare'; import { useFolderUploadInput } from '../../../../store'; const UploadFolderButton = () => { diff --git a/applications/drive/src/app/components/sections/FileBrowser/contentCells.tsx b/applications/drive/src/app/components/sections/FileBrowser/contentCells.tsx index 7df1b1ec66..66f786d669 100644 --- a/applications/drive/src/app/components/sections/FileBrowser/contentCells.tsx +++ b/applications/drive/src/app/components/sections/FileBrowser/contentCells.tsx @@ -6,7 +6,7 @@ import { useContactEmails } from '@proton/mail/contactEmails/hooks'; import { getInitials } from '@proton/shared/lib/helpers/string'; import clsx from '@proton/utils/clsx'; -import useActiveShare from '../../../hooks/drive/useActiveShare'; +import { useActiveShare } from '../../../hooks/drive/useActiveShare'; import { useDriveSharingFlags, useInvitationsActions } from '../../../store'; import { formatAccessCount } from '../../../utils/formatters'; import { Cells } from '../../FileBrowser'; diff --git a/applications/drive/src/app/components/sections/Photos/EmptyPhotos.tsx b/applications/drive/src/app/components/sections/Photos/EmptyPhotos.tsx index da5b6a3c10..efc6b44f71 100644 --- a/applications/drive/src/app/components/sections/Photos/EmptyPhotos.tsx +++ b/applications/drive/src/app/components/sections/Photos/EmptyPhotos.tsx @@ -37,5 +37,3 @@ export const EmptyPhotos: FC = () => { ); }; - -export default EmptyPhotos; diff --git a/applications/drive/src/app/components/sections/Photos/hooks/usePhotosSelection.ts b/applications/drive/src/app/components/sections/Photos/hooks/usePhotosSelection.ts index b53f040d52..6f9d8351c2 100644 --- a/applications/drive/src/app/components/sections/Photos/hooks/usePhotosSelection.ts +++ b/applications/drive/src/app/components/sections/Photos/hooks/usePhotosSelection.ts @@ -26,7 +26,7 @@ export const getGroupLinkIds = (data: (T | SelectionGro return items; }; -export type HandleSelectionArgs = { +type HandleSelectionArgs = { isSelected: boolean; isMultiSelect?: boolean; }; @@ -138,5 +138,3 @@ export const usePhotosSelection = ( isItemSelected, }; }; - -export default usePhotosSelection; diff --git a/applications/drive/src/app/components/sections/Photos/toolbar/PhotosDownloadButton.tsx b/applications/drive/src/app/components/sections/Photos/toolbar/PhotosDownloadButton.tsx index b2d7ea7ea9..e74ec62e26 100644 --- a/applications/drive/src/app/components/sections/Photos/toolbar/PhotosDownloadButton.tsx +++ b/applications/drive/src/app/components/sections/Photos/toolbar/PhotosDownloadButton.tsx @@ -33,5 +33,3 @@ export const PhotosDownloadButton: FC = ({ requestDownload, selectedLinks /> ); }; - -export default PhotosDownloadButton; diff --git a/applications/drive/src/app/components/sections/Search/Search.tsx b/applications/drive/src/app/components/sections/Search/Search.tsx index c957108284..ad2ff19ed1 100644 --- a/applications/drive/src/app/components/sections/Search/Search.tsx +++ b/applications/drive/src/app/components/sections/Search/Search.tsx @@ -20,7 +20,7 @@ import { getSelectedItems } from '../helpers'; import { NoSearchResultsView } from './NoSearchResultsView'; import { SearchItemContextMenu } from './SearchItemContextMenu'; -export interface SearchItem extends FileBrowserBaseItem { +interface SearchItem extends FileBrowserBaseItem { activeRevision?: EncryptedLink['activeRevision']; cachedThumbnailUrl?: string; hasThumbnail: boolean; diff --git a/applications/drive/src/app/components/sections/Search/SearchView.tsx b/applications/drive/src/app/components/sections/Search/SearchView.tsx index a8b375f99d..900d9a147f 100644 --- a/applications/drive/src/app/components/sections/Search/SearchView.tsx +++ b/applications/drive/src/app/components/sections/Search/SearchView.tsx @@ -6,7 +6,7 @@ import { c, msgid } from 'ttag'; import { SHARE_MEMBER_PERMISSIONS } from '@proton/shared/lib/drive/permissions'; // TODO: handle with container -import useActiveShare from '../../../hooks/drive/useActiveShare'; +import { useActiveShare } from '../../../hooks/drive/useActiveShare'; import { useSearchView } from '../../../store'; import { extractSearchParameters } from '../../../store/_search/utils'; import { FileBrowserStateProvider } from '../../FileBrowser'; diff --git a/applications/drive/src/app/components/sections/SharedLinks/ShareFileSidebarButton.tsx b/applications/drive/src/app/components/sections/SharedLinks/ShareFileSidebarButton.tsx deleted file mode 100644 index 4d080c8771..0000000000 --- a/applications/drive/src/app/components/sections/SharedLinks/ShareFileSidebarButton.tsx +++ /dev/null @@ -1,41 +0,0 @@ -import { c } from 'ttag'; - -import { FloatingButton, Icon, SidebarPrimaryButton } from '@proton/components'; - -import useActiveShare from '../../../hooks/drive/useActiveShare'; -import { useFileSharingModal } from '../../modals/SelectLinkToShareModal/SelectLinkToShareModal'; -import { useLinkSharingModal } from '../../modals/ShareLinkModal/ShareLinkModal'; - -interface Props { - mobileVersion?: boolean; -} - -const ShareFileSidebarButton = ({ mobileVersion }: Props) => { - const { activeShareId } = useActiveShare(); - const [fileSharingModal, showFileSharingModal] = useFileSharingModal(); - const [linkSharingModal, showLinkSharingModal] = useLinkSharingModal(); - - const onShareFile = () => { - if (activeShareId) { - void showFileSharingModal({ shareId: activeShareId, showLinkSharingModal }); - } - }; - - return ( - <> - {mobileVersion ? ( - - - - ) : ( - - {c('Action').t`Share item`} - - )} - {fileSharingModal} - {linkSharingModal} - - ); -}; - -export default ShareFileSidebarButton; diff --git a/applications/drive/src/app/components/sections/SharedLinks/SharedLinksView.tsx b/applications/drive/src/app/components/sections/SharedLinks/SharedLinksView.tsx index 13cc4b75b3..ce355ac361 100644 --- a/applications/drive/src/app/components/sections/SharedLinks/SharedLinksView.tsx +++ b/applications/drive/src/app/components/sections/SharedLinks/SharedLinksView.tsx @@ -4,7 +4,7 @@ import { c } from 'ttag'; import { useAppTitle } from '@proton/components'; -import useActiveShare from '../../../hooks/drive/useActiveShare'; +import { useActiveShare } from '../../../hooks/drive/useActiveShare'; import { useSharedLinksView } from '../../../store'; import { FileBrowserStateProvider } from '../../FileBrowser'; import ToolbarRow from '../ToolbarRow/ToolbarRow'; diff --git a/applications/drive/src/app/components/sections/SharedWithMe/SharedWithMeView.tsx b/applications/drive/src/app/components/sections/SharedWithMe/SharedWithMeView.tsx index 6dcc9b6e5f..4b1b8ebce4 100644 --- a/applications/drive/src/app/components/sections/SharedWithMe/SharedWithMeView.tsx +++ b/applications/drive/src/app/components/sections/SharedWithMe/SharedWithMeView.tsx @@ -4,7 +4,7 @@ import { c } from 'ttag'; import { useAppTitle } from '@proton/components'; -import useActiveShare from '../../../hooks/drive/useActiveShare'; +import { useActiveShare } from '../../../hooks/drive/useActiveShare'; import { useDriveSharingFlags, useSharedWithMeView } from '../../../store'; import { Actions, traceTelemetry } from '../../../utils/telemetry'; import { FileBrowserStateProvider } from '../../FileBrowser'; diff --git a/applications/drive/src/app/components/sections/ToolbarButtons/DesktopDownloadDropdown.tsx b/applications/drive/src/app/components/sections/ToolbarButtons/DesktopDownloadDropdown.tsx index ff4f06b67a..be5e21e5e8 100644 --- a/applications/drive/src/app/components/sections/ToolbarButtons/DesktopDownloadDropdown.tsx +++ b/applications/drive/src/app/components/sections/ToolbarButtons/DesktopDownloadDropdown.tsx @@ -11,7 +11,7 @@ import { usePopperAnchor, } from '@proton/components'; -import useDesktopDownloads from '../../../hooks/drive/useDesktopDownloads'; +import { useDesktopDownloads } from '../../../hooks/drive/useDesktopDownloads'; interface Props { className?: string; diff --git a/applications/drive/src/app/components/sections/Trash/TrashView.tsx b/applications/drive/src/app/components/sections/Trash/TrashView.tsx index 9ef4f94b0a..d1085ba71f 100644 --- a/applications/drive/src/app/components/sections/Trash/TrashView.tsx +++ b/applications/drive/src/app/components/sections/Trash/TrashView.tsx @@ -4,7 +4,7 @@ import { c } from 'ttag'; import { useAppTitle } from '@proton/components'; -import useActiveShare from '../../../hooks/drive/useActiveShare'; +import { useActiveShare } from '../../../hooks/drive/useActiveShare'; import { useTrashView } from '../../../store'; import { FileBrowserStateProvider } from '../../FileBrowser'; import ToolbarRow from '../ToolbarRow/ToolbarRow'; diff --git a/applications/drive/src/app/containers/DriveDummyContainer.tsx b/applications/drive/src/app/containers/DriveDummyContainer.tsx deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/applications/drive/src/app/containers/FolderContainer.tsx b/applications/drive/src/app/containers/FolderContainer.tsx index 90e8faac21..90b8582c21 100644 --- a/applications/drive/src/app/containers/FolderContainer.tsx +++ b/applications/drive/src/app/containers/FolderContainer.tsx @@ -12,7 +12,7 @@ import DriveStartupModals from '../components/modals/DriveStartupModals'; import type { DriveSectionRouteProps } from '../components/sections/Drive/DriveView'; import DriveView from '../components/sections/Drive/DriveView'; import type { DriveFolder } from '../hooks/drive/useActiveShare'; -import useActiveShare from '../hooks/drive/useActiveShare'; +import { useActiveShare } from '../hooks/drive/useActiveShare'; import { useFolderContainerTitle } from '../hooks/drive/useFolderContainerTitle'; import useNavigate from '../hooks/drive/useNavigate'; import { useContextShareHandler, useDefaultShare, useDriveEventManager } from '../store'; diff --git a/applications/drive/src/app/containers/PreviewContainer.tsx b/applications/drive/src/app/containers/PreviewContainer.tsx index 754a5f7ab3..fcc7d7cdf1 100644 --- a/applications/drive/src/app/containers/PreviewContainer.tsx +++ b/applications/drive/src/app/containers/PreviewContainer.tsx @@ -14,7 +14,7 @@ import SignatureIcon from '../components/SignatureIcon'; import { useDetailsModal } from '../components/modals/DetailsModal'; import { useLinkSharingModal } from '../components/modals/ShareLinkModal/ShareLinkModal'; import useIsEditEnabled from '../components/sections/useIsEditEnabled'; -import useActiveShare from '../hooks/drive/useActiveShare'; +import { useActiveShare } from '../hooks/drive/useActiveShare'; import useNavigate from '../hooks/drive/useNavigate'; import { useActions, useDriveSharingFlags, useFileView } from '../store'; import { useOpenInDocs } from '../store/_documents'; diff --git a/applications/drive/src/app/hooks/drive/useActiveShare.tsx b/applications/drive/src/app/hooks/drive/useActiveShare.tsx index 900b68d3dc..e268ab89e9 100644 --- a/applications/drive/src/app/hooks/drive/useActiveShare.tsx +++ b/applications/drive/src/app/hooks/drive/useActiveShare.tsx @@ -59,5 +59,3 @@ export const useActiveShare = () => { } return state; }; - -export default useActiveShare; diff --git a/applications/drive/src/app/hooks/drive/useDesktopDownloads.test.tsx b/applications/drive/src/app/hooks/drive/useDesktopDownloads.test.tsx index 32cd90d220..1cb3c32e00 100644 --- a/applications/drive/src/app/hooks/drive/useDesktopDownloads.test.tsx +++ b/applications/drive/src/app/hooks/drive/useDesktopDownloads.test.tsx @@ -4,7 +4,7 @@ import { renderHook } from '@testing-library/react-hooks'; import { fetchDesktopVersion } from '@proton/shared/lib/apps/desktopVersions'; import { appPlatforms } from '../../utils/appPlatforms'; -import useDesktopDownloads from './useDesktopDownloads'; +import { useDesktopDownloads } from './useDesktopDownloads'; jest.mock('@proton/shared/lib/apps/desktopVersions'); const mockFetchDesktopVersion = jest.mocked(fetchDesktopVersion); diff --git a/applications/drive/src/app/hooks/drive/useDesktopDownloads.tsx b/applications/drive/src/app/hooks/drive/useDesktopDownloads.tsx index 7280ef3119..fe4a5ae81e 100644 --- a/applications/drive/src/app/hooks/drive/useDesktopDownloads.tsx +++ b/applications/drive/src/app/hooks/drive/useDesktopDownloads.tsx @@ -58,5 +58,3 @@ export const useDesktopDownloads = () => { downloads, }; }; - -export default useDesktopDownloads; diff --git a/applications/drive/src/app/store/_bookmarks/index.ts b/applications/drive/src/app/store/_bookmarks/index.ts index 25b0049b5c..9b2f2e4eb7 100644 --- a/applications/drive/src/app/store/_bookmarks/index.ts +++ b/applications/drive/src/app/store/_bookmarks/index.ts @@ -1,2 +1 @@ -export * from './interface'; export { useBookmarksActions } from './useBookmarksActions'; diff --git a/applications/drive/src/app/store/_bookmarks/interface.ts b/applications/drive/src/app/store/_bookmarks/interface.ts deleted file mode 100644 index 81f1cfea26..0000000000 --- a/applications/drive/src/app/store/_bookmarks/interface.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { SharedURLInfo } from '@proton/shared/lib/interfaces/drive/sharing'; - -export interface Bookmark { - encryptedUrlPasword: string; - createTime: number; - token: SharedURLInfo; -} diff --git a/applications/drive/src/app/store/_crypto/driveCrypto.ts b/applications/drive/src/app/store/_crypto/driveCrypto.ts index 23774782da..1286f82cc0 100644 --- a/applications/drive/src/app/store/_crypto/driveCrypto.ts +++ b/applications/drive/src/app/store/_crypto/driveCrypto.ts @@ -10,12 +10,6 @@ import { splitKeys } from '@proton/shared/lib/keys/keys'; import type { ShareWithKey } from '../_shares'; -export interface PrimaryAddressKey { - privateKey: PrivateKeyReference; - publicKey: PublicKeyReference | undefined; - address: Address; -} - // Special case for drive to allow users with just an external address export const getActiveAddresses = (addresses: Address[]): Address[] => { return addresses.filter(({ Status }) => Status === ADDRESS_STATUS.STATUS_ENABLED); diff --git a/applications/drive/src/app/store/_documents/useOpenDocument.ts b/applications/drive/src/app/store/_documents/useOpenDocument.ts index 050c7a217f..a8d35352f1 100644 --- a/applications/drive/src/app/store/_documents/useOpenDocument.ts +++ b/applications/drive/src/app/store/_documents/useOpenDocument.ts @@ -7,12 +7,12 @@ import { APPS } from '@proton/shared/lib/constants'; * by pressing Bookmark or Make Copy button. The `action` param in the URL will tell us where to pick back up once * we're back in Docs. */ -export enum RedirectAction { +enum RedirectAction { Bookmark = 'bookmark', MakeCopy = 'make-copy', } -export type DocumentAction = +type DocumentAction = | { mode: 'open' | 'convert' | 'download' | 'history'; linkId: string; diff --git a/applications/drive/src/app/store/_downloads/download/downloadBlocks.ts b/applications/drive/src/app/store/_downloads/download/downloadBlocks.ts index 0691271cfd..8ab4d4de4f 100644 --- a/applications/drive/src/app/store/_downloads/download/downloadBlocks.ts +++ b/applications/drive/src/app/store/_downloads/download/downloadBlocks.ts @@ -22,7 +22,7 @@ import { MAX_DOWNLOADING_BLOCKS, MAX_RETRIES_BEFORE_FAIL, TIME_TO_RESET_RETRIES import type { DownloadCallbacks, DownloadStreamControls, LogCallback } from '../interface'; import downloadBlock from './downloadBlock'; -export type DownloadBlocksCallbacks = Omit< +type DownloadBlocksCallbacks = Omit< DownloadCallbacks, 'getBlocks' | 'onInit' | 'onSignatureIssue' | 'getChildren' | 'getKeys' | 'onProgress' > & { diff --git a/applications/drive/src/app/store/_downloads/interface.ts b/applications/drive/src/app/store/_downloads/interface.ts index 7972890a66..74389a17e8 100644 --- a/applications/drive/src/app/store/_downloads/interface.ts +++ b/applications/drive/src/app/store/_downloads/interface.ts @@ -58,7 +58,7 @@ export type DownloadEventCallbacks = { onFinish?: () => void; }; -export type DownloadBaseCallbacks = { +type DownloadBaseCallbacks = { getChildren: GetChildrenCallback; getBlocks: GetBlocksCallback; getKeys: GetKeysCallback; @@ -86,9 +86,9 @@ export type OnSignatureIssueCallback = ( link: LinkDownload, signatureIssues: SignatureIssues ) => Promise; -export type OnScanIssueCallback = (abortSignal: AbortSignal, err: any, response?: ScanResultItem) => Promise; +type OnScanIssueCallback = (abortSignal: AbortSignal, err: any, response?: ScanResultItem) => Promise; export type OnContainsDocumentCallback = (abortSignal: AbortSignal) => Promise; -export type OnErrorCallback = (err: Error) => void; +type OnErrorCallback = (err: Error) => void; export type ChildrenLinkMeta = Pick< DecryptedLink, @@ -124,22 +124,9 @@ export type InitDownloadCallback = ( log: LogCallback, options?: { virusScan?: boolean } ) => DownloadControls; -export type DownloadSignatureIssueModal = React.FunctionComponent; - -interface DownloadSignatureIssueModalProps { - isFile: boolean; - name: string; - downloadName: string; - signatureAddress?: string; - signatureIssues: SignatureIssues; - apply: (strategy: TransferSignatureIssueStrategy, all: boolean) => void; - cancelAll: () => void; -} export enum TransferSignatureIssueStrategy { Abort = 'abort', Continue = 'continue', // Following strategies are not used yet. - DeleteFile = 'delete', - ResignFile = 'resign', } diff --git a/applications/drive/src/app/store/_events/interface.ts b/applications/drive/src/app/store/_events/interface.ts index 7def10d49c..9f05acfc60 100644 --- a/applications/drive/src/app/store/_events/interface.ts +++ b/applications/drive/src/app/store/_events/interface.ts @@ -22,7 +22,7 @@ export type DriveEvent = { originShareId?: string; }; -export type DriveEventData = { +type DriveEventData = { externalInvitationSignup?: string; }; diff --git a/applications/drive/src/app/store/_events/useDriveEventManager.tsx b/applications/drive/src/app/store/_events/useDriveEventManager.tsx index 98e80d3ae1..ceaae9d7e3 100644 --- a/applications/drive/src/app/store/_events/useDriveEventManager.tsx +++ b/applications/drive/src/app/store/_events/useDriveEventManager.tsx @@ -1,4 +1,3 @@ -import type { ReactNode } from 'react'; import { createContext, useContext, useMemo, useRef } from 'react'; import { useApi, useEventManager } from '@proton/components'; @@ -317,9 +316,3 @@ export const useDriveEventManager = () => { } return state; }; - -export type DriveEventManagerProviderProps = { - api: Api; - generalEventManager: EventManager; - children: ReactNode; -}; diff --git a/applications/drive/src/app/store/_links/extendedAttributes.ts b/applications/drive/src/app/store/_links/extendedAttributes.ts index 99793970a3..89973170a0 100644 --- a/applications/drive/src/app/store/_links/extendedAttributes.ts +++ b/applications/drive/src/app/store/_links/extendedAttributes.ts @@ -68,7 +68,7 @@ export interface ParsedExtendedAttributes { }; } -export type MaybeExtendedAttributes = DeepPartial; +type MaybeExtendedAttributes = DeepPartial; export async function encryptFolderExtendedAttributes( modificationTime: Date, diff --git a/applications/drive/src/app/store/_links/interface.ts b/applications/drive/src/app/store/_links/interface.ts index 92850f54ec..ef16c72909 100644 --- a/applications/drive/src/app/store/_links/interface.ts +++ b/applications/drive/src/app/store/_links/interface.ts @@ -86,7 +86,7 @@ export interface LinkShareUrl { numAccesses?: number; } -export interface LinkSharingDetails { +interface LinkSharingDetails { shareUrl?: LinkShareUrl; shareId: string; } diff --git a/applications/drive/src/app/store/_links/useLinksQueue.ts b/applications/drive/src/app/store/_links/useLinksQueue.ts index 3bb5c52407..a40a55e49c 100644 --- a/applications/drive/src/app/store/_links/useLinksQueue.ts +++ b/applications/drive/src/app/store/_links/useLinksQueue.ts @@ -89,5 +89,3 @@ export const useLinksQueue = ({ loadThumbnails }: Props = {}) => { addToQueue, }; }; - -export default useLinksQueue; diff --git a/applications/drive/src/app/store/_search/indexing/processEvent.ts b/applications/drive/src/app/store/_search/indexing/processEvent.ts index c778553d3a..3388a2d974 100644 --- a/applications/drive/src/app/store/_search/indexing/processEvent.ts +++ b/applications/drive/src/app/store/_search/indexing/processEvent.ts @@ -8,8 +8,8 @@ import type { DriveEvent, DriveEvents } from '../../_events'; import type { ESLink } from '../types'; import { createItemId, generateOrder } from '../utils'; -export type SearchEventItem = ESItemEvent; -export type SearchEvent = ESEvent; +type SearchEventItem = ESItemEvent; +type SearchEvent = ESEvent; /** * Formats regular events into a ESEvent batch that will be processed by ES lib diff --git a/applications/drive/src/app/store/_search/indexing/useKeysCache.ts b/applications/drive/src/app/store/_search/indexing/useKeysCache.ts index cf8fb45810..3469040031 100644 --- a/applications/drive/src/app/store/_search/indexing/useKeysCache.ts +++ b/applications/drive/src/app/store/_search/indexing/useKeysCache.ts @@ -5,11 +5,8 @@ import { LinkType } from '@proton/shared/lib/interfaces/drive/link'; import { decryptUnsigned } from '@proton/shared/lib/keys/driveKeys'; import { decryptPassphrase } from '@proton/shared/lib/keys/drivePassphrase'; -export type DecryptAndCacheLink = ( - linkMeta: ShareMapLink, - parentPrivateKey: PrivateKeyReference -) => Promise<{ name: string }>; -export type GetCachedParentPrivateKey = (linkId: string | null) => PrivateKeyReference | undefined; +type DecryptAndCacheLink = (linkMeta: ShareMapLink, parentPrivateKey: PrivateKeyReference) => Promise<{ name: string }>; +type GetCachedParentPrivateKey = (linkId: string | null) => PrivateKeyReference | undefined; export const LINK_KEYS_NOT_FOUND_MESSAGE = "ES Indexing: parent link key wasn't not found."; diff --git a/applications/drive/src/app/store/_shares/interface.ts b/applications/drive/src/app/store/_shares/interface.ts index 15be0f9323..5c40a99df3 100644 --- a/applications/drive/src/app/store/_shares/interface.ts +++ b/applications/drive/src/app/store/_shares/interface.ts @@ -10,7 +10,6 @@ type WithSRPPayload = T & { // Share type string used in metrics context, do not confuse with ShareType enum. export type ShareTypeString = 'main' | 'device' | 'photo' | 'shared'; -export type ShareTypeStringWithPublic = ShareTypeString | 'shared_public'; export enum ShareType { default = 1, @@ -114,23 +113,6 @@ export interface LockedPhotosForRestore extends LockedShareForRestore { shareDecryptedPassphrase: string; shareSessionKey: SessionKey; } - -export interface ShareMemberLEGACY { - memberId: string; - shareId: string; - addressId: string; - addressKeyId: string; - inviter: string; - createTime: number; - modifyTime: number; - permissions: number; - keyPacket: string; - keyPacketSignature: string | null; - sessionKeySignature: string | null; - state: SHARE_MEMBER_STATE; - unlockable: boolean | null; -} - export interface ShareMember { memberId: string; email: string; @@ -175,7 +157,7 @@ export interface ShareInvitationEmailDetails { itemName?: string; } -export interface ShareInvitationShare { +interface ShareInvitationShare { shareId: string; volumeId: string; passphrase: string; @@ -183,7 +165,7 @@ export interface ShareInvitationShare { creatorEmail: string; } -export interface ShareInvitationLink { +interface ShareInvitationLink { linkId: string; name: string; mimeType: string; diff --git a/applications/drive/src/app/store/_uploads/interface.ts b/applications/drive/src/app/store/_uploads/interface.ts index be66257a00..4d71eec549 100644 --- a/applications/drive/src/app/store/_uploads/interface.ts +++ b/applications/drive/src/app/store/_uploads/interface.ts @@ -1,20 +1,7 @@ -import type React from 'react'; - import type { PrivateKeyReference, SessionKey } from '@proton/crypto'; import type { ThumbnailType } from './media'; -export type UploadConflictModal = React.FunctionComponent; - -export interface UploadConflictModalProps { - name: string; - isFolder?: boolean; - originalIsDraft?: boolean; - originalIsFolder?: boolean; - apply: (strategy: TransferConflictStrategy, all: boolean) => void; - cancelAll: () => void; -} - export interface UploadFileControls { start: (progressCallbacks?: UploadFileProgressCallbacks) => Promise; pause: () => void; @@ -65,7 +52,7 @@ export type FileKeys = { sessionKey: SessionKey; }; -export type InitializedFileMeta = { +type InitializedFileMeta = { fileName: string; privateKey: PrivateKeyReference; sessionKey: SessionKey; @@ -124,17 +111,6 @@ export type Link = { url: string; }; -export type BlockTokenHash = { - index: number; - token: string; - hash: Uint8Array; -}; - -export type BlockToken = { - index: number; - token: string; -}; - export type PhotoUpload = { encryptedExif?: string; captureTime: number; diff --git a/applications/drive/src/app/store/_uploads/media/getMediaInfo.ts b/applications/drive/src/app/store/_uploads/media/getMediaInfo.ts index 3147f125f5..d10f9779d0 100644 --- a/applications/drive/src/app/store/_uploads/media/getMediaInfo.ts +++ b/applications/drive/src/app/store/_uploads/media/getMediaInfo.ts @@ -7,7 +7,7 @@ import { ThumbnailType } from './interface'; import { scaleSvgFile } from './svg'; import { getVideoInfo } from './video'; -export interface ThumbnailGenerator { +interface ThumbnailGenerator { ( file: Blob, thumbnailTypes: ThumbnailType[] | never, diff --git a/applications/drive/src/app/store/_views/index.ts b/applications/drive/src/app/store/_views/index.ts index 33298baca4..060a779cea 100644 --- a/applications/drive/src/app/store/_views/index.ts +++ b/applications/drive/src/app/store/_views/index.ts @@ -16,7 +16,7 @@ export { useShareBackgroundActions } from './useShareBackgroundActions'; export { default as useTransfersView } from './useTransfersView'; export { default as useTrashView } from './useTrashView'; export { default as useDevicesView } from './useDevicesView'; -export { default as usePhotosView } from './usePhotosView'; +export { usePhotosView } from './usePhotosView'; export { useBookmarksPublicView } from './useBookmarksPublicView'; export { useBookmarksView } from './useBookmarksView'; export { useInvitationsView } from './useInvitationsView'; diff --git a/applications/drive/src/app/store/_views/useBookmarksPublicView.ts b/applications/drive/src/app/store/_views/useBookmarksPublicView.ts index 307e25d59f..1f42d3fc21 100644 --- a/applications/drive/src/app/store/_views/useBookmarksPublicView.ts +++ b/applications/drive/src/app/store/_views/useBookmarksPublicView.ts @@ -9,7 +9,7 @@ import { Actions, countActionWithTelemetry } from '../../utils/telemetry'; import { useBookmarks } from '../_bookmarks/useBookmarks'; import { usePublicSessionUser } from '../_user'; -export interface Props { +interface Props { customPassword?: string; } diff --git a/applications/drive/src/app/store/_views/useLinkPath.tsx b/applications/drive/src/app/store/_views/useLinkPath.tsx index 0e25dfc96d..a4d2af6aed 100644 --- a/applications/drive/src/app/store/_views/useLinkPath.tsx +++ b/applications/drive/src/app/store/_views/useLinkPath.tsx @@ -7,7 +7,7 @@ import useLinksState from '../_links/useLinksState'; import { ShareType, useShare } from '../_shares'; import { isLinkReadOnly } from './utils/useIsActiveLinkReadOnly'; -export type PathItem = { +type PathItem = { linkId: string; name: string; isRoot: boolean; diff --git a/applications/drive/src/app/store/_views/usePhotosView.ts b/applications/drive/src/app/store/_views/usePhotosView.ts index b20c1c0172..5e64507aeb 100644 --- a/applications/drive/src/app/store/_views/usePhotosView.ts +++ b/applications/drive/src/app/store/_views/usePhotosView.ts @@ -219,5 +219,3 @@ export const usePhotosView = () => { isLoading, }; }; - -export default usePhotosView; diff --git a/applications/drive/src/app/store/_views/utils/useIsActiveLinkReadOnly.ts b/applications/drive/src/app/store/_views/utils/useIsActiveLinkReadOnly.ts index d8ce93380c..23b9d92702 100644 --- a/applications/drive/src/app/store/_views/utils/useIsActiveLinkReadOnly.ts +++ b/applications/drive/src/app/store/_views/utils/useIsActiveLinkReadOnly.ts @@ -1,7 +1,7 @@ import { useEffect, useRef, useState } from 'react'; import { ShareType } from '../..'; -import useActiveShare from '../../../hooks/drive/useActiveShare'; +import { useActiveShare } from '../../../hooks/drive/useActiveShare'; import { isIgnoredError, sendErrorReport } from '../../../utils/errorHandling'; import type { DecryptedLink } from '../../_links'; import { useLink } from '../../_links'; diff --git a/applications/drive/src/app/store/_views/utils/useSortingDevices.ts b/applications/drive/src/app/store/_views/utils/useSortingDevices.ts index d15e3441dd..23465155f9 100644 --- a/applications/drive/src/app/store/_views/utils/useSortingDevices.ts +++ b/applications/drive/src/app/store/_views/utils/useSortingDevices.ts @@ -84,7 +84,7 @@ function sortParamsToSortConfig({ sortField, sortOrder: direction }: SortParams) function getNameSortConfig(direction = SORT_DIRECTION.ASC) { return { - key: 'name' as SortField, + key: 'name' as unknown as SortField, direction, compare: (a: string, b: string) => a.localeCompare(b, undefined, { numeric: true }), }; diff --git a/applications/drive/src/app/store/_volumes/useVolumesState.tsx b/applications/drive/src/app/store/_volumes/useVolumesState.tsx index 53c367f014..f45ae96976 100644 --- a/applications/drive/src/app/store/_volumes/useVolumesState.tsx +++ b/applications/drive/src/app/store/_volumes/useVolumesState.tsx @@ -5,7 +5,7 @@ import { captureMessage } from '@proton/shared/lib/helpers/sentry'; /** * volumeId -> [shareId01, shareId02] */ -export type VolumesState = Map>; +type VolumesState = Map>; /** * Stores volume -> share associations. diff --git a/applications/drive/src/app/store/index.ts b/applications/drive/src/app/store/index.ts index f39084f688..e49727e72e 100644 --- a/applications/drive/src/app/store/index.ts +++ b/applications/drive/src/app/store/index.ts @@ -30,4 +30,3 @@ export { useSearchLibrary } from './_search'; export { usePhotos, usePhotosRecovery, isDecryptedLink } from './_photos'; export * from './_photos/interface'; export { useBookmarksActions } from './_bookmarks'; -export * from './_bookmarks/interface'; diff --git a/applications/drive/src/app/utils/file.ts b/applications/drive/src/app/utils/file.ts deleted file mode 100644 index 4e14f5ae6f..0000000000 --- a/applications/drive/src/app/utils/file.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { MB } from '@proton/shared/lib/drive/constants'; - -export const isFile = async (item: File) => { - if (item.type !== '' || item.size > MB) { - return true; - } - - return new Promise((resolve, reject) => { - const reader = new FileReader(); - reader.onload = ({ target }) => { - if (!target?.result) { - return reject(); - } - resolve(); - }; - reader.onerror = reject; - reader.onabort = reject; - reader.readAsBinaryString(item); - }) - .then(() => true) - .catch(() => false); -}; - -export const countFilesToUpload = ( - files: - | FileList - | { - path: string[]; - file?: File | undefined; - }[] -) => { - let count = 0; - for (const entry of files) { - const file = 'path' in entry ? entry.file : entry; - if (file) { - count += 1; - } - } - return count; -}; diff --git a/applications/drive/src/app/utils/publicRedirectSpotlight.ts b/applications/drive/src/app/utils/publicRedirectSpotlight.ts index 8d9af57171..a080c37f7e 100644 --- a/applications/drive/src/app/utils/publicRedirectSpotlight.ts +++ b/applications/drive/src/app/utils/publicRedirectSpotlight.ts @@ -6,7 +6,7 @@ // - "shown": Spotlight has been shown for this user export const PUBLIC_SHARE_REDIRECT_SPOTLIGHT_KEY = 'public-share-redirect-spotlight'; -export enum PublicShareRedirectSpotlightStatus { +enum PublicShareRedirectSpotlightStatus { Pending = 'pending', Shown = 'shown', } diff --git a/applications/drive/src/app/utils/telemetry.ts b/applications/drive/src/app/utils/telemetry.ts index d25b9659cf..0daf1db58c 100644 --- a/applications/drive/src/app/utils/telemetry.ts +++ b/applications/drive/src/app/utils/telemetry.ts @@ -23,8 +23,6 @@ export enum ExperimentGroup { export enum Features { mountToFirstItemRendered = 'mountToFirstItemRendered', - totalSizeComputation = 'totalSizeComputation', - sharingLoadLinksByVolume = 'sharingLoadLinksByVolume', } /** diff --git a/applications/drive/src/app/utils/test/shareMapLink.ts b/applications/drive/src/app/utils/test/shareMapLink.ts deleted file mode 100644 index b5ea1adeb6..0000000000 --- a/applications/drive/src/app/utils/test/shareMapLink.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { LinkType } from '@proton/shared/lib/interfaces/drive/link'; - -export const linkMock = { - CreateTime: 123456, - Hash: '', - Index: 0, - LinkID: 'link-mock-id-1', - MIMEType: '', - ModifyTime: 1234, - Name: '', - ParentLinkID: 'link-mock-id-1', - Size: 123, - State: 0, - Type: LinkType.FOLDER, -}; -- 2.11.4.GIT