* everywhere - decorative changes
* /examples - fix duplicate logs in examples
* @uppy/dashboard - only fire the safety resize if we're not in a closed modal
* website/examples - made sure console.debug works in IE10
Makes it a bit easier to follow. It also logs a warning now when you do
`.retryUpload(SomeNonsenseFileID)` instead of silently adding an invalid
object to the state.
* return file id of added files
* add documentation for returned value
* fix linting
* update test to new addFile API
* add docs for the change in the addFile API
* lerna link convert
* ci: use npm ci
* update lockfile
* companion: set `bin` to source file
Since typescript doesn't actually transform anything, we can just use
this.
In a next major version we could set `noEmit: true` in the tsconfig and
stop publishing `lib`.
* companion: do chmod +x on start-server.js
* build: remove obsolete lerna config
* build: explicitly install latest versions when building e2e tests for ci
* Remove versions from private packages
* fix regex
* try fix
* ci: force npm to install to endtoend folder
* ci: fold up e2e build output
* Update netlify deploy preview command
* Remove mentions of npm run bootstrap
* Edit .github/CONTRIBUTING.md instead
* companion: add proxy executable
* companion: fix publish
* Downgrade jest to appease create-react-app
* Select 5 files --> Select 5, because there are also folders
not ideal, but better
* selectXFiles --> selectX
* update selectX in all locales
* Update fi_FI.js
* core: add test for ID generation with non-latin names
* core: adjust ID generation to keep non-latin characters
This shouldn't be bc-breaking!
Now, non-latin characters are encoded as their charcode in base 32, so
files that only differ by name in a non-latin language will generate
different IDs.
* Replace prettier-bytes with its copy, only use 1024 instead of 1000 to justify KB vs kB
* Add tests
* added License
* pretty-bytes to @uppy/utils/lib/prettyBytes everywhere
* Set file.type before calling onBeforeFileAdded, throw in upload so .catch works, emit restriction-failed for minNumberOfFiles, too
We must throw in upload onError, otherwise .catch won’t catch
* It seems startUpload is not used in Dashboard, used in StatusBar instead
probably a leftover from before StautsBar became a standalone plugin
* only log non-restriction errors
* throw early if restrictions.allowedFileTypes is not an array
* flip condition: do emit the event if err.isRestriction
* Change roles
* Disable tests for faster iterations
* Remove condiiton
* Test python base64 decode
* Test a different file
* Decode that shit
* Use normal file also
* Print the file
* Remove waste of time
* Remove more waste
* Fix it
* Change space name
* Turn everything back
* @uppy/locales - updated Nl translation as per Kevin
* @uppy/provider-views - moved all translations to Core, removed dependency on Dashboard
* @uppy/locales - added missing translations for 'Add more'
* robodog: fix `form({ modal: true })` not enabling modal options
Previously, dashboard modal options like `closeAfterFinish` were not
available to robodog.form even if the `modal: true` option was set. this
was because the `addDashboardPlugin` function checks that `opts.inline
=== false`, and we were keeping it null/undefined.
* robodog: use the same `inline` check as the Dashboard does
* @uppy/dashboard - factored out and visually nested FileCard scss
(Without changing any actual styles)
* @uppy/dashboard - positioned image previews well in FileCard.js for IE11
And updated CSS to depend on predictable flexbox logic.
* @uppy/dashboard - FileCard.js, ensured Firefox respects flexbox, and fixed border-radius in Safari
* @uppy/dashboard - FileCard.js, fixed imports, moved local classes to local css file
* @uppy/dashboard - FileCard.js, changed classNames as per the new convention
* @uppy/dashboard - FileCard.js, removed unneeded binds
* eslint - added the eslint warning for no unused vars
* eslint - commented out unused-variables rule
It's handy to have nearby, but we don't want to discriminate against all unused variables, sometimes they are expressive.
* Allow definition of MediaRecorder mimeType
This PR introduces a new option for the `@uppy/webcam` plugin called `preferredMimeType` which defaults as `null`.
If a value is passed, the browser's `MediaRecorder` implementation checks if the `preferredMimeType` is supported, and if it thinks it is, will attempt to record using the `preferredMimeType` rather than the browser default.
If the `preferredMimeType` is unsupported, the browser will fall back to using its default recording mime type.
This allows, for example, a user to pass `preferredMimeType: "video/webm"` during the `@uppy/webcam` plugin construction which will instruct the browser to record to a `.webm` container.
Specific codecs may also be passed here. For example, `video/webm;codecs=vp8` may still parse as valid by the browser.
## Limitations
This does not currently change the mime type for captured images on line 282 (`image/jpeg`) and will only pass the `preferredMimeType` to the browser `MediaRecorder` API.
### Reference
https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder/MediaRecorderhttps://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder/isTypeSupportedhttps://cs.chromium.org/chromium/src/third_party/blink/web_tests/fast/mediarecorder/MediaRecorder-isTypeSupported.html?q=MediaRecorder-isTypeSupported&drhttps://www.webmproject.org/about/faq/
* Constantize preferredMimeType
* Lint fix
* Change option name to preferredVideoMimeType
* One more preferredVideoMimeType
* Update comment
* docs: add preferredVideoMimeType
* Add an option to supply customLogger that will receive message and type from uppy.log
* Always use logger function, set to nullLogger by default
Co-Authored-By: Renée Kooi <github@kooi.me>
* add tests for logging and not logging with a function and debug: true
* Update packages/@uppy/core/src/loggers.js
account for `debug` not being available in IE10
Co-Authored-By: Renée Kooi <renee@kooi.me>
* add .call
* fix tests
* expose Uppy.debugLogger
* document logger
* core cleanup
* add logger to defaultOptions in docs too
* debug: true — only override logger if it has not been set in opts