Commit graph

859 commits

Author SHA1 Message Date
Artur Paikin
51037514e5 we have to use new keyword before Uppy.Core() now 2021-08-24 16:23:10 +01:00
Murderlon
ab771cbe1c
Release 2021-08-24 16:13:19 +02:00
Artur Paikin
17b361a286
Core: rename allowMultipleUploads to allowMultipleUploadBatches (#3115)
* allowNewUpload  --> allowMultipleUploadBatches

* noNewAlreadyUploading --> noMoreFilesAllowed

* Disallow drag-drop when allowNewUpload: false in Core

* Fix tests

* add deprecation notice to types

* Update Dashboard.js
2021-08-23 13:19:40 +01:00
Antoine du Hamel
2a93874e3e
writing-plugins: update example to use i18nInit (#3122) 2021-08-23 13:03:53 +01:00
Antoine du Hamel
0b801ccbad
@uppy/core: reject empty string as valid value for required meta fields (#3119) 2021-08-20 13:47:31 +01:00
Antoine du Hamel
1f0e7a59c0
@uppy/dashboard: fix metafield form validation (#3113)
* @uppy/dashboard: fix metafield form validation

Browsers without support for the HTML `form` attribute would misbehave,
making it impossible to validate the form at all, and potentially validate an
unrelated upper form if users are embeding Uppy inside a a `<form>`.

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

* Add comments

* Fix docs and types
2021-08-19 15:19:48 +01:00
Artur Paikin
b050646afe @uppy/locales latest version is 1.22.0 🙈 2021-08-17 20:40:04 +01:00
Artur Paikin
198f23649f Fix locales — point to CDN v1.31.0 2021-08-17 18:25:29 +01:00
Murderlon
980074c0a1
Merge branch 'main' of https://github.com/transloadit/uppy
* 'main' of https://github.com/transloadit/uppy:
  Changelog for 1.31.0 and patches
  Strictly type uppy events (#3085)
  Create `onUnmount` in `UIPlugin` for plugins that require clean up (#3093)
  Companion improve logging (#3103)
  Fix `editFile` locale usage (#3108)
2021-08-17 17:27:37 +02:00
Murderlon
3632a55c6c
Fix typo in docs/companion.md
Ref: #2970
2021-08-17 17:27:01 +02:00
Merlijn Vos
a3aac6ba4c
Create onUnmount in UIPlugin for plugins that require clean up (#3093)
- 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
2021-08-17 14:52:06 +02:00
Martin Brennan
d613b849a6
@uppy/aws-s3-multipart: add support for presigned URL batching (#3056)
* Add first basic test for aws-s3-multipart

* Add another test for GH actions run

* Add whatwg-fetch to aws-s3-multipart package.json

This is to satisfy linter errors, and the other s3 plugin
does this as well

* Adding more tests

* More test progress

* Tests working with nock

* Add another test, for part uploaded event

* Remove spec and refactor to beforeEach

* S3 multipart batch presign working...in theory

* Working batching and tests

* Min needed for presign batch functionality

* Fix lint issues

* Fix syntax error in companion

* Add companion batch presign endpoint

* Improve tests

* Fix each -> forEach

* Remove .prettierrc

* Adding docs and allow for headers with batch prepare

* Review fixes

* Rename prepareUploadPart to prepareUploadParts and use breaking changes
  to batch presign URLs there.
* Get rid of unnecessary batchPartPresign and minNeededForPresignBatch
  options. Use Math.ceil(limit / 2) for min needed instead.
* Fix up tests.
* Fix up type tests.
* Update documentation.

* Review fixes

* Change _ private methods to use # syntax
* Minor code and docs improvements

* Change Promise.resolve() microtasks to async/await
2021-08-11 15:04:05 +02:00
Artur Paikin
472766e48b
UIPlugin fix: prevent Preact replacing contents of body element by using createDocumentFragment (#3072)
* 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
2021-08-06 10:02:11 +01:00
Artur Paikin
f19f885a37 Roll back the CDN urls — v2.0.0-alpha.0 is not on CDN 2021-08-03 13:47:25 +01:00
Artur Paikin
113b627dd0 Release 2021-08-02 22:38:11 +01:00
Artur Paikin
bb1c615dc4 Merge conflict, Editor.js 2021-07-30 14:31:21 +01:00
Artur Paikin
172cc77f63 Merge master 2021-07-30 14:27:21 +01:00
Merlijn Vos
7db4ced76e
Add croppedCanvasOptions to image editor opts (#3037)
* Add `croppedCanvasOptions` & fix types

* Update website/src/docs/image-editor.md

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

* Update website/src/docs/image-editor.md

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

* Update website/src/docs/image-editor.md

Co-authored-by: Artur Paikin <artur@arturpaikin.com>
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-07-30 14:27:56 +02:00
Artur Paikin
28997bc5c7 Release 2021-07-29 16:14:55 +01:00
Renée Kooi
dd55949b79
Remove backwards compatibility hacks in locales (#2969)
* Remove poweredBy2 hack

* Remove exceedsSize2 hack

* tick off poweredBy/exceedsSize task

* do not lint generated files

* fix tests
2021-07-29 15:09:25 +02:00
Antoine du Hamel
56b84dfec7
Dashboard: add required option to metaFields (#2896)
* 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`
2021-07-29 13:15:36 +01:00
Mikael Finstad
605fb53653
Add Box (#3004)
* Add Box

to companion, uppy examples and webpage

* update box dev notes
2021-07-28 23:39:23 +01:00
Vsevolod Lomovitsky
31c41013ea
Fix typo in docs/drop-target.md (#3032) 2021-07-20 17:01:13 +02:00
Antoine du Hamel
31438b0474
doc, deps: clean up polyfill inconsistencies (#3020) 2021-07-16 14:41:22 +02:00
Antoine du Hamel
5630f7dc07
tools: enable linter for TypeScript (#2997)
* tools: enable linter for TypeScript files and code snippets

* types: remove remaning namespaces

* tools: remove unused Babel decorator plugin
2021-07-13 14:28:14 +02:00
Artur Paikin
a8003c873e
core: force new keyword (#2949)
* Force Uppy initialization with new keyword, remove run()

* update some types

* update docs and examples

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

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

* Update packages/@uppy/core/types/index.d.ts

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

* add new in tests

* Move all types to ESM syntax and fix all issues

* Add back e2e build script and revert uppy docs commit

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
Co-authored-by: Murderlon <merlijn@soverin.net>
2021-07-08 19:02:13 +01:00
Artur Paikin
005a7e48ec
showLinkToFileUploadResult: false by default (#2994) 2021-07-08 18:10:36 +01:00
Artur Paikin
f455ea59e8
deprecate multipleResults option (#2996) 2021-07-08 16:12:24 +01:00
Artur Paikin
255429a39f
Change concurrent file upload limit to 5 in tus and xhr-upload (#2993) 2021-07-07 16:39:49 +01:00
Antoine du Hamel
def967d5ee deps: upgrade remark-cli to v9 2021-07-07 15:49:42 +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
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
4b782ffbbb Release 2021-06-30 23:07:21 +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
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
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
229f070cf8
Fix typo in docs/progressbar.md (#2962) 2021-06-24 15:06:47 +02:00
a-kriya
6afc518fda
Document uppy.once in docs/uppy.md (#2960)
Co-authored-by: Merlijn Vos <merlijn@soverin.net>
2021-06-24 13:47:52 +02:00
Julio Montoya
1336ed31d8
Add props example to docs/vue.md (#2959) 2021-06-23 17:04:11 +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
ecec3d3213
Split Plugin into BasePlugin and extended UIPlugin (#2944) 2021-06-18 13:23:16 +02:00
Artur Paikin
b817e84e77
dashboard: set default trigger: null (#2942) 2021-06-17 10:39:09 +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
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
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