index
int64
0
0
repo_id
stringlengths
16
181
file_path
stringlengths
28
270
content
stringlengths
1
11.6M
__index_level_0__
int64
0
10k
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/containers/SharedLinksContainer.tsx
import { Redirect, Route, RouteComponentProps, Switch } from 'react-router-dom'; import SharedLinksView from '../components/sections/SharedLinks/SharedLinksView'; const SharedLinksContainer = ({ match }: RouteComponentProps) => { return ( <Switch> <Route path={match.url} exact component={Share...
3,000
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/containers/TrashContainer.tsx
import { Redirect, Route, RouteComponentProps, Switch } from 'react-router-dom'; import TrashView from '../components/sections/Trash/TrashView'; const TrashContainer = ({ match }: RouteComponentProps) => { return ( <Switch> <Route path={match.url} exact component={TrashView} /> <Re...
3,001
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/hooks
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/hooks/drive/useActiveShare.tsx
import { createContext, useCallback, useContext, useState } from 'react'; import * as React from 'react'; export type DriveFolder = { shareId: string; linkId: string }; interface ActiveShareProviderState { activeShareId: string; activeFolder: DriveFolder; setFolder: (folder: DriveFolder) => void; setD...
3,002
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/hooks
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/hooks/drive/useDebug.tsx
import { useLocalState } from '@proton/components/hooks'; /** * Reads a flag from local storage, if found returns true */ export const useDebug = () => { const [debug] = useLocalState(false, 'proton-drive-debug'); return Boolean(debug); };
3,003
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/hooks
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/hooks/drive/useDesktopDownloads.test.tsx
import { expect, jest } from '@jest/globals'; import { renderHook } from '@testing-library/react-hooks'; import { fetchDesktopVersion } from '@proton/shared/lib/apps/desktopVersions'; import { appPlatforms } from '../../utils/appPlatforms'; import useDesktopDownloads from './useDesktopDownloads'; jest.mock('@proton/...
3,004
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/hooks
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/hooks/drive/useDesktopDownloads.tsx
import { useEffect, useState } from 'react'; import useLoading from '@proton/hooks/useLoading'; import isTruthy from '@proton/utils/isTruthy'; import { PlatformInfo, appPlatforms, fetchDesktopDownloads } from '../../utils/appPlatforms'; type PlatformDownload = PlatformInfo & { url?: string; startDownload?: (...
3,005
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/hooks
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/hooks/drive/useDriveDragMove.tsx
import { useRef, useState } from 'react'; import * as React from 'react'; import { c } from 'ttag'; import { useGlobalLoader } from '@proton/components'; import { CUSTOM_DATA_FORMAT } from '@proton/shared/lib/drive/constants'; import isTruthy from '@proton/utils/isTruthy'; import noop from '@proton/utils/noop'; impo...
3,006
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/hooks
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/hooks/drive/useFolderContainerTitle.tsx
import { DriveSectionRouteProps } from '../../components/sections/Drive/DriveView'; import { useLinkName } from '../../store/_views/utils'; export const useFolderContainerTitle = ({ params, setAppTitle, }: { params: DriveSectionRouteProps; setAppTitle: (title?: string) => void; }) => { const name =...
3,007
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/hooks
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/hooks/drive/useNavigate.ts
import { useCallback } from 'react'; import { useHistory, useLocation } from 'react-router-dom'; import { generateUID } from '@proton/components'; import { toLinkURLType } from '../../components/sections/helpers'; interface NavigationEvenListener { id: string; run: () => void; } let listeners: NavigationEve...
3,008
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/hooks
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/hooks/drive/usePublicToken.tsx
import { useMemo } from 'react'; import { useLocation } from 'react-router-dom'; export default function usePublicToken() { const { pathname, hash } = useLocation(); const token = useMemo(() => pathname.replace(/\/urls\/?/, ''), [pathname]); const urlPassword = useMemo(() => hash.replace('#', ''), [hash]);...
3,009
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/hooks
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/hooks/util/useOnScrollEnd.ts
import { MutableRefObject, useEffect } from 'react'; import { useElementRect } from '@proton/components'; const isScrollEnd = (target: HTMLElement | null, offsetRatio: number) => target && target.scrollHeight - target.scrollTop <= target.clientHeight / offsetRatio; function useOnScrollEnd( callback: () => vo...
3,010
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/hooks
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/hooks/util/useQueuedFunction.ts
import { useCache } from '@proton/components'; import noop from '@proton/utils/noop'; type FunctionQueue<R> = [number, (() => Promise<R>)[]]; /** * Puts function execution into a queue with a threshold of maximum active functions processing at once */ const useQueuedFunction = () => { const cache = useCache(); ...
3,011
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/hooks
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/hooks/util/useShiftKey.ts
import { useEffect, useRef } from 'react'; export const useShiftKey = () => { const shiftRef = useRef(false); useEffect(() => { const onKeyDown = (e: KeyboardEvent) => { if (e.key === 'Shift') { shiftRef.current = true; } }; const onKeyUp = (e: K...
3,012
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/DriveProvider.tsx
import { ReactNode } from 'react'; import { PublicSessionProvider } from './_api'; import { DevicesProvider } from './_devices'; import { DownloadsProvider, PublicDownloadsProvider } from './_downloads'; import { DriveEventManagerProvider } from './_events'; import { LinksProvider, PublicLinksProvider } from './_links...
3,013
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/architecture.md
# Drive Architecture The main Drive logic, where all the magic happens. The app has several states which are automatically updated using an event loop and all possible actions available. The idea is to keep the implementation details hidden from the outside and export friendly interfaces to be used in simple enough R...
3,014
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/index.ts
export { DriveProvider, PublicDriveProvider } from './DriveProvider'; export { useActions } from './_actions'; export { usePublicAuth } from './_api'; export { useDriveEventManager } from './_events'; export { validateLinkNameField, formatLinkName, splitLinkName } from './_links'; export { useRevisions } from './_revi...
3,015
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_actions/index.ts
export { default as useActions } from './useActions';
3,016
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_actions/interface.ts
export type LinkInfo = { parentLinkId: string; linkId: string; rootShareId: string; name: string; isFile: boolean; };
3,017
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_actions/useActions.tsx
import { c, msgid } from 'ttag'; import { useConfirmActionModal, useNotifications } from '@proton/components'; import { VERIFICATION_STATUS } from '@proton/crypto'; import { getIsConnectionIssue } from '@proton/shared/lib/api/helpers/apiErrorHelper'; import { isSafari, textToClipboard } from '@proton/shared/lib/helper...
3,018
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_actions/useListNotifications.tsx
import { c, msgid } from 'ttag'; import { NotificationButton, useNotifications } from '@proton/components'; import { useErrorHandler } from '../_utils'; import { LinkInfo } from './interface'; export default function useListNotifications() { const { createNotification } = useNotifications(); const { showAggr...
3,019
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_api/index.ts
export { default as useDebouncedRequest } from './useDebouncedRequest'; export { default as usePublicAuth } from './usePublicAuth'; export { default as usePublicSession, PublicSessionProvider } from './usePublicSession'; export * from './transformers';
3,020
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_api/transformers.ts
import { EVENT_TYPES } from '@proton/shared/lib/drive/constants'; import { isMainShare } from '@proton/shared/lib/drive/utils/share'; import type { DevicePayload } from '@proton/shared/lib/interfaces/drive/device'; import type { DriveEventsResult } from '@proton/shared/lib/interfaces/drive/events'; import { DriveFileRe...
3,021
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_api/useDebouncedRequest.ts
import { useApi } from '@proton/components'; import { useDebouncedFunction } from '../_utils'; export default function useDebouncedRequest() { const api = useApi(); const debouncedFunction = useDebouncedFunction(); const debouncedRequest = <T>(args: object, abortSignal?: AbortSignal): Promise<T> => { ...
3,022
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_api/usePublicAuth.ts
import { useEffect, useState } from 'react'; import { c } from 'ttag'; import { useNotifications } from '@proton/components'; import { useLoading } from '@proton/hooks'; import { getApiError } from '@proton/shared/lib/api/helpers/apiErrorHelper'; import { HTTP_STATUS_CODE } from '@proton/shared/lib/constants'; import...
3,023
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_api/usePublicSession.tsx
import { createContext, useContext, useRef, useState } from 'react'; import { useApi } from '@proton/components'; import { queryInitSRPHandshake, queryShareURLAuth } from '@proton/shared/lib/api/drive/sharing'; import { getApiError } from '@proton/shared/lib/api/helpers/apiErrorHelper'; import { HTTP_ERROR_CODES } fro...
3,024
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_crypto/driveCrypto.ts
import { PrivateKeyReference, PublicKeyReference, toPublicKeyReference } from '@proton/crypto'; import { ADDRESS_STATUS } from '@proton/shared/lib/constants'; import { canonicalizeInternalEmail } from '@proton/shared/lib/helpers/email'; import { DecryptedKey } from '@proton/shared/lib/interfaces'; import { Address } fr...
3,025
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_crypto/index.ts
export { default as useDriveCrypto } from './useDriveCrypto';
3,026
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_crypto/useDriveCrypto.ts
import { useCallback } from 'react'; import { c } from 'ttag'; import { useAuthentication, useGetAddressKeys, useGetAddresses, useNotifications } from '@proton/components'; import { PrivateKeyReference } from '@proton/crypto'; import { ADDRESS_STATUS } from '@proton/shared/lib/constants'; import { Address } from '@pr...
3,027
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_devices/index.ts
export { default as useDevicesListing, DevicesListingProvider as DevicesProvider } from './useDevicesListing'; export * from './interface';
3,028
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_devices/interface.ts
export interface Device { id: string; volumeId: string; shareId: string; linkId: string; name: string; modificationTime: number; haveLegacyName: boolean; } export type DevicesState = { [deviceId: string]: Device; };
3,029
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_devices/useDevicesActions.ts
import { useApi, usePreventLeave } from '@proton/components'; import { queryDeviceDeletion, queryDeviceRename } from '@proton/shared/lib/api/drive/devices'; import useDevicesListing from './useDevicesListing'; /** * useDevicesActions provides actions for manipulating with devices. */ export default function useDevi...
3,030
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_devices/useDevicesApi.ts
import { queryDevices } from '@proton/shared/lib/api/drive/devices'; import { DevicesResult } from '@proton/shared/lib/interfaces/drive/device'; import { deviceInfoToDevices, useDebouncedRequest } from '../_api'; import { DevicesState } from './interface'; export default function useDevicesApi() { const debounced...
3,031
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_devices/useDevicesListing.test.tsx
import { act, renderHook } from '@testing-library/react-hooks'; import { sendErrorReport } from '../../utils/errorHandling'; import { VolumesStateProvider } from '../_volumes/useVolumesState'; import { Device } from './interface'; import { useDevicesListingProvider } from './useDevicesListing'; const SHARE_ID_0 = 'sh...
3,032
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_devices/useDevicesListing.tsx
import { createContext, useContext, useEffect, useState } from 'react'; import { c } from 'ttag'; import { useNotifications } from '@proton/components/hooks'; import { useLoading } from '@proton/hooks'; import { sendErrorReport } from '../../utils/errorHandling'; import { useLink } from '../_links'; import { useVolu...
3,033
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads/ThumbnailDownloadProvider.tsx
import React, { createContext, useContext, useEffect, useMemo, useRef } from 'react'; import { VERIFICATION_STATUS } from '@proton/crypto'; import { MAX_THREADS_PER_DOWNLOAD } from '@proton/shared/lib/drive/constants'; import useNavigate from '../../hooks/drive/useNavigate'; import { logError } from '../../utils/erro...
3,034
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads/architecture.md
# Download Architecture The download code itself is in the download subfolder. There is the code to download only one block, blocks of one file, recursively the whole folder, or the selection of files in the folder (at least that is limited by GUI, technically speaking, there is no limit to download files from differe...
3,035
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads/constants.ts
/** * MAX_DOWNLOADING_BLOCKS limits the number of blocks in the buffer of one file * transfer before asking API for next blocks. */ export const MAX_DOWNLOADING_BLOCKS = 10; /** * MAX_DOWNLOADING_BLOCKS_LOAD limits the number of blocks in the buffer for * all download transfers. Once this is reached, no other dow...
3,036
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads/index.tsx
import { VERIFICATION_STATUS } from '@proton/srp/lib/constants'; import { DownloadProvider } from './DownloadProvider'; import { ThumbnailsDownloadProvider } from './ThumbnailDownloadProvider'; import useDownload from './useDownload'; import usePublicDownload from './usePublicDownload'; export { useDownloadProvider }...
3,037
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads/interface.ts
import { ReadableStream } from 'web-streams-polyfill'; import { PrivateKeyReference, PublicKeyReference, SessionKey } from '@proton/crypto'; import { DriveFileBlock } from '@proton/shared/lib/interfaces/drive/file'; import { DecryptedLink, SignatureIssues } from '../_links'; export interface LinkDownload { isFil...
3,038
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads/useDownload.ts
import { c } from 'ttag'; import { ReadableStream } from 'web-streams-polyfill'; import { queryFileRevision, queryFileRevisionThumbnail } from '@proton/shared/lib/api/drive/files'; import { DriveFileBlock, DriveFileRevisionResult, DriveFileRevisionThumbnailResult, } from '@proton/shared/lib/interfaces/driv...
3,039
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads/usePublicDownload.ts
import { ReadableStream } from 'web-streams-polyfill'; import { querySharedURLFileRevision } from '@proton/shared/lib/api/drive/sharing'; import { DriveFileBlock } from '@proton/shared/lib/interfaces/drive/file'; import { SharedURLRevision, ThumbnailURLInfo } from '@proton/shared/lib/interfaces/drive/sharing'; import...
3,040
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads/DownloadProvider/DownloadProvider.tsx
import { createContext, useContext } from 'react'; import * as React from 'react'; import { TransferProgresses } from '../../../components/TransferManager/transfer'; import { InitDownloadCallback, LinkDownload } from '../interface'; import { Download, DownloadLinksProgresses, UpdateFilter } from './interface'; import ...
3,041
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads/DownloadProvider/index.ts
export { DownloadProvider, useDownloadProvider } from './DownloadProvider';
3,042
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads/DownloadProvider/interface.ts
import { VERIFICATION_STATUS } from '@proton/crypto'; import { TransferMeta, TransferState } from '../../../components/TransferManager/transfer'; import { LinkDownload } from '../interface'; export interface Download { // ID of the download for referencing (such as pausing and so on). id: string; links: ...
3,043
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads/DownloadProvider/useDownloadControl.test.ts
import { act, renderHook } from '@testing-library/react-hooks'; import { FILE_CHUNK_SIZE, SupportedMimeTypes } from '@proton/shared/lib/drive/constants'; import { TransferState } from '../../../components/TransferManager/transfer'; import { LinkDownload } from '../interface'; import { Download } from './interface'; i...
3,044
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads/DownloadProvider/useDownloadControl.ts
import { useCallback, useRef } from 'react'; import { FILE_CHUNK_SIZE } from '@proton/shared/lib/drive/constants'; import { TransferState } from '../../../components/TransferManager/transfer'; import { isTransferFinished, isTransferPending, isTransferProgress } from '../../../utils/transfer'; import { DownloadControl...
3,045
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads/DownloadProvider/useDownloadProvider.tsx
import { useCallback, useEffect } from 'react'; import { c } from 'ttag'; import { useNotifications, useOnline, usePreventLeave } from '@proton/components'; import { HTTP_ERROR_CODES } from '@proton/shared/lib/errors'; import { TransferState } from '../../../components/TransferManager/transfer'; import { useDownload...
3,046
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads/DownloadProvider/useDownloadQueue.test.ts
import { act, renderHook } from '@testing-library/react-hooks'; import { TransferState } from '../../../components/TransferManager/transfer'; import { LinkDownload } from '../interface'; import { Download, UpdateCallback, UpdateData, UpdateFilter, UpdateState } from './interface'; import useDownloadQueue from './useDo...
3,047
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads/DownloadProvider/useDownloadQueue.ts
import { useCallback, useMemo, useState } from 'react'; import { c } from 'ttag'; import { generateUID } from '@proton/components'; import { SupportedMimeTypes } from '@proton/shared/lib/drive/constants'; import { TransferMeta, TransferState } from '../../../components/TransferManager/transfer'; import { isTransferF...
3,048
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads/DownloadProvider/useDownloadSignatureIssue.tsx
import { useCallback, useEffect, useRef, useState } from 'react'; import { TransferCancel, TransferState } from '../../../components/TransferManager/transfer'; import { useSignatureIssueModal } from '../../../components/modals/SignatureIssueModal'; import { waitUntil } from '../../../utils/async'; import { isTransferA...
3,049
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads/download/archiveGenerator.test.ts
import { fromUnixTime } from 'date-fns'; import { ReadableStream } from 'web-streams-polyfill'; import { asyncGeneratorToArray } from '../../../utils/test/generator'; import ArchiveGenerator from './archiveGenerator'; type TestLink = { isFile: boolean; name: string; fileModifyTime?: number; path?: str...
3,050
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads/download/archiveGenerator.ts
import { makeZip } from 'client-zip'; import { fromUnixTime } from 'date-fns'; import { ReadableStream, TransformStream } from 'web-streams-polyfill'; import { isWindows } from '@proton/shared/lib/helpers/browser'; import { adjustName, adjustWindowsLinkName, splitLinkName } from '../../_links'; import { StartedNested...
3,051
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads/download/concurrentIterator.test.ts
import { FILE_CHUNK_SIZE } from '@proton/shared/lib/drive/constants'; import { wait } from '@proton/shared/lib/helpers/promise'; import { asyncGeneratorToArray } from '../../../utils/test/generator'; import { MAX_DOWNLOADING_BLOCKS_LOAD, MAX_DOWNLOADING_FILES_LOAD } from '../constants'; import { DownloadCallbacks } fr...
3,052
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads/download/concurrentIterator.ts
import { generateUID } from '@proton/components'; import { FILE_CHUNK_SIZE } from '@proton/shared/lib/drive/constants'; import { waitUntil } from '../../../utils/async'; import { MAX_DOWNLOADING_BLOCKS_LOAD, MAX_DOWNLOADING_FILES_LOAD } from '../constants'; import { DownloadCallbacks, DownloadStreamControls } from '.....
3,053
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads/download/download.ts
import { SupportedMimeTypes } from '@proton/shared/lib/drive/constants'; import { TransferCancel } from '../../../components/TransferManager/transfer'; import fileSaver from '../fileSaver/fileSaver'; import { DownloadCallbacks, DownloadControls, DownloadStreamControls, LinkDownload } from '../interface'; import initDo...
3,054
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads/download/downloadBlock.test.js
import downloadBlock from './downloadBlock'; describe('download block', () => { it('waits specified time when rate limited', async () => { const mockFetch = jest.fn(() => { // Fail only once. if (mockFetch.mock.calls.length === 1) { return Promise.resolve({ ...
3,055
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads/download/downloadBlock.ts
import { createReadableStreamWrapper } from '@mattiasbuelens/web-streams-adapter'; import { ReadableStream } from 'web-streams-polyfill'; import { retryHandler } from '@proton/shared/lib/api/helpers/retryHandler'; import { getClientID } from '@proton/shared/lib/apps/helper'; import { HTTP_STATUS_CODE } from '@proton/s...
3,056
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads/download/downloadBlocks.test.ts
import { ReadableStream } from 'web-streams-polyfill'; import { createApiError, createOfflineError } from '@proton/shared/lib/fetch/ApiError'; import { DriveFileBlock } from '@proton/shared/lib/interfaces/drive/file'; import mergeUint8Arrays from '@proton/utils/mergeUint8Arrays'; import { TransferCancel } from '../.....
3,057
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads/download/downloadBlocks.ts
import { c } from 'ttag'; import { ReadableStream } from 'web-streams-polyfill'; import { getIsConnectionIssue } from '@proton/shared/lib/api/helpers/apiErrorHelper'; import { HTTP_STATUS_CODE } from '@proton/shared/lib/constants'; import { BATCH_REQUEST_SIZE, MAX_THREADS_PER_DOWNLOAD, RESPONSE_CODE } from '@proton/sh...
3,058
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads/download/downloadLinkFile.ts
// @ts-ignore missing `toStream` TS definitions import { readToEnd, toStream } from '@openpgp/web-stream-tools'; import { ReadableStream } from 'web-streams-polyfill'; import { CryptoProxy, VERIFICATION_STATUS } from '@proton/crypto'; import { generateContentHash } from '@proton/shared/lib/keys/driveKeys'; import { D...
3,059
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads/download/downloadLinkFolder.test.ts
import { ChildrenLinkMeta, LinkDownload } from '../interface'; import { FolderTreeLoader } from './downloadLinkFolder'; type Tree = { [linkId: string]: Tree | number; }; /** * Key is linkId and name. * Value is either * - object representing folder's children, * - or number representing file's size. */ con...
3,060
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads/download/downloadLinkFolder.ts
import { c } from 'ttag'; import { RESPONSE_CODE } from '@proton/shared/lib/drive/constants'; import { wait } from '@proton/shared/lib/helpers/promise'; import { TransferCancel } from '../../../components/TransferManager/transfer'; import { ValidationError } from '../../../utils/errorHandling/ValidationError'; import...
3,061
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads/download/downloadLinks.ts
import { sendErrorReport } from '../../../utils/errorHandling'; import { DownloadCallbacks, DownloadStreamControls, GetChildrenCallback, LinkDownload, OnInitCallback, OnProgressCallback, OnSignatureIssueCallback, } from '../interface'; import ArchiveGenerator from './archiveGenerator'; impor...
3,062
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads/download/downloadThumbnail.ts
// @ts-ignore missing `toStream` TS defs import { readToEnd, toStream } from '@openpgp/web-stream-tools'; import { ReadableStream } from 'web-streams-polyfill'; import { CryptoProxy, VERIFICATION_STATUS } from '@proton/crypto'; import { streamToBuffer } from '../../../utils/stream'; import { DecryptFileKeys } from '....
3,063
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads/download/interface.ts
import { ReadableStream } from 'web-streams-polyfill'; import { LinkDownload } from '../interface'; export type NestedLinkDownload = LinkDownload & { parentLinkIds: string[]; parentPath: string[]; }; export type StartedNestedLinkDownload = | { isFile: false; name: string; pa...
3,064
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads/fileSaver/download.ts
import { WritableStream } from 'web-streams-polyfill'; import { PUBLIC_PATH } from '@proton/shared/lib/constants'; import { isEdge, isEdgeChromium, isIos, isSafari } from '@proton/shared/lib/helpers/browser'; import { stripLeadingAndTrailingSlash } from '@proton/shared/lib/helpers/string'; import { TransferMeta } fro...
3,065
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads/fileSaver/downloadSW.ts
declare const self: ServiceWorkerGlobalScope; interface DownloadConfig { stream: ReadableStream<Uint8Array>; filename: string; mimeType: string; size?: number; } const SECURITY_HEADERS = { 'Content-Security-Policy': "default-src 'none'", 'X-Content-Security-Policy': "default-src 'none'", '...
3,066
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads/fileSaver/fileSaver.ts
import { ReadableStream } from 'web-streams-polyfill'; import { MEMORY_DOWNLOAD_LIMIT } from '@proton/shared/lib/drive/constants'; import downloadFile from '@proton/shared/lib/helpers/downloadFile'; import { TransferCancel, TransferMeta } from '../../../components/TransferManager/transfer'; import { isValidationError...
3,067
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_events/index.ts
export * from './interface'; export { DriveEventManagerProvider, useDriveEventManager } from './useDriveEventManager';
3,068
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_events/interface.ts
import { EVENT_TYPES } from '@proton/shared/lib/drive/constants'; import { EncryptedLink } from '../_links'; export type EventHandler = (volumeId: string, events: DriveEvents) => Promise<void> | void; export interface DriveEvents { eventId: string; events: DriveEvent[]; refresh: boolean; } export type D...
3,069
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_events/useDriveEventManager.test.ts
import { act } from 'react-dom/test-utils'; import { RenderResult, renderHook } from '@testing-library/react-hooks'; import { EVENT_TYPES } from '@proton/shared/lib/drive/constants'; import createEventManager, { EventManager } from '@proton/shared/lib/eventManager/eventManager'; import { Api } from '@proton/shared/li...
3,070
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_events/useDriveEventManager.tsx
import { ReactNode, createContext, useContext, useRef } from 'react'; import { generateUID, useApi, useEventManager } from '@proton/components'; import { queryLatestVolumeEvent, queryVolumeEvents } from '@proton/shared/lib/api/drive/volume'; import createEventManager, { EventManager } from '@proton/shared/lib/eventMan...
3,071
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_links/extendedAttributes.test.ts
import { FILE_CHUNK_SIZE } from '@proton/shared/lib/drive/constants'; import { mockGlobalFile, testFile } from '../../utils/test/file'; import { ExtendedAttributes, ParsedExtendedAttributes, XAttrCreateParams, createFileExtendedAttributes, createFolderExtendedAttributes, parseExtendedAttributes...
3,072
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_links/extendedAttributes.ts
import { CryptoProxy, PrivateKeyReference, PublicKeyReference, VERIFICATION_STATUS } from '@proton/crypto'; import { FILE_CHUNK_SIZE } from '@proton/shared/lib/drive/constants'; import { decryptSigned } from '@proton/shared/lib/keys/driveKeys'; import { DeepPartial } from '../../utils/type/DeepPartial'; export interf...
3,073
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_links/index.tsx
import { LinksKeysProvider } from './useLinksKeys'; import { LinksListingProvider, PublicLinksListingProvider } from './useLinksListing'; import { LinksStateProvider } from './useLinksState'; export * from './interface'; export * from './link'; export * from './validation'; export { encryptFileExtendedAttributes, encr...
3,074
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_links/interface.ts
import { VERIFICATION_STATUS } from '@proton/crypto'; import type { Photo } from '../_photos'; /** * Link should not be used directly. It is general set of attributes * commont for both EncryptedLink and DecryptedLink. */ interface Link { linkId: string; parentLinkId: string; isFile: boolean; name:...
3,075
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_links/link.test.ts
import { adjustName, splitLinkName } from './link'; describe('adjustName', () => { it('should add index to a file with extension', () => { expect(adjustName(3, 'filename', 'ext')).toBe('filename (3).ext'); }); it('should add index to a file without extension', () => { expect(adjustName(3, ...
3,076
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_links/link.ts
import { splitExtension } from '@proton/shared/lib/helpers/file'; import isTruthy from '@proton/utils/isTruthy'; import { EncryptedLink } from './interface'; export const WINDOWS_FORBIDDEN_CHARACTERS = /[<>:"|?*]/; // eslint-disable-next-line no-control-regex export const GLOBAL_FORBIDDEN_CHARACTERS = /\/|\\|[\u0000-...
3,077
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_links/useLink.test.ts
import { act, renderHook } from '@testing-library/react-hooks'; import { RESPONSE_CODE } from '@proton/shared/lib/drive/constants'; import { decryptSigned } from '@proton/shared/lib/keys/driveKeys'; import { decryptPassphrase } from '@proton/shared/lib/keys/drivePassphrase'; import { ShareType } from '../_shares'; im...
3,078
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_links/useLink.ts
import { useRef } from 'react'; import { fromUnixTime, isAfter } from 'date-fns'; import { c } from 'ttag'; import { CryptoProxy, PrivateKeyReference, SessionKey, VERIFICATION_STATUS } from '@proton/crypto'; import { queryFileRevision, queryFileRevisionThumbnail } from '@proton/shared/lib/api/drive/files'; import { q...
3,079
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_links/useLinkActions.ts
import { usePreventLeave } from '@proton/components'; import { CryptoProxy } from '@proton/crypto'; import { queryCreateFolder } from '@proton/shared/lib/api/drive/folder'; import { queryRenameLink } from '@proton/shared/lib/api/drive/share'; import { encryptName, generateLookupHash, generateNodeHashKey, ...
3,080
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_links/useLinks.ts
import { MAX_THREADS_PER_REQUEST } from '@proton/shared/lib/drive/constants'; import runInQueue from '@proton/shared/lib/helpers/runInQueue'; import isTruthy from '@proton/utils/isTruthy'; import { isIgnoredError } from '../../utils/errorHandling'; import { DecryptedLink, EncryptedLink } from './interface'; import use...
3,081
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_links/useLinksActions.test.tsx
import { renderHook } from '@testing-library/react-hooks'; import { RESPONSE_CODE } from '@proton/shared/lib/drive/constants'; import isTruthy from '@proton/utils/isTruthy'; import { VolumesStateProvider } from '../_volumes/useVolumesState'; import { useLinksActions } from './useLinksActions'; jest.mock('@proton/com...
3,082
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_links/useLinksActions.ts
import { usePreventLeave } from '@proton/components'; import { CryptoProxy } from '@proton/crypto'; import { queryDeleteChildrenLinks, queryDeleteTrashedLinks, queryEmptyTrashOfShare, queryRestoreLinks, queryTrashLinks, } from '@proton/shared/lib/api/drive/link'; import { queryMoveLink } from '@prot...
3,083
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_links/useLinksKeys.test.tsx
import { LinksKeys } from './useLinksKeys'; describe('useLinksKeys', () => { let keys: LinksKeys; beforeEach(() => { keys = new LinksKeys(); }); it('returns empty passphrase when not set', () => { keys.setPassphrase('shareId', 'linkId', 'pass'); expect(keys.getPassphrase('shar...
3,084
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_links/useLinksKeys.tsx
import { createContext, useContext } from 'react'; import { PrivateKeyReference, SessionKey } from '@proton/crypto'; type LinksKeysByShare = { [shareId: string]: { [linkId: string]: LinkKeys; }; }; type LinkKeys = FileLinkKeys & FolderLinkKeys; type FileLinkKeys = { passphrase?: string; pass...
3,085
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_links/useLinksQueue.test.tsx
import { act, renderHook } from '@testing-library/react-hooks'; import { useLinksQueue } from './useLinksQueue'; const mockedLoadLinksMeta = jest.fn(); jest.mock('./useLinksListing', () => ({ useLinksListing: () => ({ loadLinksMeta: mockedLoadLinksMeta, }), })); const mockedGetLink = jest.fn(); jest....
3,086
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_links/useLinksQueue.ts
import { MutableRefObject, useEffect, useRef } from 'react'; import { useLinksListing } from './useLinksListing'; import useLinksState from './useLinksState'; type Props = { /** * Whether or not to load thumbnails with the links. */ loadThumbnails?: boolean; }; export const useLinksQueue = ({ loadT...
3,087
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_links/useLinksState.test.tsx
import { act, renderHook } from '@testing-library/react-hooks'; import { EVENT_TYPES } from '@proton/shared/lib/drive/constants'; import { DriveEvents } from '../_events'; import { DecryptedLink, EncryptedLink, LinkShareUrl } from './interface'; import { Link, LinksState, addOrUpdate, deleteLinks, ...
3,088
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_links/useLinksState.tsx
import { createContext, useCallback, useContext, useEffect, useState } from 'react'; import { EVENT_TYPES } from '@proton/shared/lib/drive/constants'; import isTruthy from '@proton/utils/isTruthy'; import { DriveEvents, useDriveEventManager } from '../_events'; import { DecryptedLink, EncryptedLink, LinkShareUrl, Sig...
3,089
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_links/validation.ts
import { c, msgid } from 'ttag'; import { MAX_NAME_LENGTH } from '@proton/shared/lib/drive/constants'; const composeValidators = <T>(validators: ((value: T) => string | undefined)[]) => (value: T) => { for (const validator of validators) { const result = validator(value); if (r...
3,090
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_links
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_links/useLinksListing/index.ts
export { default as useLinksListing, LinksListingProvider } from './useLinksListing'; export { default as usePublicLinksListing, PublicLinksListingProvider } from './usePublicLinksListing';
3,091
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_links
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_links/useLinksListing/interface.ts
import { DecryptedLink } from '../interface'; type LoadLinksMetaOptions = { /** * Whether or not to request thumbnail tokens from the API */ loadThumbnails?: boolean; }; export type FetchLoadLinksMeta = ( abortSignal: AbortSignal, query: string, shareId: string, linkIds: string[], ...
3,092
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_links
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_links/useLinksListing/useLinksListing.test.tsx
import { act, renderHook } from '@testing-library/react-hooks'; import { SORT_DIRECTION } from '@proton/shared/lib/constants'; import { VolumesStateProvider } from '../../_volumes/useVolumesState'; import { EncryptedLink } from '../interface'; import { LinksStateProvider } from '../useLinksState'; import { useLinksLi...
3,093
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_links
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_links/useLinksListing/useLinksListing.tsx
import { createContext, useCallback, useContext, useRef } from 'react'; import { queryFolderChildren } from '@proton/shared/lib/api/drive/folder'; import { queryLinkMetaBatch } from '@proton/shared/lib/api/drive/link'; import { BATCH_REQUEST_SIZE } from '@proton/shared/lib/drive/constants'; import { LinkChildrenResult...
3,094
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_links
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_links/useLinksListing/useLinksListingGetter.test.tsx
import { act, renderHook } from '@testing-library/react-hooks'; import { wait } from '@proton/shared/lib/helpers/promise'; import { VolumesStateProvider } from '../../_volumes/useVolumesState'; import { EncryptedLink } from '../interface'; import { useLinksListingProvider } from './useLinksListing'; jest.mock('../.....
3,095
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_links
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_links/useLinksListing/useLinksListingHelpers.tsx
import { c, msgid } from 'ttag'; import { SORT_DIRECTION } from '@proton/shared/lib/constants'; import { RESPONSE_CODE } from '@proton/shared/lib/drive/constants'; import isTruthy from '@proton/utils/isTruthy'; import { sendErrorReport } from '../../../utils/errorHandling'; import { useErrorHandler, waitFor } from '....
3,096
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_links
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_links/useLinksListing/usePublicLinksListing.tsx
import { createContext, useCallback, useContext, useRef } from 'react'; import { querySharedURLChildren } from '@proton/shared/lib/api/drive/sharing'; import { LinkChildrenResult } from '@proton/shared/lib/interfaces/drive/link'; import { linkMetaToEncryptedLink, usePublicSession } from '../../_api'; import { Decrypt...
3,097
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_links
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_links/useLinksListing/useSharedLinksListing.test.tsx
import { act, renderHook } from '@testing-library/react-hooks'; import { VolumesStateProvider } from '../../_volumes/useVolumesState'; import { LinksStateProvider } from '../useLinksState'; import { PAGE_SIZE } from './useLinksListingHelpers'; import { useSharedLinksListing } from './useSharedLinksListing'; jest.mock...
3,098
0
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_links
petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_links/useLinksListing/useSharedLinksListing.tsx
import { useCallback, useRef } from 'react'; import { queryVolumeSharedLinks } from '@proton/shared/lib/api/drive/volume'; import { ListDriveVolumeSharedLinksPayload } from '@proton/shared/lib/interfaces/drive/volume'; import { useDebouncedRequest } from '../../_api'; import useVolumesState from '../../_volumes/useVo...
3,099