Commit graph

1856 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
Antoine du Hamel
6b7ad5e7c7
Stricter linter (#3095)
* 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
2021-08-17 20:32:57 +02: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
8bcf1c6897 Merge branch 'master' into 2.0 2021-08-02 21:53:05 +01:00
Artur Paikin
0b90925276 hide Box from examples for now 2021-08-02 14:58:00 +01:00
Artur Paikin
f26511ab29
Update app.html 2021-08-02 13:26:34 +01:00
Artur Paikin
72810525f5
Update app.es6 2021-08-02 13:26:02 +01:00
Artur Paikin
c2df2b6032
Update app.es6
//cc @aduh95
2021-07-30 17:00:10 +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
359f12293c
meta: update CONTRIBUTING.md (#3011) 2021-07-19 23:18:35 +02:00
Antoine du Hamel
31438b0474
doc, deps: clean up polyfill inconsistencies (#3020) 2021-07-16 14:41:22 +02:00
Antoine du Hamel
d40b5241db
core: remove more IE hacks (#3015)
We can now use `Object.fromEntries`, `Object.values`, and `Symbol`.
Also changes polyfill suggestion for legacy browsers to use `core-js`
which includes almost all we need and more.
2021-07-16 09:27:51 +02:00
Antoine du Hamel
632ac377f6
core: remove use of Array.prototype.reduce where possible (#3016) 2021-07-15 19:52:08 +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
ce959456ed
companion: Remove deprecated serverHeaders in favour of companionHeaders (#2995)
* remove deprecated serverHeaders in favour of companionHeaders

* remove TL_UPPY_SERVER and exports.UPPY_SERVER

@kvz @goto-bus-stop ok to do this already, right?
2021-07-08 18:10:14 +01:00
Artur Paikin
f455ea59e8
deprecate multipleResults option (#2996) 2021-07-08 16:12:24 +01:00
Antoine du Hamel
b30cad027a Merge remote-tracking branch 'upstream/master' 2021-07-07 22:22:27 +02:00
Antoine du Hamel
e361d25594
tools: lint JS code snippets inside blog posts (#2992) 2021-07-07 16:41:03 +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
c68aaf1e0d
tools: fix linter errors in JS code snippets inside blog posts (#2991) 2021-07-07 15:56:33 +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
AJvanLoon
2c94be81c1
A bit of polish (#2986) 2021-07-07 11:33:48 +01: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
b601da6cb2 Publish 1.30 blog post 2021-07-02 20:52:46 +01: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