-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '4.x' into migration-guide
* 4.x: (43 commits) remove resetProgress and reset-progress (#5221) @uppy/audio: remove unused component props (#5209) @uppy/angular: fix invalid char in `package.json` (#5224) meta: use default argument value instead of `defaultProps` (#5222) @uppy/angular: upgrade to Angular 18 (#5215) @uppy/utils: remove unused `settle` (#5210) @uppy/form: move internal property to private field (#5214) @uppy/dashboard: remove unused component props (#5213) @uppy/status-bar: remove unused component props (#5211) @uppy/audio: move internal property to private field (#5207) @uppy/aws-s3: remove todo (#5200) @uppy/core: remove unnecessary todo (#5200) @uppy/aws-s3: do not expose internal `assertHost` method (#5200) @uppy/aws-s3: make passing `signal` consistent (#5200) @uppy/core: remove `'upload-started'` event (#5200) @uppy/aws-s3: remove `chunkState` getter (#5200) @uppy/drop-target: remove `title` property (#5200) @uppy/golden-retriever: remove unused `ready` setters (#5200) @uppy/dashboard: remove deprecated `autoOpenFileEditor` option (#5200) @uppy/aws-s3: remove `uploaderSockets` (#5200) ...
- Loading branch information
Showing
136 changed files
with
2,807 additions
and
4,461 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* eslint-disable */ | ||
import React from 'react' | ||
import Uppy from '@uppy/core' | ||
import Tus from '@uppy/tus' | ||
import Webcam from '@uppy/webcam' | ||
import RemoteSources from '@uppy/remote-sources' | ||
import { Dashboard, useUppyState } from '@uppy/react' | ||
|
||
import '@uppy/core/dist/style.css' | ||
import '@uppy/dashboard/dist/style.css' | ||
import '@uppy/drag-drop/dist/style.css' | ||
import '@uppy/file-input/dist/style.css' | ||
import '@uppy/progress-bar/dist/style.css' | ||
|
||
const metaFields = [ | ||
{ id: 'license', name: 'License', placeholder: 'specify license' }, | ||
] | ||
|
||
function createUppy() { | ||
return new Uppy({ restrictions: { requiredMetaFields: ['license'] } }) | ||
.use(Tus, { endpoint: 'https://tusd.tusdemo.net/files/' }) | ||
.use(Webcam) | ||
.use(RemoteSources, { | ||
companionUrl: 'https://companion.uppy.io', | ||
}) | ||
} | ||
|
||
export default function App() { | ||
// IMPORTANT: passing an initaliser function to useState | ||
// to prevent creating a new Uppy instance on every render. | ||
// useMemo is a performance hint, not a guarantee. | ||
const [uppy] = React.useState(createUppy) | ||
// You can access state reactively with useUppyState | ||
const fileCount = useUppyState( | ||
uppy, | ||
(state) => Object.keys(state.files).length, | ||
) | ||
const totalProgress = useUppyState(uppy, (state) => state.totalProgress) | ||
// Also possible to get the state of all plugins. | ||
const plugins = useUppyState(uppy, (state) => state.plugins) | ||
|
||
return ( | ||
<> | ||
<p>File count: {fileCount}</p> | ||
<p>Total progress: {totalProgress}</p> | ||
<Dashboard uppy={uppy} metaFields={metaFields} /> | ||
</> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/* eslint-disable */ | ||
import React from 'react' | ||
import { createRoot } from 'react-dom/client' | ||
import App from './App.tsx' | ||
|
||
createRoot(document.querySelector('#app')).render(<App />) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"compilerOptions": { | ||
"jsxImportSource": "react", | ||
"jsx": "react-jsx", | ||
"esModuleInterop": true, | ||
"skipLibCheck": true, | ||
"target": "es2022", | ||
"allowJs": true, | ||
"resolveJsonModule": true, | ||
"moduleDetection": "force", | ||
"isolatedModules": true, | ||
"verbatimModuleSyntax": true, | ||
"strict": true, | ||
"noUncheckedIndexedAccess": true, | ||
"noImplicitOverride": true, | ||
"module": "NodeNext", | ||
"outDir": "dist", | ||
"sourceMap": true, | ||
"lib": ["es2022", "dom", "dom.iterable"], | ||
}, | ||
} |
Oops, something went wrong.