mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-17 16:50:22 +00:00
Use .js(x) for all imports instead .ts(x) (#5573)
This commit is contained in:
parent
820107b954
commit
3e2aa9f3c8
198 changed files with 393 additions and 397 deletions
|
|
@ -438,9 +438,6 @@ module.exports = {
|
|||
'no-restricted-syntax': ['error', {
|
||||
selector: 'ImportDeclaration[source.value=/^@uppy\\x2F[a-z-0-9]+\\x2F/]:not([source.value=/^@uppy\\x2Futils\\x2F/]):not([source.value=/\\.(js|css)$/])',
|
||||
message: 'Use ".js" file extension for import type declarations from a different package',
|
||||
}, {
|
||||
selector: 'ImportDeclaration[importKind="type"][source.value=/^\\.\\.?\\x2F.+\\.js$/]',
|
||||
message: 'Do not use ".js" file extension for relative import type declarations',
|
||||
}, {
|
||||
selector: 'ImportDeclaration[source.value=/^@uppy\\x2Futils\\x2Flib\\x2F.+\\.[mc]?[jt]sx?$/]',
|
||||
message: 'Do not use file extension when importing from @uppy/utils',
|
||||
|
|
|
|||
|
|
@ -9,10 +9,10 @@ import type {
|
|||
import type { Uppy } from '@uppy/core/lib/Uppy.js'
|
||||
|
||||
import getFileTypeExtension from '@uppy/utils/lib/getFileTypeExtension'
|
||||
import supportsMediaRecorder from './supportsMediaRecorder.ts'
|
||||
import RecordingScreen from './RecordingScreen.tsx'
|
||||
import PermissionsScreen from './PermissionsScreen.tsx'
|
||||
import locale from './locale.ts'
|
||||
import supportsMediaRecorder from './supportsMediaRecorder.js'
|
||||
import RecordingScreen from './RecordingScreen.jsx'
|
||||
import PermissionsScreen from './PermissionsScreen.jsx'
|
||||
import locale from './locale.js'
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore We don't want TS to generate types for the package.json
|
||||
import packageJson from '../package.json'
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { h } from 'preact'
|
||||
import type { I18n } from '@uppy/utils/lib/Translator'
|
||||
import formatSeconds from './formatSeconds.ts'
|
||||
import formatSeconds from './formatSeconds.js'
|
||||
|
||||
interface RecordingLengthProps {
|
||||
recordingLengthSeconds: number
|
||||
|
|
|
|||
|
|
@ -2,14 +2,14 @@
|
|||
import { h } from 'preact'
|
||||
import { useEffect, useRef } from 'preact/hooks'
|
||||
import type { I18n } from '@uppy/utils/lib/Translator'
|
||||
import RecordButton from './RecordButton.tsx'
|
||||
import RecordingLength from './RecordingLength.tsx'
|
||||
import RecordButton from './RecordButton.jsx'
|
||||
import RecordingLength from './RecordingLength.jsx'
|
||||
import AudioSourceSelect, {
|
||||
type AudioSourceSelectProps,
|
||||
} from './AudioSourceSelect.tsx'
|
||||
import AudioOscilloscope from './audio-oscilloscope/index.ts'
|
||||
import SubmitButton from './SubmitButton.tsx'
|
||||
import DiscardButton from './DiscardButton.tsx'
|
||||
} from './AudioSourceSelect.jsx'
|
||||
import AudioOscilloscope from './audio-oscilloscope/index.js'
|
||||
import SubmitButton from './SubmitButton.jsx'
|
||||
import DiscardButton from './DiscardButton.jsx'
|
||||
|
||||
interface RecordingScreenProps extends AudioSourceSelectProps {
|
||||
stream: MediaStream | null | undefined
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { describe, expect, it } from 'vitest'
|
||||
import formatSeconds from './formatSeconds.ts'
|
||||
import formatSeconds from './formatSeconds.js'
|
||||
|
||||
describe('formatSeconds', () => {
|
||||
it("should return a value of '0:43' when an argument of 43 seconds is supplied", () => {
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
export { default } from './Audio.tsx'
|
||||
export type { AudioOptions } from './Audio.tsx'
|
||||
export { default } from './Audio.jsx'
|
||||
export type { AudioOptions } from './Audio.jsx'
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/* eslint-disable max-classes-per-file, compat/compat */
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import supportsMediaRecorder from './supportsMediaRecorder.ts'
|
||||
import supportsMediaRecorder from './supportsMediaRecorder.js'
|
||||
|
||||
describe('supportsMediaRecorder', () => {
|
||||
it('should return true if MediaRecorder is supported', () => {
|
||||
|
|
|
|||
|
|
@ -3,11 +3,11 @@ import type {
|
|||
RateLimitedQueue,
|
||||
WrapPromiseFunctionType,
|
||||
} from '@uppy/utils/lib/RateLimitedQueue'
|
||||
import { pausingUploadReason, type Chunk } from './MultipartUploader.ts'
|
||||
import type AwsS3Multipart from './index.ts'
|
||||
import { throwIfAborted } from './utils.ts'
|
||||
import type { UploadPartBytesResult, UploadResult } from './utils.ts'
|
||||
import type { AwsS3MultipartOptions, uploadPartBytes } from './index.ts'
|
||||
import { pausingUploadReason, type Chunk } from './MultipartUploader.js'
|
||||
import type AwsS3Multipart from './index.js'
|
||||
import { throwIfAborted } from './utils.js'
|
||||
import type { UploadPartBytesResult, UploadResult } from './utils.js'
|
||||
import type { AwsS3MultipartOptions, uploadPartBytes } from './index.js'
|
||||
|
||||
function removeMetadataFromURL(urlString: string) {
|
||||
const urlObject = new URL(urlString)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import type { Uppy } from '@uppy/core'
|
||||
import { AbortController } from '@uppy/utils/lib/AbortController'
|
||||
import type { Meta, Body, UppyFile } from '@uppy/utils/lib/UppyFile'
|
||||
import type { HTTPCommunicationQueue } from './HTTPCommunicationQueue.ts'
|
||||
import type { HTTPCommunicationQueue } from './HTTPCommunicationQueue.js'
|
||||
|
||||
const MB = 1024 * 1024
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import {
|
|||
PutObjectCommand,
|
||||
} from '@aws-sdk/client-s3'
|
||||
import { getSignedUrl } from '@aws-sdk/s3-request-presigner'
|
||||
import createSignedURL from './createSignedURL.ts'
|
||||
import createSignedURL from './createSignedURL.js'
|
||||
|
||||
const bucketName = 'some-bucket.with.dots'
|
||||
const s3ClientOptions = {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
|
|||
import 'whatwg-fetch'
|
||||
import nock from 'nock'
|
||||
import Core from '@uppy/core'
|
||||
import AwsS3Multipart, { type AwsBody } from './index.ts'
|
||||
import AwsS3Multipart, { type AwsBody } from './index.js'
|
||||
|
||||
const KB = 1024
|
||||
const MB = KB * KB
|
||||
|
|
|
|||
|
|
@ -14,16 +14,16 @@ import {
|
|||
} from '@uppy/utils/lib/fileFilters'
|
||||
import { createAbortError } from '@uppy/utils/lib/AbortController'
|
||||
import getAllowedMetaFields from '@uppy/utils/lib/getAllowedMetaFields'
|
||||
import MultipartUploader from './MultipartUploader.ts'
|
||||
import { throwIfAborted } from './utils.ts'
|
||||
import MultipartUploader from './MultipartUploader.js'
|
||||
import { throwIfAborted } from './utils.js'
|
||||
import type {
|
||||
UploadResult,
|
||||
UploadResultWithSignal,
|
||||
MultipartUploadResultWithSignal,
|
||||
UploadPartBytesResult,
|
||||
} from './utils.ts'
|
||||
import createSignedURL from './createSignedURL.ts'
|
||||
import { HTTPCommunicationQueue } from './HTTPCommunicationQueue.ts'
|
||||
} from './utils.js'
|
||||
import createSignedURL from './createSignedURL.js'
|
||||
import { HTTPCommunicationQueue } from './HTTPCommunicationQueue.js'
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore We don't want TS to generate types for the package.json
|
||||
import packageJson from '../package.json'
|
||||
|
|
@ -290,7 +290,7 @@ const defaultOptions = {
|
|||
retryDelays: [0, 1000, 3000, 5000],
|
||||
} satisfies Partial<AwsS3MultipartOptions<any, any>>
|
||||
|
||||
export type { AwsBody } from './utils.ts'
|
||||
export type { AwsBody } from './utils.js'
|
||||
|
||||
export default class AwsS3Multipart<
|
||||
M extends Meta,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { createAbortError } from '@uppy/utils/lib/AbortController'
|
||||
import type { Body } from '@uppy/utils/lib/UppyFile'
|
||||
|
||||
import type { AwsS3Part } from './index.ts'
|
||||
import type { AwsS3Part } from './index.js'
|
||||
|
||||
export function throwIfAborted(signal?: AbortSignal | null): void {
|
||||
if (signal?.aborted) {
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import type {
|
|||
UnknownProviderPlugin,
|
||||
UnknownProviderPluginState,
|
||||
} from '@uppy/core/lib/Uppy.js'
|
||||
import locale from './locale.ts'
|
||||
import locale from './locale.js'
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore We don't want TS to generate types for the package.json
|
||||
import packageJson from '../package.json'
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
export { default } from './Box.tsx'
|
||||
export type { BoxOptions } from './Box.tsx'
|
||||
export { default } from './Box.jsx'
|
||||
export type { BoxOptions } from './Box.jsx'
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@ import type {
|
|||
CompanionClientProvider,
|
||||
} from '@uppy/utils/lib/CompanionClientProvider'
|
||||
import type { UnknownProviderPlugin } from '@uppy/core/lib/Uppy.js'
|
||||
import RequestClient, { authErrorStatusCode } from './RequestClient.ts'
|
||||
import type { CompanionPluginOptions } from './index.ts'
|
||||
import { isOriginAllowed } from './getAllowedHosts.ts'
|
||||
import RequestClient, { authErrorStatusCode } from './RequestClient.js'
|
||||
import type { CompanionPluginOptions } from './index.js'
|
||||
import { isOriginAllowed } from './getAllowedHosts.js'
|
||||
|
||||
export interface Opts extends PluginOpts, CompanionPluginOptions {
|
||||
pluginId: string
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { describe, it, expect } from 'vitest'
|
||||
import RequestClient from './RequestClient.ts'
|
||||
import RequestClient from './RequestClient.js'
|
||||
|
||||
describe('RequestClient', () => {
|
||||
it('has a hostname without trailing slash', () => {
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import getSocketHost from '@uppy/utils/lib/getSocketHost'
|
|||
import type Uppy from '@uppy/core'
|
||||
import type { UppyFile, Meta, Body } from '@uppy/utils/lib/UppyFile'
|
||||
import type { RequestOptions } from '@uppy/utils/lib/CompanionClientProvider'
|
||||
import AuthError from './AuthError.ts'
|
||||
import AuthError from './AuthError.js'
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore We don't want TS to generate types for the package.json
|
||||
import packageJson from '../package.json'
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import type { Body, Meta } from '@uppy/utils/lib/UppyFile'
|
||||
import type { Uppy } from '@uppy/core'
|
||||
import type { CompanionClientSearchProvider } from '@uppy/utils/lib/CompanionClientProvider'
|
||||
import RequestClient, { type Opts } from './RequestClient.ts'
|
||||
import RequestClient, { type Opts } from './RequestClient.js'
|
||||
|
||||
const getName = (id: string): string => {
|
||||
return id
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { describe, it, expect } from 'vitest'
|
||||
import getAllowedHosts, { isOriginAllowed } from './getAllowedHosts.ts'
|
||||
import getAllowedHosts, { isOriginAllowed } from './getAllowedHosts.js'
|
||||
|
||||
describe('getAllowedHosts', () => {
|
||||
it('can convert companionAllowedHosts', () => {
|
||||
|
|
|
|||
|
|
@ -2,12 +2,12 @@
|
|||
* Manages communications with Companion
|
||||
*/
|
||||
|
||||
export { default as RequestClient } from './RequestClient.ts'
|
||||
export { default as Provider } from './Provider.ts'
|
||||
export { default as SearchProvider } from './SearchProvider.ts'
|
||||
export { default as RequestClient } from './RequestClient.js'
|
||||
export { default as Provider } from './Provider.js'
|
||||
export { default as SearchProvider } from './SearchProvider.js'
|
||||
|
||||
export { default as getAllowedHosts } from './getAllowedHosts.ts'
|
||||
export { default as getAllowedHosts } from './getAllowedHosts.js'
|
||||
|
||||
export * as tokenStorage from './tokenStorage.ts'
|
||||
export * as tokenStorage from './tokenStorage.js'
|
||||
|
||||
export type { CompanionPluginOptions } from './CompanionPluginOptions.ts'
|
||||
export type { CompanionPluginOptions } from './CompanionPluginOptions.js'
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import Core from '@uppy/core'
|
|||
import getFileNameAndExtension from '@uppy/utils/lib/getFileNameAndExtension'
|
||||
import fs from 'node:fs'
|
||||
import path from 'node:path'
|
||||
import CompressorPlugin from './index.ts'
|
||||
import CompressorPlugin from './index.js'
|
||||
|
||||
// Compressor uses browser canvas API, so need to mock compress()
|
||||
// @ts-expect-error mocked
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import CompressorJS from 'compressorjs'
|
|||
import type { Body, Meta, UppyFile } from '@uppy/utils/lib/UppyFile'
|
||||
import type { DefinePluginOpts, PluginOpts } from '@uppy/core/lib/BasePlugin.js'
|
||||
|
||||
import locale from './locale.ts'
|
||||
import locale from './locale.js'
|
||||
|
||||
declare module '@uppy/core' {
|
||||
export interface UppyEventMap<M extends Meta, B extends Body> {
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ import type {
|
|||
OptionalPluralizeLocale,
|
||||
} from '@uppy/utils/lib/Translator'
|
||||
import type { Body, Meta } from '@uppy/utils/lib/UppyFile'
|
||||
import type { State, UnknownPlugin, Uppy } from './Uppy.ts'
|
||||
import type { State, UnknownPlugin, Uppy } from './Uppy.js'
|
||||
|
||||
export type PluginOpts = {
|
||||
locale?: Locale
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import type { Meta, Body, UppyFile } from '@uppy/utils/lib/UppyFile'
|
||||
import type { Uppy, UppyEventMap, _UppyEventMap } from './Uppy.ts'
|
||||
import type { Uppy, UppyEventMap, _UppyEventMap } from './Uppy.js'
|
||||
|
||||
/**
|
||||
* Create a wrapper around an event emitter with a `remove` method to remove
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import prettierBytes from '@transloadit/prettier-bytes'
|
|||
import match from 'mime-match'
|
||||
import type { Body, Meta, UppyFile } from '@uppy/utils/lib/UppyFile'
|
||||
import type { I18n } from '@uppy/utils/lib/Translator'
|
||||
import type { State, NonNullableUppyOptions } from './Uppy.ts'
|
||||
import type { State, NonNullableUppyOptions } from './Uppy.js'
|
||||
|
||||
export type Restrictions = {
|
||||
maxFileSize: number | null
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { describe, expect, it } from 'vitest'
|
||||
import UIPlugin from './UIPlugin.ts'
|
||||
import Core from './index.ts'
|
||||
import UIPlugin from './UIPlugin.js'
|
||||
import Core from './index.js'
|
||||
|
||||
describe('UIPlugin', () => {
|
||||
describe('getPluginState', () => {
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@ import findDOMElement from '@uppy/utils/lib/findDOMElement'
|
|||
import getTextDirection from '@uppy/utils/lib/getTextDirection'
|
||||
|
||||
import type { Body, Meta } from '@uppy/utils/lib/UppyFile'
|
||||
import BasePlugin from './BasePlugin.ts'
|
||||
import type { PluginOpts } from './BasePlugin.ts'
|
||||
import type { State } from './Uppy.ts'
|
||||
import BasePlugin from './BasePlugin.js'
|
||||
import type { PluginOpts } from './BasePlugin.js'
|
||||
import type { State } from './Uppy.js'
|
||||
|
||||
/**
|
||||
* Defer a frequent call to the microtask queue.
|
||||
|
|
|
|||
|
|
@ -8,21 +8,21 @@ import path from 'node:path'
|
|||
import prettierBytes from '@transloadit/prettier-bytes'
|
||||
import type { Body, Meta } from '@uppy/utils/lib/UppyFile'
|
||||
import type { Locale } from '@uppy/utils/lib/Translator'
|
||||
import Core from './index.ts'
|
||||
import UIPlugin from './UIPlugin.ts'
|
||||
import Core from './index.js'
|
||||
import UIPlugin from './UIPlugin.js'
|
||||
import BasePlugin, {
|
||||
type DefinePluginOpts,
|
||||
type PluginOpts,
|
||||
} from './BasePlugin.ts'
|
||||
import { debugLogger } from './loggers.ts'
|
||||
import AcquirerPlugin1 from './mocks/acquirerPlugin1.ts'
|
||||
import AcquirerPlugin2 from './mocks/acquirerPlugin2.ts'
|
||||
import InvalidPlugin from './mocks/invalidPlugin.ts'
|
||||
import InvalidPluginWithoutId from './mocks/invalidPluginWithoutId.ts'
|
||||
import InvalidPluginWithoutType from './mocks/invalidPluginWithoutType.ts'
|
||||
} from './BasePlugin.js'
|
||||
import { debugLogger } from './loggers.js'
|
||||
import AcquirerPlugin1 from './mocks/acquirerPlugin1.js'
|
||||
import AcquirerPlugin2 from './mocks/acquirerPlugin2.js'
|
||||
import InvalidPlugin from './mocks/invalidPlugin.js'
|
||||
import InvalidPluginWithoutId from './mocks/invalidPluginWithoutId.js'
|
||||
import InvalidPluginWithoutType from './mocks/invalidPluginWithoutType.js'
|
||||
// @ts-expect-error trying to import a file from outside the package
|
||||
import DeepFrozenStore from '../../../../e2e/cypress/fixtures/DeepFrozenStore.mjs'
|
||||
import type { State } from './Uppy.ts'
|
||||
import type { State } from './Uppy.js'
|
||||
|
||||
const sampleImage = fs.readFileSync(
|
||||
// eslint-disable-next-line no-restricted-globals
|
||||
|
|
|
|||
|
|
@ -32,21 +32,21 @@ import type {
|
|||
I18n,
|
||||
OptionalPluralizeLocale,
|
||||
} from '@uppy/utils/lib/Translator'
|
||||
import supportsUploadProgress from './supportsUploadProgress.ts'
|
||||
import getFileName from './getFileName.ts'
|
||||
import { justErrorsLogger, debugLogger } from './loggers.ts'
|
||||
import supportsUploadProgress from './supportsUploadProgress.js'
|
||||
import getFileName from './getFileName.js'
|
||||
import { justErrorsLogger, debugLogger } from './loggers.js'
|
||||
import {
|
||||
Restricter,
|
||||
defaultOptions as defaultRestrictionOptions,
|
||||
RestrictionError,
|
||||
} from './Restricter.ts'
|
||||
} from './Restricter.js'
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore We don't want TS to generate types for the package.json
|
||||
import packageJson from '../package.json'
|
||||
import locale from './locale.ts'
|
||||
import locale from './locale.js'
|
||||
|
||||
import type BasePlugin from './BasePlugin.ts'
|
||||
import type { Restrictions, ValidateableFile } from './Restricter.ts'
|
||||
import type BasePlugin from './BasePlugin.js'
|
||||
import type { Restrictions, ValidateableFile } from './Restricter.js'
|
||||
|
||||
type Processor = (
|
||||
fileIDs: string[],
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
export { default } from './Uppy.ts'
|
||||
export { default } from './Uppy.js'
|
||||
export {
|
||||
default as Uppy,
|
||||
type State,
|
||||
|
|
@ -8,13 +8,13 @@ export {
|
|||
type UploadResult,
|
||||
type UppyEventMap,
|
||||
type UppyOptions,
|
||||
} from './Uppy.ts'
|
||||
export { default as UIPlugin } from './UIPlugin.ts'
|
||||
export { default as BasePlugin } from './BasePlugin.ts'
|
||||
export { debugLogger } from './loggers.ts'
|
||||
} from './Uppy.js'
|
||||
export { default as UIPlugin } from './UIPlugin.js'
|
||||
export { default as BasePlugin } from './BasePlugin.js'
|
||||
export { debugLogger } from './loggers.js'
|
||||
|
||||
export type { Store } from '@uppy/store-default'
|
||||
|
||||
export type { UIPluginOptions } from './UIPlugin.ts'
|
||||
export type { UIPluginOptions } from './UIPlugin.js'
|
||||
|
||||
export type { UppyFile, Meta, Body } from '@uppy/utils/lib/UppyFile'
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { vi } from 'vitest' // eslint-disable-line import/no-extraneous-dependencies
|
||||
import UIPlugin from '../UIPlugin.ts'
|
||||
import type Uppy from '../Uppy.ts'
|
||||
import UIPlugin from '../UIPlugin.js'
|
||||
import type Uppy from '../Uppy.js'
|
||||
|
||||
type mock = ReturnType<typeof vi.fn>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { vi } from 'vitest' // eslint-disable-line import/no-extraneous-dependencies
|
||||
import UIPlugin from '../UIPlugin.ts'
|
||||
import type Uppy from '../Uppy.ts'
|
||||
import UIPlugin from '../UIPlugin.js'
|
||||
import type Uppy from '../Uppy.js'
|
||||
|
||||
type mock = ReturnType<typeof vi.fn>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import UIPlugin from '../UIPlugin.ts'
|
||||
import type Uppy from '../Uppy.ts'
|
||||
import UIPlugin from '../UIPlugin.js'
|
||||
import type Uppy from '../Uppy.js'
|
||||
|
||||
export default class InvalidPluginWithoutName extends UIPlugin<any, any, any> {
|
||||
public type: string
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import UIPlugin from '../UIPlugin.ts'
|
||||
import type Uppy from '../Uppy.ts'
|
||||
import UIPlugin from '../UIPlugin.js'
|
||||
import type Uppy from '../Uppy.js'
|
||||
|
||||
export default class InvalidPluginWithoutType extends UIPlugin<any, any, any> {
|
||||
public id: string
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { describe, expect, it } from 'vitest'
|
||||
import supportsUploadProgress from './supportsUploadProgress.ts'
|
||||
import supportsUploadProgress from './supportsUploadProgress.js'
|
||||
|
||||
describe('supportsUploadProgress', () => {
|
||||
it('returns true in working browsers', () => {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import { expectTypeOf, test } from 'vitest'
|
||||
|
||||
import type { Body, InternalMetadata, Meta } from '@uppy/utils/lib/UppyFile'
|
||||
import Uppy, { type UnknownPlugin } from './Uppy.ts'
|
||||
import UIPlugin, { type UIPluginOptions } from './UIPlugin.ts'
|
||||
import Uppy, { type UnknownPlugin } from './Uppy.js'
|
||||
import UIPlugin, { type UIPluginOptions } from './UIPlugin.js'
|
||||
|
||||
interface Opts extends UIPluginOptions {
|
||||
foo: string
|
||||
|
|
|
|||
|
|
@ -20,14 +20,14 @@ import { defaultPickerIcon } from '@uppy/provider-views'
|
|||
import type { TargetedEvent } from 'preact/compat'
|
||||
import { nanoid } from 'nanoid/non-secure'
|
||||
import memoizeOne from 'memoize-one'
|
||||
import * as trapFocus from './utils/trapFocus.ts'
|
||||
import createSuperFocus from './utils/createSuperFocus.ts'
|
||||
import DashboardUI from './components/Dashboard.tsx'
|
||||
import * as trapFocus from './utils/trapFocus.js'
|
||||
import createSuperFocus from './utils/createSuperFocus.js'
|
||||
import DashboardUI from './components/Dashboard.jsx'
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore We don't want TS to generate types for the package.json
|
||||
import packageJson from '../package.json'
|
||||
import locale from './locale.ts'
|
||||
import locale from './locale.js'
|
||||
|
||||
type GenericEventCallback = () => void
|
||||
export type DashboardFileEditStartCallback<M extends Meta, B extends Body> = (
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/* eslint-disable react/destructuring-assignment */
|
||||
import { h } from 'preact'
|
||||
import classNames from 'classnames'
|
||||
import AddFiles from './AddFiles.tsx'
|
||||
import AddFiles from './AddFiles.jsx'
|
||||
|
||||
type $TSFixMe = any
|
||||
|
||||
|
|
|
|||
|
|
@ -7,14 +7,14 @@ import type { State, UIPlugin, UIPluginOptions, Uppy } from '@uppy/core'
|
|||
import type { I18n } from '@uppy/utils/lib/Translator'
|
||||
import type Translator from '@uppy/utils/lib/Translator'
|
||||
import type { TargetedEvent } from 'preact/compat'
|
||||
import FileList from './FileList.tsx'
|
||||
import AddFiles from './AddFiles.tsx'
|
||||
import AddFilesPanel from './AddFilesPanel.tsx'
|
||||
import PickerPanelContent from './PickerPanelContent.tsx'
|
||||
import EditorPanel from './EditorPanel.tsx'
|
||||
import PanelTopBar from './PickerPanelTopBar.tsx'
|
||||
import FileCard from './FileCard/index.tsx'
|
||||
import Slide from './Slide.tsx'
|
||||
import FileList from './FileList.jsx'
|
||||
import AddFiles from './AddFiles.jsx'
|
||||
import AddFilesPanel from './AddFilesPanel.jsx'
|
||||
import PickerPanelContent from './PickerPanelContent.jsx'
|
||||
import EditorPanel from './EditorPanel.jsx'
|
||||
import PanelTopBar from './PickerPanelTopBar.jsx'
|
||||
import FileCard from './FileCard/index.jsx'
|
||||
import Slide from './Slide.jsx'
|
||||
import type { DashboardState, TargetWithRender } from '../Dashboard'
|
||||
|
||||
// http://dev.edenspiekermann.com/2016/02/11/introducing-accessible-modal-dialog
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@ import { h } from 'preact'
|
|||
import { useEffect, useState, useCallback } from 'preact/hooks'
|
||||
import classNames from 'classnames'
|
||||
import { nanoid } from 'nanoid/non-secure'
|
||||
import getFileTypeIcon from '../../utils/getFileTypeIcon.tsx'
|
||||
import ignoreEvent from '../../utils/ignoreEvent.ts'
|
||||
import FilePreview from '../FilePreview.tsx'
|
||||
import RenderMetaFields from './RenderMetaFields.tsx'
|
||||
import getFileTypeIcon from '../../utils/getFileTypeIcon.jsx'
|
||||
import ignoreEvent from '../../utils/ignoreEvent.js'
|
||||
import FilePreview from '../FilePreview.jsx'
|
||||
import RenderMetaFields from './RenderMetaFields.jsx'
|
||||
|
||||
type $TSFixMe = any
|
||||
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ import { h } from 'preact'
|
|||
import type { Body, Meta, UppyFile } from '@uppy/utils/lib/UppyFile'
|
||||
import type Uppy from '@uppy/core'
|
||||
import type { I18n } from '@uppy/utils/lib/Translator'
|
||||
import copyToClipboard from '../../../utils/copyToClipboard.ts'
|
||||
import type { DashboardState } from '../../../Dashboard.ts'
|
||||
import copyToClipboard from '../../../utils/copyToClipboard.js'
|
||||
import type { DashboardState } from '../../../Dashboard.js'
|
||||
|
||||
type $TSFixMe = any
|
||||
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ import prettierBytes from '@transloadit/prettier-bytes'
|
|||
import truncateString from '@uppy/utils/lib/truncateString'
|
||||
import type { I18n } from '@uppy/utils/lib/Translator'
|
||||
import type { UppyFile } from '@uppy/core'
|
||||
import MetaErrorMessage from '../MetaErrorMessage.tsx'
|
||||
import type { DashboardState } from '../../../Dashboard.ts'
|
||||
import MetaErrorMessage from '../MetaErrorMessage.jsx'
|
||||
import type { DashboardState } from '../../../Dashboard.js'
|
||||
|
||||
const renderFileName = (props: {
|
||||
file: UppyFile<any, any>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { h } from 'preact'
|
||||
import FilePreview from '../../FilePreview.tsx'
|
||||
import MetaErrorMessage from '../MetaErrorMessage.tsx'
|
||||
import getFileTypeIcon from '../../../utils/getFileTypeIcon.tsx'
|
||||
import FilePreview from '../../FilePreview.jsx'
|
||||
import MetaErrorMessage from '../MetaErrorMessage.jsx'
|
||||
import getFileTypeIcon from '../../../utils/getFileTypeIcon.jsx'
|
||||
|
||||
type $TSFixMe = any
|
||||
|
||||
|
|
|
|||
|
|
@ -6,11 +6,11 @@ import type { UppyFile, Body, Meta } from '@uppy/utils/lib/UppyFile'
|
|||
import type { I18n } from '@uppy/utils/lib/Translator'
|
||||
import type Uppy from '@uppy/core'
|
||||
import type { State } from '@uppy/core'
|
||||
import FilePreviewAndLink from './FilePreviewAndLink/index.tsx'
|
||||
import FileProgress from './FileProgress/index.tsx'
|
||||
import FileInfo from './FileInfo/index.tsx'
|
||||
import Buttons from './Buttons/index.tsx'
|
||||
import type { DashboardState } from '../../Dashboard.ts'
|
||||
import FilePreviewAndLink from './FilePreviewAndLink/index.jsx'
|
||||
import FileProgress from './FileProgress/index.jsx'
|
||||
import FileInfo from './FileInfo/index.jsx'
|
||||
import Buttons from './Buttons/index.jsx'
|
||||
import type { DashboardState } from '../../Dashboard.js'
|
||||
|
||||
type Props<M extends Meta, B extends Body> = {
|
||||
file: UppyFile<M, B>
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ import VirtualList from '@uppy/utils/lib/VirtualList'
|
|||
import type { UppyFile, Uppy, State } from '@uppy/core'
|
||||
import type { I18n } from '@uppy/utils/lib/Translator'
|
||||
import type { Body, Meta } from '@uppy/utils/lib/UppyFile'
|
||||
import FileItem from './FileItem/index.tsx'
|
||||
import type { DashboardState } from '../Dashboard.ts'
|
||||
import FileItem from './FileItem/index.jsx'
|
||||
import type { DashboardState } from '../Dashboard.js'
|
||||
|
||||
type FileListProps<M extends Meta, B extends Body> = {
|
||||
id: string
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { h } from 'preact'
|
||||
import getFileTypeIcon from '../utils/getFileTypeIcon.tsx'
|
||||
import getFileTypeIcon from '../utils/getFileTypeIcon.jsx'
|
||||
|
||||
type $TSFixMe = any
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { h } from 'preact'
|
||||
import classNames from 'classnames'
|
||||
import { useRef } from 'preact/hooks'
|
||||
import ignoreEvent from '../utils/ignoreEvent.ts'
|
||||
import ignoreEvent from '../utils/ignoreEvent.js'
|
||||
|
||||
type $TSFixMe = any
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import WebcamPlugin from '@uppy/webcam'
|
|||
import Url from '@uppy/url'
|
||||
|
||||
import resizeObserverPolyfill from 'resize-observer-polyfill'
|
||||
import DashboardPlugin from './index.ts'
|
||||
import DashboardPlugin from './index.js'
|
||||
|
||||
type $TSFixMe = any
|
||||
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
export { default } from './Dashboard.tsx'
|
||||
export type { DashboardOptions } from './Dashboard.tsx'
|
||||
export { default } from './Dashboard.jsx'
|
||||
export type { DashboardOptions } from './Dashboard.jsx'
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { describe, it, expect } from 'vitest'
|
||||
import copyToClipboard from './copyToClipboard.ts'
|
||||
import copyToClipboard from './copyToClipboard.js'
|
||||
|
||||
describe('copyToClipboard', () => {
|
||||
it.skip('should copy the specified text to the clipboard', () => {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { describe, it, expect } from 'vitest'
|
||||
import createSuperFocus from './createSuperFocus.ts'
|
||||
import createSuperFocus from './createSuperFocus.js'
|
||||
|
||||
describe('createSuperFocus', () => {
|
||||
// superFocus.cancel() is used in dashboard
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import debounce from 'lodash/debounce.js'
|
|||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore untyped
|
||||
import FOCUSABLE_ELEMENTS from '@uppy/utils/lib/FOCUSABLE_ELEMENTS'
|
||||
import getActiveOverlayEl from './getActiveOverlayEl.ts'
|
||||
import getActiveOverlayEl from './getActiveOverlayEl.js'
|
||||
|
||||
type $TSFixMe = any
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import toArray from '@uppy/utils/lib/toArray'
|
|||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore untyped
|
||||
import FOCUSABLE_ELEMENTS from '@uppy/utils/lib/FOCUSABLE_ELEMENTS'
|
||||
import getActiveOverlayEl from './getActiveOverlayEl.ts'
|
||||
import getActiveOverlayEl from './getActiveOverlayEl.js'
|
||||
|
||||
type $TSFixMe = any
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import { h, type ComponentChild } from 'preact'
|
|||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore We don't want TS to generate types for the package.json
|
||||
import packageJson from '../package.json'
|
||||
import locale from './locale.ts'
|
||||
import locale from './locale.js'
|
||||
|
||||
export interface DragDropOptions extends UIPluginOptions {
|
||||
inputName?: string
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
export { default } from './DragDrop.tsx'
|
||||
export type { DragDropOptions } from './DragDrop.tsx'
|
||||
export { default } from './DragDrop.jsx'
|
||||
export type { DragDropOptions } from './DragDrop.jsx'
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import type {
|
|||
UnknownProviderPlugin,
|
||||
UnknownProviderPluginState,
|
||||
} from '@uppy/core/lib/Uppy.js'
|
||||
import locale from './locale.ts'
|
||||
import locale from './locale.js'
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore We don't want TS to generate types for the package.json
|
||||
import packageJson from '../package.json'
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
export { default } from './Dropbox.tsx'
|
||||
export type { DropboxOptions } from './Dropbox.tsx'
|
||||
export { default } from './Dropbox.jsx'
|
||||
export type { DropboxOptions } from './Dropbox.jsx'
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import type {
|
|||
UnknownProviderPlugin,
|
||||
UnknownProviderPluginState,
|
||||
} from '@uppy/core/lib/Uppy.js'
|
||||
import locale from './locale.ts'
|
||||
import locale from './locale.js'
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore We don't want TS to generate types for the package.json
|
||||
import packageJson from '../package.json'
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
export { default } from './Facebook.tsx'
|
||||
export type { FacebookOptions } from './Facebook.tsx'
|
||||
export { default } from './Facebook.jsx'
|
||||
export type { FacebookOptions } from './Facebook.jsx'
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import type { TargetedEvent } from 'preact/compat'
|
|||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore We don't want TS to generate types for the package.json
|
||||
import packageJson from '../package.json'
|
||||
import locale from './locale.ts'
|
||||
import locale from './locale.js'
|
||||
|
||||
export interface FileInputOptions extends UIPluginOptions {
|
||||
pretty?: boolean
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
export { default } from './FileInput.tsx'
|
||||
export type { FileInputOptions } from './FileInput.tsx'
|
||||
export { default } from './FileInput.jsx'
|
||||
export type { FileInputOptions } from './FileInput.jsx'
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import IndexedDBStore from './IndexedDBStore.ts'
|
||||
import MetaDataStore from './MetaDataStore.ts'
|
||||
import IndexedDBStore from './IndexedDBStore.js'
|
||||
import MetaDataStore from './MetaDataStore.js'
|
||||
|
||||
/**
|
||||
* Clean old blobs without needing to import all of Uppy.
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@ import type Uppy from '@uppy/core'
|
|||
import type { UploadResult } from '@uppy/core'
|
||||
import ServiceWorkerStore, {
|
||||
type ServiceWorkerStoredFile,
|
||||
} from './ServiceWorkerStore.ts'
|
||||
import IndexedDBStore from './IndexedDBStore.ts'
|
||||
import MetaDataStore from './MetaDataStore.ts'
|
||||
} from './ServiceWorkerStore.js'
|
||||
import IndexedDBStore from './IndexedDBStore.js'
|
||||
import MetaDataStore from './MetaDataStore.js'
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore We don't want TS to generate types for the package.json
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ import type { AsyncStore, BaseProviderPlugin } from '@uppy/core/lib/Uppy.js'
|
|||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore We don't want TS to generate types for the package.json
|
||||
import packageJson from '../package.json'
|
||||
import locale from './locale.ts'
|
||||
import locale from './locale.js'
|
||||
|
||||
export type GoogleDrivePickerOptions = CompanionPluginOptions & {
|
||||
clientId: string
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
export { default } from './GoogleDrivePicker.tsx'
|
||||
export { default } from './GoogleDrivePicker.jsx'
|
||||
|
|
|
|||
|
|
@ -14,8 +14,8 @@ import type {
|
|||
UnknownProviderPlugin,
|
||||
UnknownProviderPluginState,
|
||||
} from '@uppy/core/lib/Uppy.js'
|
||||
import DriveProviderViews from './DriveProviderViews.ts'
|
||||
import locale from './locale.ts'
|
||||
import DriveProviderViews from './DriveProviderViews.js'
|
||||
import locale from './locale.js'
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore We don't want TS to generate types for the package.json
|
||||
import packageJson from '../package.json'
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
export { default } from './GoogleDrive.tsx'
|
||||
export type { GoogleDriveOptions } from './GoogleDrive.tsx'
|
||||
export { default } from './GoogleDrive.jsx'
|
||||
export type { GoogleDriveOptions } from './GoogleDrive.jsx'
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ import type { AsyncStore, BaseProviderPlugin } from '@uppy/core/lib/Uppy.js'
|
|||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore We don't want TS to generate types for the package.json
|
||||
import packageJson from '../package.json'
|
||||
import locale from './locale.ts'
|
||||
import locale from './locale.js'
|
||||
|
||||
export type GooglePhotosPickerOptions = CompanionPluginOptions & {
|
||||
clientId: string
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
export { default } from './GooglePhotosPicker.tsx'
|
||||
export { default } from './GooglePhotosPicker.jsx'
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ import type {
|
|||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore We don't want TS to generate types for the package.json
|
||||
import packageJson from '../package.json'
|
||||
import locale from './locale.ts'
|
||||
import locale from './locale.js'
|
||||
|
||||
export type GooglePhotosOptions = CompanionPluginOptions
|
||||
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
export { default } from './GooglePhotos.tsx'
|
||||
export type { GooglePhotosOptions } from './GooglePhotos.tsx'
|
||||
export { default } from './GooglePhotos.jsx'
|
||||
export type { GooglePhotosOptions } from './GooglePhotos.jsx'
|
||||
|
|
|
|||
|
|
@ -3,11 +3,11 @@ import Cropper from 'cropperjs'
|
|||
import { h, Component } from 'preact'
|
||||
import type { Meta, Body, UppyFile } from '@uppy/utils/lib/UppyFile'
|
||||
import type { I18n } from '@uppy/utils/lib/Translator'
|
||||
import getCanvasDataThatFitsPerfectlyIntoContainer from './utils/getCanvasDataThatFitsPerfectlyIntoContainer.ts'
|
||||
import getScaleFactorThatRemovesDarkCorners from './utils/getScaleFactorThatRemovesDarkCorners.ts'
|
||||
import limitCropboxMovementOnMove from './utils/limitCropboxMovementOnMove.ts'
|
||||
import limitCropboxMovementOnResize from './utils/limitCropboxMovementOnResize.ts'
|
||||
import type ImageEditor from './ImageEditor.ts'
|
||||
import getCanvasDataThatFitsPerfectlyIntoContainer from './utils/getCanvasDataThatFitsPerfectlyIntoContainer.js'
|
||||
import getScaleFactorThatRemovesDarkCorners from './utils/getScaleFactorThatRemovesDarkCorners.js'
|
||||
import limitCropboxMovementOnMove from './utils/limitCropboxMovementOnMove.js'
|
||||
import limitCropboxMovementOnResize from './utils/limitCropboxMovementOnResize.js'
|
||||
import type ImageEditor from './ImageEditor.js'
|
||||
|
||||
type Props<M extends Meta, B extends Body> = {
|
||||
currentImage: UppyFile<M, B>
|
||||
|
|
|
|||
|
|
@ -4,11 +4,11 @@ import type Cropper from 'cropperjs'
|
|||
import { h } from 'preact'
|
||||
|
||||
import type { Meta, Body, UppyFile } from '@uppy/utils/lib/UppyFile'
|
||||
import Editor from './Editor.tsx'
|
||||
import Editor from './Editor.jsx'
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore We don't want TS to generate types for the package.json
|
||||
import packageJson from '../package.json'
|
||||
import locale from './locale.ts'
|
||||
import locale from './locale.js'
|
||||
|
||||
declare global {
|
||||
namespace preact {
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
export { default } from './ImageEditor.tsx'
|
||||
export type { Opts as ImageEditorOptions } from './ImageEditor.tsx'
|
||||
export { default } from './ImageEditor.jsx'
|
||||
export type { Opts as ImageEditorOptions } from './ImageEditor.jsx'
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ import { h, type ComponentChild } from 'preact'
|
|||
import { UIPlugin } from '@uppy/core'
|
||||
import type { State, UIPluginOptions, Uppy } from '@uppy/core'
|
||||
import type { Body, Meta } from '@uppy/utils/lib/UppyFile'
|
||||
import FadeIn from './FadeIn.tsx'
|
||||
import TransitionGroup from './TransitionGroup.ts'
|
||||
import FadeIn from './FadeIn.jsx'
|
||||
import TransitionGroup from './TransitionGroup.js'
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore We don't want TS to generate types for the package.json
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
export { default } from './Informer.tsx'
|
||||
export type { InformerOptions } from './Informer.tsx'
|
||||
export { default } from './Informer.jsx'
|
||||
export type { InformerOptions } from './Informer.jsx'
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import type {
|
|||
UnknownProviderPlugin,
|
||||
UnknownProviderPluginState,
|
||||
} from '@uppy/core/lib/Uppy.js'
|
||||
import locale from './locale.ts'
|
||||
import locale from './locale.js'
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore We don't want TS to generate types for the package.json
|
||||
import packageJson from '../package.json'
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
export { default } from './Instagram.tsx'
|
||||
export type { InstagramOptions } from './Instagram.tsx'
|
||||
export { default } from './Instagram.jsx'
|
||||
export type { InstagramOptions } from './Instagram.jsx'
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import type {
|
|||
UnknownProviderPlugin,
|
||||
UnknownProviderPluginState,
|
||||
} from '@uppy/core/lib/Uppy.js'
|
||||
import locale from './locale.ts'
|
||||
import locale from './locale.js'
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore We don't want TS to generate types for the package.json
|
||||
import packageJson from '../package.json'
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
export { default } from './OneDrive.tsx'
|
||||
export type { OneDriveOptions } from './OneDrive.tsx'
|
||||
export { default } from './OneDrive.jsx'
|
||||
export type { OneDriveOptions } from './OneDrive.jsx'
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
export { default } from './ProgressBar.tsx'
|
||||
export { default } from './ProgressBar.jsx'
|
||||
|
||||
export type { ProgressBarOptions } from './ProgressBar.tsx'
|
||||
export type { ProgressBarOptions } from './ProgressBar.jsx'
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import type { PartialTreeFolder } from '@uppy/core/lib/Uppy.js'
|
||||
import { h, Fragment } from 'preact'
|
||||
import type { Body, Meta } from '@uppy/utils/lib/UppyFile'
|
||||
import type ProviderView from './ProviderView/index.ts'
|
||||
import type ProviderView from './ProviderView/index.js'
|
||||
|
||||
type BreadcrumbsProps<M extends Meta, B extends Body> = {
|
||||
openFolder: ProviderView<M, B>['openFolder']
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@ import type {
|
|||
PartialTreeFolderNode,
|
||||
} from '@uppy/core/lib/Uppy.js'
|
||||
import { useEffect, useState } from 'preact/hooks'
|
||||
import Item from './Item/index.tsx'
|
||||
import ProviderView from './ProviderView/ProviderView.tsx'
|
||||
import Item from './Item/index.jsx'
|
||||
import ProviderView from './ProviderView/ProviderView.jsx'
|
||||
|
||||
type BrowserProps<M extends Meta, B extends Body> = {
|
||||
displayedPartialTree: (PartialTreeFile | PartialTreeFolderNode)[]
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ import type { Meta, Body } from '@uppy/utils/lib/UppyFile'
|
|||
import classNames from 'classnames'
|
||||
import type { PartialTree } from '@uppy/core/lib/Uppy.js'
|
||||
import { useMemo } from 'preact/hooks'
|
||||
import getNumberOfSelectedFiles from './utils/PartialTreeUtils/getNumberOfSelectedFiles.ts'
|
||||
import ProviderView from './ProviderView/ProviderView.tsx'
|
||||
import getNumberOfSelectedFiles from './utils/PartialTreeUtils/getNumberOfSelectedFiles.js'
|
||||
import ProviderView from './ProviderView/ProviderView.jsx'
|
||||
|
||||
export default function FooterActions<M extends Meta, B extends Body>({
|
||||
cancelSelection,
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import type {
|
|||
PartialTreeFile,
|
||||
PartialTreeFolderNode,
|
||||
} from '@uppy/core/lib/Uppy.js'
|
||||
import ItemIcon from './ItemIcon.tsx'
|
||||
import ItemIcon from './ItemIcon.jsx'
|
||||
|
||||
type GridItemProps = {
|
||||
file: PartialTreeFile | PartialTreeFolderNode
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import type {
|
|||
PartialTreeId,
|
||||
} from '@uppy/core/lib/Uppy.js'
|
||||
import { h } from 'preact'
|
||||
import ItemIcon from './ItemIcon.tsx'
|
||||
import ItemIcon from './ItemIcon.jsx'
|
||||
|
||||
// if folder:
|
||||
// + checkbox (selects all files from folder)
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ import type {
|
|||
PartialTreeFolderNode,
|
||||
PartialTreeId,
|
||||
} from '@uppy/core/lib/Uppy.js'
|
||||
import GridItem from './components/GridItem.tsx'
|
||||
import ListItem from './components/ListItem.tsx'
|
||||
import GridItem from './components/GridItem.jsx'
|
||||
import ListItem from './components/ListItem.jsx'
|
||||
|
||||
type ItemProps = {
|
||||
file: PartialTreeFile | PartialTreeFolderNode
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ import { h } from 'preact'
|
|||
import { useCallback } from 'preact/hooks'
|
||||
import type { Body, Meta } from '@uppy/utils/lib/UppyFile'
|
||||
import type { I18n } from '@uppy/utils/lib/Translator'
|
||||
import type { Opts } from './ProviderView.ts'
|
||||
import type ProviderViews from './ProviderView.ts'
|
||||
import type { Opts } from './ProviderView.js'
|
||||
import type ProviderViews from './ProviderView.js'
|
||||
|
||||
type AuthViewProps<M extends Meta, B extends Body> = {
|
||||
loading: boolean | string
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@ import type { I18n } from '@uppy/utils/lib/Translator'
|
|||
import type { Body, Meta } from '@uppy/utils/lib/UppyFile'
|
||||
import type { PartialTreeFolder } from '@uppy/core/lib/Uppy.js'
|
||||
import classNames from 'classnames'
|
||||
import User from './User.tsx'
|
||||
import Breadcrumbs from '../Breadcrumbs.tsx'
|
||||
import type ProviderView from './ProviderView.ts'
|
||||
import User from './User.jsx'
|
||||
import Breadcrumbs from '../Breadcrumbs.jsx'
|
||||
import type ProviderView from './ProviderView.js'
|
||||
|
||||
type HeaderProps<M extends Meta, B extends Body> = {
|
||||
showBreadcrumbs: boolean
|
||||
|
|
|
|||
|
|
@ -14,22 +14,22 @@ import classNames from 'classnames'
|
|||
import type { ValidateableFile } from '@uppy/core/lib/Restricter.js'
|
||||
import remoteFileObjToLocal from '@uppy/utils/lib/remoteFileObjToLocal'
|
||||
import type { I18n } from '@uppy/utils/lib/Translator'
|
||||
import AuthView from './AuthView.tsx'
|
||||
import Header from './Header.tsx'
|
||||
import Browser from '../Browser.tsx'
|
||||
import AuthView from './AuthView.jsx'
|
||||
import Header from './Header.jsx'
|
||||
import Browser from '../Browser.jsx'
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore We don't want TS to generate types for the package.json
|
||||
import packageJson from '../../package.json'
|
||||
import PartialTreeUtils from '../utils/PartialTreeUtils/index.ts'
|
||||
import shouldHandleScroll from '../utils/shouldHandleScroll.ts'
|
||||
import handleError from '../utils/handleError.ts'
|
||||
import getClickedRange from '../utils/getClickedRange.ts'
|
||||
import SearchInput from '../SearchInput.tsx'
|
||||
import FooterActions from '../FooterActions.tsx'
|
||||
import addFiles from '../utils/addFiles.ts'
|
||||
import getCheckedFilesWithPaths from '../utils/PartialTreeUtils/getCheckedFilesWithPaths.ts'
|
||||
import getBreadcrumbs from '../utils/PartialTreeUtils/getBreadcrumbs.ts'
|
||||
import PartialTreeUtils from '../utils/PartialTreeUtils/index.js'
|
||||
import shouldHandleScroll from '../utils/shouldHandleScroll.js'
|
||||
import handleError from '../utils/handleError.js'
|
||||
import getClickedRange from '../utils/getClickedRange.js'
|
||||
import SearchInput from '../SearchInput.jsx'
|
||||
import FooterActions from '../FooterActions.jsx'
|
||||
import addFiles from '../utils/addFiles.js'
|
||||
import getCheckedFilesWithPaths from '../utils/PartialTreeUtils/getCheckedFilesWithPaths.js'
|
||||
import getBreadcrumbs from '../utils/PartialTreeUtils/getBreadcrumbs.js'
|
||||
|
||||
export function defaultPickerIcon(): h.JSX.Element {
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
export { default, defaultPickerIcon } from './ProviderView.tsx'
|
||||
export { default, defaultPickerIcon } from './ProviderView.jsx'
|
||||
|
|
|
|||
|
|
@ -13,19 +13,19 @@ import type { CompanionFile } from '@uppy/utils/lib/CompanionFile'
|
|||
import classNames from 'classnames'
|
||||
import type { ValidateableFile } from '@uppy/core/lib/Restricter.js'
|
||||
import remoteFileObjToLocal from '@uppy/utils/lib/remoteFileObjToLocal'
|
||||
import SearchInput from '../SearchInput.tsx'
|
||||
import Browser from '../Browser.tsx'
|
||||
import SearchInput from '../SearchInput.jsx'
|
||||
import Browser from '../Browser.jsx'
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore We don't want TS to generate types for the package.json
|
||||
import packageJson from '../../package.json'
|
||||
import PartialTreeUtils from '../utils/PartialTreeUtils/index.ts'
|
||||
import shouldHandleScroll from '../utils/shouldHandleScroll.ts'
|
||||
import handleError from '../utils/handleError.ts'
|
||||
import getClickedRange from '../utils/getClickedRange.ts'
|
||||
import FooterActions from '../FooterActions.tsx'
|
||||
import addFiles from '../utils/addFiles.ts'
|
||||
import getCheckedFilesWithPaths from '../utils/PartialTreeUtils/getCheckedFilesWithPaths.ts'
|
||||
import PartialTreeUtils from '../utils/PartialTreeUtils/index.js'
|
||||
import shouldHandleScroll from '../utils/shouldHandleScroll.js'
|
||||
import handleError from '../utils/handleError.js'
|
||||
import getClickedRange from '../utils/getClickedRange.js'
|
||||
import FooterActions from '../FooterActions.jsx'
|
||||
import addFiles from '../utils/addFiles.js'
|
||||
import getCheckedFilesWithPaths from '../utils/PartialTreeUtils/getCheckedFilesWithPaths.js'
|
||||
|
||||
const defaultState: UnknownSearchProviderPluginState = {
|
||||
loading: false,
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
export { default } from './SearchProviderView.tsx'
|
||||
export { default } from './SearchProviderView.jsx'
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
export {
|
||||
default as ProviderViews,
|
||||
defaultPickerIcon,
|
||||
} from './ProviderView/index.ts'
|
||||
} from './ProviderView/index.js'
|
||||
|
||||
export { default as SearchProviderViews } from './SearchProviderView/index.ts'
|
||||
export { default as SearchProviderViews } from './SearchProviderView/index.js'
|
||||
|
||||
export { default as SearchInput } from './SearchInput.tsx'
|
||||
export { default as SearchInput } from './SearchInput.jsx'
|
||||
|
||||
export { default as GooglePickerView } from './GooglePicker/GooglePickerView.tsx'
|
||||
export { default as GooglePickerView } from './GooglePicker/GooglePickerView.jsx'
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import type { CompanionFile } from '@uppy/utils/lib/CompanionFile'
|
|||
// We can safely ignore it because bundlers will happily use the `"exports"` field instead.
|
||||
// eslint-disable-next-line import/no-unresolved
|
||||
import PQueue from 'p-queue'
|
||||
import shallowClone from './shallowClone.ts'
|
||||
import shallowClone from './shallowClone.js'
|
||||
|
||||
export interface ApiList {
|
||||
(directory: PartialTreeId): Promise<{
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import type {
|
|||
PartialTreeFolderNode,
|
||||
PartialTreeId,
|
||||
} from '@uppy/core/lib/Uppy.js'
|
||||
import shallowClone from './shallowClone.ts'
|
||||
import shallowClone from './shallowClone.js'
|
||||
|
||||
/*
|
||||
FROM | TO
|
||||
|
|
|
|||
|
|
@ -8,13 +8,13 @@ import type {
|
|||
PartialTreeFolderRoot,
|
||||
PartialTreeId,
|
||||
} from '@uppy/core/lib/Uppy.js'
|
||||
import afterToggleCheckbox from './afterToggleCheckbox.ts'
|
||||
import afterOpenFolder from './afterOpenFolder.ts'
|
||||
import afterScrollFolder from './afterScrollFolder.ts'
|
||||
import afterFill from './afterFill.ts'
|
||||
import getCheckedFilesWithPaths from './getCheckedFilesWithPaths.ts'
|
||||
import getNumberOfSelectedFiles from './getNumberOfSelectedFiles.ts'
|
||||
import getBreadcrumbs from './getBreadcrumbs.ts'
|
||||
import afterToggleCheckbox from './afterToggleCheckbox.js'
|
||||
import afterOpenFolder from './afterOpenFolder.js'
|
||||
import afterScrollFolder from './afterScrollFolder.js'
|
||||
import afterFill from './afterFill.js'
|
||||
import getCheckedFilesWithPaths from './getCheckedFilesWithPaths.js'
|
||||
import getNumberOfSelectedFiles from './getNumberOfSelectedFiles.js'
|
||||
import getBreadcrumbs from './getBreadcrumbs.js'
|
||||
|
||||
const _root = (id: string, options: any = {}): PartialTreeFolderRoot => ({
|
||||
type: 'root',
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import afterOpenFolder from './afterOpenFolder.ts'
|
||||
import afterScrollFolder from './afterScrollFolder.ts'
|
||||
import afterToggleCheckbox from './afterToggleCheckbox.ts'
|
||||
import afterFill from './afterFill.ts'
|
||||
import afterOpenFolder from './afterOpenFolder.js'
|
||||
import afterScrollFolder from './afterScrollFolder.js'
|
||||
import afterToggleCheckbox from './afterToggleCheckbox.js'
|
||||
import afterFill from './afterFill.js'
|
||||
|
||||
export default {
|
||||
afterOpenFolder,
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import type {
|
|||
import type { CompanionFile } from '@uppy/utils/lib/CompanionFile'
|
||||
import type { Meta, Body, TagFile } from '@uppy/utils/lib/UppyFile'
|
||||
import { getSafeFileId } from '@uppy/utils/lib/generateFileID'
|
||||
import getTagFile from './getTagFile.ts'
|
||||
import getTagFile from './getTagFile.js'
|
||||
|
||||
const addFiles = <M extends Meta, B extends Body>(
|
||||
companionFiles: CompanionFile[],
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue