* 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
* What is happening "*"
* Instead of re-creating i18nInit, we could just make it part of the BasePlugin
* set plugin title and allow changing it from locale
* remove i18nInit method, since we now include it in BasePlugin
* All provider titles should come from locale
* Update en_US.js
* make translator private
//cc @aduh95
* init locale after calling setOptions
* Update en_US.js
* Update packages/@uppy/core/src/BasePlugin.js
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
* Update packages/@uppy/core/src/index.js
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
* Bind `i18n` functions
* Remove duplicate i18nInit — it’s in BasePlugin already
* fix formatting
* fix name
* Update en_US.js
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
* Dashboard: add `required` option to `metaFields`
Fixes: https://github.com/transloadit/uppy/issues/2892
* use `<form>` element to allow users to use all built-in form features
from the web browser.
* remove `saveOnEnter` hack
The fields are now inside a form, saving on Enter is the default
behavior – and it doesn't short-circuit form validation checks.
* restrictions.requiredMetaFields
* fix documentation of restrictions.requiredMetaFields
* check for required meta fields on upload
* Use detached `<form>` element to avoid nesting `<form>` elements
* fixup! Use detached `<form>` element to avoid nesting `<form>` elements
* Use `cuid` to generate `<form>` `id`
* core: set file size from progress data when null
* core: improve size condition
Co-authored-by: Renée Kooi <renee@kooi.me>
* Move remote file size calculation to uppload success
* Fix file size in test now that we set the size in upload success
* Send bytesUploaded in upload success
* Prioritize bytesUploaded coming from companion
* Format
* Update index.js
Co-authored-by: Renée Kooi <renee@kooi.me>
Co-authored-by: Artur Paikin <artur@arturpaikin.com>