Commit graph

83 commits

Author SHA1 Message Date
Renée Kooi
2b91a96c95
Release 2020-01-15 16:39:45 +01:00
Renée Kooi
18180d5778
Release 2019-12-16 12:53:23 +01:00
Renée Kooi
c370dba0b6
Release 2019-11-04 10:56:06 +01:00
Artur Paikin
4e54483e61 core: setOptions for Core and plugins (#1728)
* Add a method to update options in Core

* Add a method to update options in Plugin (for any plugins)

* Allow re-initializing i18n locales after they’ve been updated with .setOptions

* use rest spread instead of Object.assign

* override setOptions in plugins to include i18nInit

* merge restrictions object in setOptions

* check that newOpts exists

* add spread ...

* don’t double merge

* add i18nInit to all plugins that use translation strings

* add setOptions tests to Core and Dashboard

* add setOptions docs for Core and Plugins

* fix tests for thumbnail-generator by adding plugins: {} to mock core

cause ThumbnailGenerator now calls this.setPluginState, which expects `core.state.plugins`

* also update meta with setOptions if it’s passed, change the way this.opts is set in core

@goto-bus-stop does this look ok? merging restrictions opts in core

* if locale was passed to setOptions(), call plugin.setOptions() on all plugins, so that i18n updates

* add Dashboard test that checks if locale is updated from Core via setOptions()

* Reafactor website Dashboard example to use setOptions and allow selecting a locale

🎉
2019-11-04 10:33:30 +01:00
Renée Kooi
b2f158e45e
Release 2019-10-14 16:43:19 +02:00
Renée Kooi
4e32e61d7c
Release 2019-10-09 21:00:46 +02:00
Renée Kooi
733de659da
Upgrade standard to v14 (#1860)
* Update eslint dependencies.

* standard --fix

* build: disable handler name lint rule

* status-bar: manually fix lint errors

* webcam: manually fix lint errors

* url: manually fix lint errors

* react-native: manually fix lint errors

* dashboard: manually fix lint errors

* informer: manually fix linting errors

* progress-bar: manually fix lint errors

* provider-views: manually fix lint errors

* redux-dev-tools: manually fix lint errors

* build: disable buggy no-unused-vars rule

* examples: manually fix lint errors

* ` quotes for code things, ' for text things
2019-10-09 14:53:02 +02:00
Renée Kooi
d6d4b05425
companion-client: rename serverHeaders to companionHeaders (#1861) 2019-10-09 14:34:52 +02:00
Artur Paikin
056a7114a1 Release 2019-08-30 15:24:04 +03:00
Renée Kooi
c62ec3665d Update eslint to v6 (#1777)
* Update eslint

* Do eslint --fix

* Do not access Object.prototype method 'hasOwnProperty' from target object

* utils: add hasProperty

* eslint --fix

* Disable quote-props for locale files

* add back quotes in locale files

* revert locale files to state on master

* Update react-scripts
2019-08-13 21:45:30 +03:00
Renée Kooi
10bc79574e
lerna link convert (#1730)
* 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
2019-07-19 12:16:36 +02:00
Artur Paikin
bd2beedcff Release 2019-07-18 17:21:42 +02:00
Artur Paikin
5e35987079
Log error in uppy.addFile try/catch (#1680)
* Log error in uppy.addFile try/catch

* Add `.isRestriction` to a custom RestrictionError, check for that before logging

* keep throwing for robodog.upload

//cc @goto-bus-stop
2019-06-28 20:25:17 +03:00
Evgenia Karunus
7ce63fcb7e Accessibility follow-up PR: make all svgs not focusable in IE11 (#1662)
* /examples/dev - added polyfills for easy development in IE11

* @uppy/dashboard - made all svgs not focusable in IE11

* /examples/dev - started sharing serviceWorker registration code

* /examples/dev - added polyfills for IE11 to dev bundle
2019-06-17 17:08:05 +03:00
Evgenia Karunus
6bcf2040e9 Feature/accessibility (#1507)
* @uppy/provider-views - added accessibility

* @uppy/provider-views - simplified checkbox css

* @uppy/dashboard - on tab set focus to the current verlay

* @uppy/dashboard - factored out code related to focus into a separate file

* @uppy/dashboard, and connected plugins - made focus travel well, and be managed in a single place in Dashboard

* @uppy/dashboard - made modal opener button focus keep focus on modal close

* @uppy/dashboard - focus management for uploaded-files

* @uppy/dashboard - made informer read messages without interruption

* @uppy/provider-views - removed the bug of focus jumping on safari

* @uppy/dashboard - made focus travel well in instagram in firefox

* @uppy - moved lodash.debounce dependency from / to @uppy/dashboard

* everywhere - made <ul>s not focusable for firefox

* @uppy/provider-views - unnested scss, copypasted alex's :focus changes

* Added JSDoc eslint package and rules, and fixed some JSDoc comments

* .eslintrc - made jsdoc errors warnings instead

* package-lock.json for new package.json

* eslint fix

* @uppy/dashboard - avoid forcing focus when we are inline

* @uppy/dashboard - in firefox, made sure superfocus is not switching back to uppy

* @uppy/dashboard - no focus jump for .info() inline,  fix for firefox

Made focus not interrupt .info() when we are in the inline mode;
Made firefox start superfocusing when we either tab into, or click on some element in Uppy

* @uppy/dashboard - only listen to click/focus on uppy

* @uppy/dashboard - started trapping focus in inline mode too

* @uppy/dashboard - restricted trapFocus() event listener to this.el

* @uppy/core - started throttling progress emits.

1. To fix heat up in firefox
2. To fix focus in firefox

* @uppy/core - fixed tests by adding .flush()-s for progress emits

* @uppy/dashboard - stopped trapping focus in inline mode, made background inert

* @uppy/dashboard - added MutationObserver polyfill

* tests - made locale-packs.js pass

* REVERTED last 3 commits that introduced inert

Inert requires too many polyfills, atm tests fail in IE 10.0, wicg-inert library reportedly has performance issues. We decided to at least wait until _some_ browser introduce inert html property natively.

* @uppy/dashboard - IE11 fix for focusing

* @uppy/dashboard - fix for a bug in Safari for long uploads with checkbox clicking

* RERUN TESTS - tiny commit to rerun tests

* @uppy/dashboard - removed useless touchstart event listener

* Cancel superFocus in recordIfFocusedOnUppyRecently, when focus moves away from Uppy

* @uppy/provider-views - made Filter not swallow letters

* @uppy/dashboard - stopped superfocus from refocusing if we're already in the overlay
2019-06-11 19:10:32 +03:00
Artur Paikin
28d235fe2f Release 2019-06-05 19:07:20 +03:00
Renée Kooi
980210f76c
Add VERSION properties to all plugins.
And remove the proposal-object-rest-spread plugin because it is built
into preset-env now.
2019-05-27 16:53:47 +02:00
Artur Paikin
5c9e1a836d Release 2019-05-17 19:17:03 +03:00
Renée Kooi
1ad322497f
Release 2019-05-08 15:27:15 +02:00
Renée Kooi
fb053444f1 pin preact to 8.2.9 (#1513)
Webpack likes to pick the ES module versions of modules over CJS
versions. So, if we do `require('preact')`, we can get the ES module
version of it. preact in version 8.3.0 switched its file extension
from `.esm.js` to `.mjs`, which in webpack's default configuration meant
the module implementation became much stricter. The result is that we
get a different value in `require('preact')`.

This older version of preact doesn't use `.mjs` yet so we can safely
`require('preact')` it in webpack. It still picks the ESM version, but
now it uses the looser implementation which is interchangeable for our
purposes.
2019-05-01 15:06:44 +02:00
Artur Paikin
25d4b3678b Release 2019-04-25 23:03:25 +03:00
Artur Paikin
27424e37c7 update peerDependencies of @uppy/core to ^1.0.0 2019-04-25 22:50:05 +03:00
Artur Paikin
0f95529cc5 Release 2019-04-19 15:46:25 +03:00
Artur Paikin
d24fd1811b move forEachDroppedOrPastedUrl util to /src 2019-04-19 14:27:43 +03:00
Artur Paikin
cb27df2502
Merge pull request #1440 from lakesare/improve-drag-to-upload-state
Improve drag to upload state
2019-04-18 15:38:53 +03:00
Evgenia Karunus
97ad62b4cc UrlPlugin - made sure url drop/paste is browser-compatible 2019-04-17 21:12:03 +02:00
Artur Paikin
28fce1a137 Default locale for all plugins (#1443)
* first swing at building locale pack

* expose default locale on the plugin instance

* write a pretty en_US locale to a file, using stringify-object and template.js

* generated locale pack

* start adding a script that checks for unused locale strings

Co-Authored-By: Kevin van Zonneveld <kevin@transloadit.com>

* Update bin/build-locale-pack.js

* Console output improvements

* Also sort plugin locale keys

* Support dependencies when digging up sources

because e.g. 'emptyFolderAdded' is used in provider-views but set in Dashboard's defaultLocale

* More complex matching

So can can support cases like: `uppy.i18n(error.isAuthError ? 'companionAuthError' : 'companionError')`

* Remaining const defaultLocale -> this.defaultLocale

* Update packages/@uppy/locales/en_US.js

* Mock browser environment so all plugins can be instantiated

* Clean up output a bit

* Update bin/build-locale-pack.js

* Add all remaining plugin's locales to en_US bundle

* Update packages/@uppy/dashboard/src/index.js

* Update en_US.js

Co-Authored-By: Kevin van Zonneveld <kevin@transloadit.com>

* remove unused strings

Co-Authored-By: Kevin van Zonneveld <kevin@transloadit.com>

* Also write csv because that makes it real easy to import to friendlier places for translators /cc @arturi

* don’t set locale: this.defaultLocale — it overrides the lang pack

Co-Authored-By: Kevin van Zonneveld <kevin@transloadit.com>

* Add 'russian plural' for english, for consistency

Allows us to signal that this is possible in new target languages, and also run better linting

* Cleanup

* No longer write csv

* WIP for NL

* Create package.json

Co-Authored-By: Kevin van Zonneveld <kevin@transloadit.com>

* move locales to /src

Co-Authored-By: Kevin van Zonneveld <kevin@transloadit.com>

* ignore locales themselves

Co-Authored-By: Kevin van Zonneveld <kevin@transloadit.com>

* build minified locale packs

Co-Authored-By: Kevin van Zonneveld <kevin@transloadit.com>

* expose Uppy.locale = {} placeholder object

Co-Authored-By: Kevin van Zonneveld <kevin@transloadit.com>

* Update ru_RU.js

Co-Authored-By: Kevin van Zonneveld <kevin@transloadit.com>

* add locale bundles to example

Co-Authored-By: Kevin van Zonneveld <kevin@transloadit.com>

* Upload locales to cdn

* Allow to run tests with upload-to-cdn by setting a versionSuffix

* Move locale build to function, to make room for test()

* Bring ru_RU in sync with English

now that we've added 3 plural types across the board

* Document using locales as a consuming dev, and plugin dev

* Add linting for missing/excess locale strings

* Add the locales we had to remove to the legacy folder

and explain why they cannot make it back

* Move legacy outside of src so they are definitely not transpiled, etc

* Update packages/@uppy/locales/src/nl_NL.js

* Update website/src/docs/uppy.md
2019-04-17 13:34:23 +02:00
Evgenia Karunus
54d8fa153f merged master in 2019-04-15 15:55:45 +02:00
Evgenia Karunus
d76e46e9cc DashboardPlugin, UrlPlugin - dropped drag-drop library, added support for crossbrowser folder drops, and visible placeholder 2019-04-15 15:37:32 +02:00
Ifedapo Olarewaju
f4e558bf94 rename serverUrl to companionUrl
and serverPattern to companionAllowedHosts
2019-04-14 13:53:50 +01:00
Evgenia Karunus
f1b08ec2c1 DashboardPlugin, UrlPlugin - prevented dragover flickering, added translatable 'Drop Here' hint 2019-04-10 16:49:33 +02:00
Alexander Zaytsev
2457c2ea0d Tweak the Import button spacing 2019-04-10 14:57:18 +03:00
Alexander Zaytsev
e349ed5d0e Remove optional xmlns attribute from the SVGs 2019-04-09 12:32:39 +03:00
Artur Paikin
7ae8af44ab Release 2019-04-04 19:31:09 +03:00
Artur Paikin
b519544b40 protect some styles from bleeding 2019-03-21 19:55:11 +03:00
Artur Paikin
27899d944f Release 2019-03-08 20:47:42 +03:00
Renée Kooi
fd6734be4d
docs: update webpack homepage URLs 2019-03-04 13:43:37 +01:00
Artur Paikin
f94bc77deb Publish
- uppy@0.30.2
 - @uppy/aws-s3-multipart@0.30.2
 - @uppy/aws-s3@0.30.2
 - @uppy/companion-client@0.28.2
 - @uppy/companion@0.17.2
 - @uppy/core@0.30.2
 - @uppy/dashboard@0.30.2
 - @uppy/drag-drop@0.30.2
 - @uppy/dropbox@0.30.2
 - @uppy/file-input@0.30.2
 - @uppy/form@0.30.2
 - @uppy/golden-retriever@0.30.2
 - @uppy/google-drive@0.30.2
 - @uppy/informer@0.30.2
 - @uppy/instagram@0.30.2
 - @uppy/progress-bar@0.30.2
 - @uppy/provider-views@0.30.2
 - @uppy/react@0.30.2
 - @uppy/redux-dev-tools@0.30.2
 - @uppy/robodog@0.30.2
 - @uppy/status-bar@0.30.2
 - @uppy/store-default@0.28.2
 - @uppy/store-redux@0.28.2
 - @uppy/thumbnail-generator@0.30.2
 - @uppy/transloadit@0.30.2
 - @uppy/tus@0.30.2
 - @uppy/url@0.30.2
 - @uppy/utils@0.30.2
 - @uppy/webcam@0.30.2
 - @uppy/xhr-upload@0.30.2
2019-02-22 22:43:58 +03:00
Artur Paikin
a5c39e9a35 Release 2019-02-21 19:09:22 +03:00
Artur Paikin
4dcef4c3b9 Release 2019-02-15 23:55:18 +03:00
Artur Paikin
ea0befe4ce update peerDependencies before release 2019-02-15 22:09:12 +03:00
Artur Paikin
3ddf4c7548 Release 2019-01-15 19:21:04 +03:00
Artur Paikin
9fce77830b
Remove jsnext:main since it’s been deprecated
https://github.com/stereobooster/package.json#jsnextmain
2019-01-15 18:22:15 +03:00
Renée Kooi
3710b19e1b
Use export = in @uppy/core typings. 2018-12-20 14:51:42 +01:00
Renée Kooi
1a0878a851
Merge pull request #1131 from mattes3/master
Make Uppy's React components usable from Typescript
2018-12-10 15:50:12 +01:00
Artur Paikin
c68f2c7e68 Release 2018-11-29 23:36:16 +03:00
Artur Paikin
faefe0d5f0 @uppy/core peerDependency --> ^0.29.0 2018-11-29 21:34:56 +03:00
Artur Paikin
cd8fae0ac9 Don’t bundle Core styles with everything, because of CSS conflicts
To use Dashboard, you now have to include the following css:
```js
import '@uppy/core/dist/style.css'
import '@uppy/dashboard/dist/style.css'
```
2018-11-22 13:59:02 +03:00
Matthias Bohlen
c8cb89bde0 Convert to "export =" everywhere because...
...the *.js source files use "module.exports = " instead of
"export default".
2018-11-12 12:05:54 +01:00
Artur Paikin
47a68a6148 Release 2018-10-31 19:30:39 +03:00