* Dashboard: auto discover plugins no matter when they were installed
* Remove target from RemoteSoruces, making it compatible with @uppy/react
* Update packages/@uppy/dashboard/src/Dashboard.jsx
Co-authored-by: Mikael Finstad <finstaden@gmail.com>
* Removed comments, added comments
* better comment
* Change type — otherwise gets listed on Dashboard sources
* Add RemoteSources to React test
* Add RemoteSources to React example
* Add tests
* Refactor for less iteration for each plugin, rename functions
* Prevent error when opts are undefined
* remove console.logs
* prettier
---------
Co-authored-by: Mikael Finstad <finstaden@gmail.com>
Fixes: https://github.com/transloadit/uppy/issues/4272
Co-authored-by: R <r@r.com>
Co-authored-by: Mikael Finstad <finstaden@gmail.com>
Co-authored-by: Antoine du Hamel <antoine@transloadit.com>
* show how many files are added when loading
remake of https://github.com/transloadit/uppy/pull/4388
* add french (cherry pick)
* implement concurrent file listing
* refactor / fix lint
* refactor/reduce duplication
* pull out totals validation
don't do it for every file added, as it's very slow
instead do the check at the end when all files are added.
this allows us to easily work with 10k+ files
fixes#4389
* Update packages/@uppy/core/src/Uppy.js
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
* make restricter.validate validate everything
instead make more specific methods for sub-validation
also rename validateTotals to validateAggregateRestrictions
* improve errors and user feedback
- handle errors centrally so that we can limit the amount of toasts (informers) sent to the users (prevent flooding hundreds/thousands of them)
- introduce FileRestrictionError which is a restriction error for a specific file
- introduce isUserFacing field for RestrictionError
* fix performance issue reintroduced
* improvements
- show "%{count} additional restrictions were not fulfilled" for any restriction errors more than 4
- refactor/rename methods
- improve ghost logic/comments
* improve performance when uploading
- introduce new event "upload-start" that can contain multiple files
- make a new patchFilesState method to allow updating more files
- unify "upload-start" logic in all plugins (send it before files start uploading)
- defer slicing buffer until we need the data
- refactor to reuse code
* fix e2e build issue
* try to upgrade cypress
maybe it fixes the error
* Revert "fix e2e build issue"
This reverts commit ff3e580c0f.
* upgrade parcel
* move mutation logic to end
* remove FileRestrictionError
merge it with RestrictionError
* fix silly bug
looks like the e2e tests are doing its job 👏
---------
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
* Only enable singleFile mode when Dashboard tall enough + add centerSingleFile option
* Shorten file name when Dashboard is short 📏
* Center and flex single file, prevent overflows, contain img instead of cover
* White image background looks better
* Fix broken file type icons (shown when no image preview)
* Don't stretch images smaller than container / background
* uppy-c-textInput font-family inherit
* No shadow, retain cover when non-single-file, add paddings
* if preview is available, set white background, otherwise keep violet
* add transparency to the white background
* centerSingleFile --> singleFileFullScreen
* fix race condtion when adding files
don't call addFolder from listAllFiles
because that would call addFile before all folders were loaded
also remove unused selectedFolders state
* fix also the case of adding multiple folders
* fix todo: remove SharedHandler
* remove loaderWrapper
* fix logic
* fix the last race condition
* fix broken duplicate file check
* fix logic
* prettiyfy loop
* add user feedback
so they know that something is happening
* run corepack yarn run build:locale-pack
* Revert "run corepack yarn run build:locale-pack"
This reverts commit 85548ce2fc.
* Revert "add user feedback"
This reverts commit 4060019c35.
* use async generator instead of p-map
* re-fix race-condition
* remove providerFileToId
as suggested by @arturi
* use addFiles instead of addFile
* rename function
* use provider-supplied file ID
instead of generating an ID, for providers that we whitelsit
this allows adding the same time many times (with a different path)
* call core directly
* improve dev dashboard
* disable experimental getAsFileSystemHandle
it seems to be causing problems when dropping folders with subfolders in newest chrome
e.g a folder with 50 files and a subfolder which in turn has another 50 files
also refactor and document the code more
* Update packages/@uppy/provider-views/src/ProviderView/ProviderView.jsx
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
* mov eto utils
---------
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
* Use form attribite with a form in doc root to prevent outer form submit
* Fix Unsplash a11y bug — don't focus on hidden links
* Combine search and filter into one SearchFilterInput component for Unsplash
* Refactor Browser and ProviderView
* Refactor FileCard to hooks
* Finish SearchFilterInput, add reset labels and no results copy, better styles
* don't use debounce for now
* combine useEffects, named export, extract RenderMetaFields component
* inputCSSClassName --> inputClassName
* Remove typo
* 🤦
* Patch Preact to work with Jest
* tabs vs spaces
---------
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
* If non-remote file has no .data, it’s a File object from the browser, convert it to Uppy format
* Add test
* Update packages/@uppy/core/src/Uppy.js
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
* Check for instanceof File
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
* Refactor uppy-u-reset: all: initial is now well-supported
* Utilize system-ui font-family, it should be provided by browsers now for multi-platform consistency
* Make Dashboard UI a little smaller by default
* Add uppy-c-btn to uppy-Dashboard-browse
* hide uploadNewlyAdded button when preprecessing
* Make “drop files here” tagline more even
* core validateRestrictions: return error directly vs the result/reason obj
* Refacrtor to actually use restrictionError instead of {reason, message}
* Return error instead of throwing
- `@uppy/aws/s3-multipart`: remove `client` getter and setter.
- reason: internal usage only
- migrate: use exposed options only
- `@uppy/core`: remove `AggregateError` polyfill
- reason: [should be polyfilled by the user](https://github.com/transloadit/uppy/pull/3532#discussion_r818602636)
- migrate: install `AggregateError` polyfill or use `core-js`
- `@uppy/core`: remove `reset()` method
- reason: it's a duplicate of `cancelAll`, but with a less intention revealing name
- migrate: use `cancelAll`
- `@uppy/core`: remove backwards compatible exports (static properties on `Uppy`)
- reason: transition to ESM
- migrate: import the `Uppy` class by default and/or use named exports for everything else.
- `@uppy/react`: don't expose `validProps`
- reason: internal only
- migrate: do not depend on this
- `@uppy/store-redux`: remove backwards compatible exports (static properties on `ReduxStore`)
- reason: transition to ESM
- migrate: use named imports
- `@uppy/thumbnail-generator`: remove `rotateImage`, `protect`, and `canvasToBlob` from prototype.
- reason: internal only
- migrate: don't depend on this
When starting an upload and removing it right away, it creates a race
condition when the assembly is created with no files and is never
closed. This commit ensures that the assembly is closed if all files
have been removed, or updated with the new expected number of
files otherwise.
Co-authored-by: Aaron Heimlich <aaron.heimlich@gmail.com>
* meta: disable ESM to CJS transorm in dist files
This commit removes all the hacks that needed to happen in order to ship
working CJS code. Onwards, we plan to distribute Uppy packages as ESM.
* No mocking with Jest and ESM
* Add @uppy/remote-sources preset/plugin
* yarn.lock
* Update packages/@uppy/remote-sources/README.md
Co-authored-by: Merlijn Vos <merlijn@soverin.net>
* Use div.uppy-Root for all plugins mounted in DOM; set dir in UIPlugin
* remote uppy-Root from all UI plugins, as it will be set in UIPlugin automatically
* Remove uppy-Root from file-input
* Revert "Update packages/@uppy/remote-sources/README.md"
This reverts commit 3fd00028f7.
* Revert "yarn.lock"
This reverts commit 04dd8c73de.
* Revert "Add @uppy/remote-sources preset/plugin"
This reverts commit ac1f5df6b3.
* Update packages/@uppy/core/src/UIPlugin.js
Co-authored-by: Merlijn Vos <merlijn@soverin.net>
* Update packages/@uppy/drag-drop/src/DragDrop.jsx
Co-authored-by: Merlijn Vos <merlijn@soverin.net>
* Update packages/@uppy/core/src/UIPlugin.js
Co-authored-by: Renée Kooi <renee@kooi.me>
* Revert "Update packages/@uppy/core/src/UIPlugin.js"
This reverts commit f91af00d6b.
* @uppy/react: add .uppy-Contrainer class name to wrapper div
* @uppy/svelte: add .uppy-Contrainer class name to wrapper div
Co-authored-by: Merlijn Vos <merlijn@soverin.net>
Co-authored-by: Renée Kooi <renee@kooi.me>
.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated
Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
* add extra dot before file size
* show search term at the top when displaying results
* add inline search to result screen
* update locale
* update locale
* remove comments
* improve semantics, remove duplicate event handlers