Commit graph

1701 commits

Author SHA1 Message Date
Antoine du Hamel
d6fb14dfb1 deps: upgrade typescript version 2021-07-07 16:53:00 +02:00
Antoine du Hamel
7330d21b8f @uppy/companion: upgrade helmet to v4
Fixes: https://github.com/transloadit/uppy/issues/2404
2021-07-07 15:49:42 +02:00
Antoine du Hamel
f3b90b0726 deps: re-organize React dependencies 2021-07-07 15:49:42 +02:00
Antoine du Hamel
38388b175b deps: upgrade nock to v13 2021-07-07 15:47:04 +02:00
Murderlon
fe96096c3d
Merge branch 'master' into 2.0
* master: (23 commits)
  A bit of polish (#2986)
  Companion: Fix typescript error
  Companion: Fix invalid referrer crashing the process
  Publish 1.30 blog post
  Release
  Build: Companion needs to be built before locale-pack
  Release
  Fix build: locale-pack first, integrations second
  changelog for 1.30
  Release
  Update package.json
  Only log info if debug is true (#2855)
  build(deps): bump prismjs from 1.23.0 to 1.24.0 (#2971)
  Angular Integration (#2871)
  ci: don't run markdown tests in type tests
  Add types for `uppy.once` method (#2965)
  build: lint fixes in build scripts
  Fix typo in docs/progressbar.md (#2962)
  Document `uppy.once` in `docs/uppy.md` (#2960)
  Add `props` example to docs/vue.md (#2959)
  ...
2021-07-07 15:32:38 +02:00
Julian Gruber
6dbaddc09d
Companion: Fix typescript error 2021-07-05 10:14:39 +02:00
Julian Gruber
a785f7deeb
Companion: Fix invalid referrer crashing the process 2021-07-04 20:02:10 +02:00
Antoine du Hamel
c48064ba56
doc: lint JS code snippets (#2954)
* doc: lint JS code snippets

* deps: update `lint-staged` deps

* Fix remaining lint warnings and errors

Co-authored-by: Artur Paikin <artur@arturpaikin.com>
2021-07-04 19:32:50 +02:00
Artur Paikin
8fb6889e26
Revert "Improve checkbox for screenreaders (#2930)" (#2979)
This reverts commit a2527c6ab5.
2021-07-01 06:40:01 +01:00
Artur Paikin
4b782ffbbb Release 2021-06-30 23:07:21 +01:00
Merlijn Vos
a2527c6ab5
Improve checkbox for screenreaders (#2930)
* Improve checkbox for screenreaders

* Remove redundant aria attributes

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>

* Update French locale

* Fix order in English locale

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-06-30 13:18:44 +01:00
Masao Kitamura
0682223f51
Only log info if debug is true (#2855)
* Only log info if debug is true

* Add option logClientVersion

defaults to true

* Update companion.md

Co-authored-by: Mikael Finstad <finstaden@gmail.com>
Co-authored-by: Artur Paikin <artur@arturpaikin.com>
2021-06-30 12:50:51 +01:00
Antoine du Hamel
7b8316ed81
xhr: use symbol for internal options (#2934)
* xhr: use symbol for internal options

* fixup! xhr: use symbol for internal options
2021-06-30 12:06:10 +01:00
Artur Paikin
48c8d8b50d
core: onBeforeFileAdded: pass full file object with extension, detected type, meta, size, etc (#2941)
* pass full file object with extension, meta, size, etc

* Update packages/@uppy/core/src/index.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>

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-06-30 12:05:46 +01:00
Merlijn Vos
acb6566ec0
Always enable strict types and remove .run method (#2957)
* Always use strict types and remove `.run` method

* Remove accidental package-lock.json files

* Actually remove `.run` method
2021-06-30 12:05:10 +01:00
Andrew
8f4cc89a9e
Angular Integration (#2871)
* feature(integration): initial Angular framework implementation

* Package cleanup

* Actually add the components this time

* fix rendering bug

* Add documentation

* dependency fixes

* add broken example

* Make locales ignore angular

* dependency updates

* Update package-lock.json

* Fix broken example

* Make example consistent with docs

* angular: Update styling advice

* angular: Build system stuff

* angular: Escape dependency hell

* angular: Add dashboard-modal component

* angular: Update package.json/prepare for release

* angular: Fix styling bugs

* add Angular dependencies

* Update README.md

* lint fixes — those deps are in root

* Update README.md

Co-authored-by: Adam Medford <adammedford@gmail.com>
Co-authored-by: Artur Paikin <artur@arturpaikin.com>
2021-06-30 11:36:57 +01:00
Merlijn Vos
f0f1105ef0
Resolve or remove miscellaneous todos (#2967) 2021-06-29 12:54:19 +02:00
Antoine du Hamel
69397be5a0
expect built-in support for MediaDevices API (#2945)
https://caniuse.com/?search=mediadevices

IE users would need this polyfill:
https://github.com/mozdevs/mediaDevices-getUserMedia-polyfill
2021-06-28 11:46:38 +01:00
Antoine du Hamel
c315329399
Remove IE polyfills and special casing (#2947)
* Remove IE polyfills and special casing

* dashboard: remove `resize-observer-polyfill`

* deps: remove url-parse to use global `URL` instead

* Update documentation for browser support

* Add a migration guide

* Update e2e test platforms

* Remove polyfills from examples and add those missing in CDN bundle

* Use Node.js v16.x on CI because of `AbortController`

* Update bundle builder to produce two builds: `uppy.js` without polyfills, `uppy.legacy.js` with polyfills.

* Upgrade create-react-app deps

* remove null coalescing operator as it's not supported by the build chain

* disable Safari testing (for now)


Co-authored-by: Renée Kooi <renee@kooi.me>
2021-06-28 11:34:51 +02:00
a-kriya
3c8fbe8d87
Add types for uppy.once method (#2965)
Co-authored-by: Merlijn Vos <merlijn@soverin.net>
2021-06-28 09:26:04 +02:00
Merlijn Vos
a194865fe5
Create getObjectOfFilesPerState in core for plugins (#2961) 2021-06-25 10:58:42 +02:00
Antoine du Hamel
56c86e2f18
doc: use ESM syntax in code snippets (#2953)
In preparation for a future release of Uppy which drop support for
CommonJS, we should start nudging our users to use ESM syntax.

Fixes: https://github.com/transloadit/uppy/issues/2951
2021-06-22 10:30:24 +02:00
Merlijn Vos
da6c3e4098
Remove sync option from VirtualList & update UIPlugin render 2021-06-21 15:11:19 +02:00
Antoine du Hamel
9c26496a09
transloadit: fix unhandled promise rejections (#2948) 2021-06-21 13:53:16 +02:00
Antoine du Hamel
8b1b794b73
Add comments around empty setState calls (#2931) 2021-06-19 11:23:18 +01:00
Merlijn Vos
ecec3d3213
Split Plugin into BasePlugin and extended UIPlugin (#2944) 2021-06-18 13:23:16 +02:00
Antoine du Hamel
2c996d7043
react-native: refactor takePictureWithExpo (#2946) 2021-06-17 11:53:01 +01:00
Antoine du Hamel
62a722be80
tus: remove autoRetry option (#2938) 2021-06-17 11:01:30 +01:00
Artur Paikin
b817e84e77
dashboard: set default trigger: null (#2942) 2021-06-17 10:39:09 +01:00
Artur Paikin
e5061b1194
locales: remove es_GL that was kept for backwards-compat (#2943)
* remove es_GL for good — it was kept for backwards-compat

* remove legacy
2021-06-17 10:38:48 +01:00
Antoine du Hamel
6efecf6f0f
xhr: change default name depending on whether bundle is set (#2933)
* temporarily add cheerio-select-tmp to devDependencies to fix tests

* xhr: change default name depending on whether `bundle` is set

Fixes: https://github.com/transloadit/uppy/issues/782

* Update docs
2021-06-16 22:18:08 +01:00
Merlijn Vos
3b3e8a440c
Upgrade Preact to latest (#2926) 2021-06-16 12:46:19 +02:00
Cruaier
d0bde78ec6
#2920 fixed standalone server to initiate itself on explicit function… (#2924)
* #2920 fixed standalone server to initiate itself on explicit function call

* refactored standalone server module export

* fixed unit tests related to new companion standalone export, set the jest timeout slightly higher

Co-authored-by: Thomas Benndorf <thomas@br24.com>
2021-06-15 11:27:19 +01:00
Mikael Finstad
397f03d85d
Google drive shortcuts (#2917)
* Implement google drive shortcut support

Also add encodeURIComponent to url params
Closes #2698

* fix lint
2021-06-15 09:16:41 +01:00
Andrew
9a9860ac8f
Allowed HTML Attributes to be passed via props (#2891)
* Allowed HTML Attributes to be passed via props

This fix still needs some work, as certain attributes could be passed to Uppy or as an HTML attribute, such as target

When this is fixed, this will resolve #2403

* Removed shared attributes

I removed the ability to use certain attributes ('width', 'height', and 'target') and pass them down as Props to the div due to that fact that Uppy relies on them

* Add typescript types for the HTML attributes

* Moved common.js to getHTMLProps.js

* Fixed import

* Converted `possibleStandardNames` to an Array

* Fix import

* Fix tests
2021-06-14 13:11:37 +01:00
Merlijn Vos
33dbe58cb3
Expose drag-drop events (#2914)
* Expose drag-drop events

* we need to call DragDrop.renderArrowSvg without this, since it’s now static

* Update docs based on feedback

Co-authored-by: Artur Paikin <artur@arturpaikin.com>
2021-06-14 12:22:01 +01:00
Antoine du Hamel
0c510ee799
add more granular image rotation control (#2838)
* add more granular image rotation control

Fixes: https://github.com/transloadit/uppy/issues/2636

* fixup! add more granular image rotation control

* fixup! add more granular image rotation control

* fixup! add more granular image rotation control

* fixup! add more granular image rotation control

* add input-range-scss dependency

* Modify the rotation slider

- Better visual styles for the slider
- Position a toggle in the center of the slider
- Make it work better on moblile
- 90° rotation: rotate counterclockwise
- 90° rotation: update icon

* Use black background for the canvas when rotating (instead of gray)

* Use smaller range for granular rotation input

* Optimize event listeners

* Fix styles and state unsyncronisation

* Update package-lock.json

Co-authored-by: Alexander Zaytsev <nqst@users.noreply.github.com>
Co-authored-by: Artur Paikin <artur@arturpaikin.com>
2021-06-13 14:31:19 +01:00
Antoine du Hamel
4575d67f07
Translator: refactor interpolate (#2903)
* Translator: refactor interpolate

Fixes types and small code edits:
`<regex>[Symbol.split](<string>)` is equivalent to
`String.prototype.split.call(<string>, <regex>)` and potentially more
readable (the downside it's not compatible with IE, which may be why we
currently use the latter).

Refs: https://github.com/transloadit/uppy/pull/2899

* Update packages/@uppy/utils/src/Translator.js

* Revert RegExp Symbol for IE compat
2021-06-13 11:23:55 +01:00
Nilesh Suthar
7d5bdddaa6
return fileId or error in plugin.addFile (#2919)
In the case of an invalid URL, this is no proper way to handle an error. `uppy.state.info` only show the error without any info that due to which URL error was thrown. 
So returning the error or file so it can be handled as need. throwing the error will not be backward compatible
2021-06-08 13:50:31 +01:00
Merlijn Vos
f2d30420f3
Mention the file name in exceedsSize error message (#2918)
* Mention the file name in exceedsSize error message

* Fix implementation and tests

* Undo accidental commited changes
2021-06-07 15:42:41 +01:00
Antoine du Hamel
1aa17533ee
core: enrich error event for use from postproocessor (#2909)
Fixes: https://github.com/transloadit/uppy/issues/2840
2021-05-31 12:43:18 +01:00
Artur Paikin
23e4a537a6 Release 2021-05-28 11:54:17 +01:00
Artur Paikin
12b7bd34e8 Release 2021-05-27 21:35:08 +01:00
Artur Paikin
7bdaba3021
types: Add logout, Translator.translate and Translator.translateArray (#2899)
* Add logout, Translator.translate and Translator.translateArray

* Update index.d.ts

* Update index.d.ts

* Update index.js
2021-05-26 16:26:16 +01:00
Renée Kooi
bc54aeb3f5
companion: support relative redirect URLs in responses (#2901) 2021-05-26 10:28:40 +02:00
Mikael Finstad
c2c568279b
companion: fix NRP typescript errors (#2884)
* ignore ts errors

i couldn't get the @types/node-redis-pubsub to work
It seems they are incorrect (they have a namespace NRP around teh class)

* convert from class extends to factory function

* Fix bug introduced in chunkSize PR
2021-05-25 13:30:28 +01:00
Jhen-Jie Hong
2428a35cd3
url: Add missing companionCookiesRule option (#2898) 2021-05-25 10:14:30 +02:00
Renée Kooi
fa5d2ae11a
companion-client: rethrow original error objects (#2889)
Changes the HTTP request error handling logic to only replace the
message inside an Error object, instead of creating a new Error. This
should keep stack traces intact and prevents us from obscuring any
potential additional properties on the original Error.
2021-05-21 21:00:35 +01:00
Artur Paikin
42eb7fcc5a
Golden retriever 2 fixes (#2895)
* rename StatusBar-ghosts to StatusBar-serviceMsg

* resumeAll after restore

* Adjust recovered copy: remove from StatusBar, make it depend on number of ghosts, add re-select button

* Update en_US.js

* add sorting — display ghost files first

* make ghosts more opaque

//cc @nqst

* Update packages/@uppy/dashboard/src/components/FileList.js

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>

* Update packages/@uppy/dashboard/src/components/FileList.js

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-05-21 17:47:39 +01:00
Alexander Zaytsev
961a5d653e
Fix incorrect font in Chrome on the Dashboard (#2887)
* Fix incorrect font in Chrome on the Dashboard

* Revert CSS; use .uppy-u-reset & .uppy-c-btn classes instead

* Cleanup
2021-05-20 22:54:20 +01:00