* 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
* add Audio plugin
* add audio-oscilloscope to visualize the recording
* refactor: rename everything to Audio, use oscilloscope, re-init when appropriate, improved preview screen
* tweak styles
* add @uppy/audio to the Uppy bundle
* update Readme and package.json
* add docs, update locales, add website example
* webcam plugin also shouldn’t show recording length counter on video preview screen
* update package.json and yarn.lock
* update types
* update locale
* fix locale issues
* remove leftover webcam test
* Delete index.test-d.ts
* Revert "Delete index.test-d.ts"
This reverts commit f4ec431f6a.
* fix lint and type tests
* Update website/src/docs/audio.md
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
* Update packages/@uppy/audio/src/audio-oscilloscope/index.js
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
* Update packages/@uppy/audio/src/DiscardButton.js
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
* Update packages/@uppy/audio/src/audio-oscilloscope/index.js
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
* Update packages/@uppy/audio/src/supportsMediaRecorder.js
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
* Update website/src/docs/audio.md
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
* Update packages/@uppy/audio/types/index.d.ts
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
* Update packages/@uppy/audio/src/index.js
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
* Update packages/@uppy/audio/src/index.js
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
* Update packages/@uppy/audio/src/index.js
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
* remove unused method
* remove unused commented declarations
* make all methods private
* convert class component to hooks
* more private
* fix lint
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
Closes#3232
### Summary
- Create `locale.js` for every plugin instead of `this.defaultLocale` in the class
- Complete refactor of locale scripts
- No dynamic plugin class imports with hacks to mimic the environment in order to get the `defaultLocale`.
- Separate tests and build in separate files
- Add two modes for test file, `unused` (fails hard) and `warnings`
- Generate docs
- Use remark to cleanly mutate the file
- Rename some doc files to match the plugin name (such as `statusbar` --> `status-bar`)
- Comments in `locale.js` are kept and are present in the docs as well.
- Generate types
* add checkRequiredMetaFieldsOnFile for checking single file's meta fields after editing
* add MetaErrorMessage component, mobile and desktop styles
* use AggregateRestrictionError again
* metaFieldIdToName — use names of meta fields instead of id
* Update MetaErrorMessage.js
* desktop style tweaks
* update jest snapshot
* Close window on auth callback error
Because simply receiving a "Bad request" is very bad UX
For example if the user cancels the auth flow, or doesn't give companion access
it's better to go back
* Update packages/@uppy/companion/src/server/controllers/callback.js
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
* Update packages/@uppy/companion/src/server/controllers/callback.js
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
* Update packages/@uppy/companion/src/server/controllers/callback.js
* Update callback.js
* pull out reusable code to getDynamicStateFromRequest
* Signal auth error to client
* fix test mocking
* npm run build:locale-pack
* Update packages/@uppy/companion/src/server/controllers/callback.js
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
* fix lint
* add i18n string that got lost during merge
* add french translation
* add dutch translation
* add norwegian translation
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
* @uppy/core: move `Uppy` class to its own module
Fixes: https://github.com/transloadit/uppy/issues/3220
* Rename snapshot file
* Update docs
* Update website/src/_posts/2021-08-2.0.md
Co-authored-by: Merlijn Vos <merlijn@soverin.net>
* Update migration guide
* Do not bundle preact with non-UI plugin packages
Co-authored-by: Merlijn Vos <merlijn@soverin.net>
* add stylelint with stylelint-config-standard
* autofix style issues
* fix more linting issues
* add stylelint-scss
* fix two more
* add stylelint-config-rational-order and autofix order
https://github.com/constverum/stylelint-config-rational-order
* enforce some eslint rules
* enforce accessibility linter rules
* harden lint rules with only 1 or 2 warnings
* fix remaining rules with less than 3 warnings
* fix e2e tests
* fix remaining rules with less than 4 warnings
* fix remaining rules with less than 6 warnings
* fix `shuffleTaglines`
* fix companion build
- Create and call `onUnmount` in `UIPlugin` for plugins that require clean up
- Update webcam `stop` to clean up when already recording
- Update "Writing plugins" docs
- Move `onMount` and `onUnmount` from `BasePlugin` into `UIPlugin`
- Update types
* Pass createDocumentFragment instead of the targetElement to Preact, so it doesn’t destroy the contents of targetElement
* remove replaceTargetContent
* also remove replaceTargetContent from docs and website