Commit graph

466 commits

Author SHA1 Message Date
Antoine du Hamel
9fe02400ae meta: use workspace:^ instead of workspace:* (#3278) 2021-10-27 17:53:11 +02:00
Merlijn Vos
f6f07b164a
Fix @uppy/unsplash upload (#3272)
- Fix upload by calling `Provider.initPlugin` in the `@uppy/unsplash` class
- Tweak styling for author and file size in dashboard.

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-10-21 12:10:37 +02:00
Lars Fernhomberg
8985283572
Disable drop state for non-files (#2449)
* Only handle drag events with files

* Added modification to drag-drop package as well

* Use some() instead of find() for broader browser support

* `dataTransfer.types` is not a real array in IE10

* introduce canHandleRootDrop, so we can check if dragged items are supported by some plugin

* drag-drop should check for allowNewUpload

* refactor and simplify

* expose events for Dashboard too

* move event handler call to the bottom

Co-authored-by: Renée Kooi <renee@kooi.me>
Co-authored-by: Artur Paikin <artur@arturpaikin.com>
2021-10-20 17:01:30 +01:00
Antoine du Hamel
01d7ea13e9
meta: use Yarn v3 instead of npm (#3237)
* meta: use Yarn v3 instead of npm

* Update CONTRIBUTING.md to fix linter errors

* remove remaining npm commands

* Update deps
2021-10-20 15:16:59 +02:00
Artur Paikin
b8b4127bd5 Release 2021-10-14 21:58:29 +01:00
Antoine du Hamel
55e0ffd04a
Add retext to markdown linter (#3024)
* remark-lint-uppy: use `retext` to improve doc syntax and grammar

* WIP: start fixing fixing linter errors

* Remove `retext-passive` as I don't see what's wrong with passive voice

* Remove URL plugin, add emphasis/strong marker plugin

* Fix remark settings to avoid conflicts

* WIP: more auto-fixes

* remark-simplify: allow `option`

* zoom.md

* url.md

* vue.md

* tus.md

* webcam.md

* xhrupload.md

* writing-plugins

* thumbnail-generator

* svelte

* react-dragdrop

* stores

* do not over simplify

* statusbar

* robodog

* robodog-upload

* robodog-picker

* robodog-form

* robodog-dashboard

* redux

* privacy

* uppy.md

* transloadit.md

* react-native

* react-initializing

* react-fileinput

* providers

* progressbar

* plugins

* plugin-common-options

* onedrive

* locales

* instagram

* informer

* index

* google-drive

* golden-retriever

* form

* fileinput

* facebook

* dropbox

* drop-target

* dragdrop

* remark-lint-no-unneeded-full-reference-link

* Try to setup unified-message-control

* Upgrade deps

* Fix collapsed link references with inline code

* Revert "remark-lint-no-unneeded-full-reference-link"

This reverts commit ca375f463b771bc81d0868f4d84f5979823cfc0a.

* remark-lint-uppy: add missing `"main"` field

* Update package-lock.json

* add disable comments

* fixup! xhrupload.md

* writing-plugins

* unsplash

* tus

* stores

* migration-guide

* dashboard

* community-projects

* box

* integration_help

* blog posts

* companion

* aws-s3

* aws-s3-multipart

* remark-lint-uppy README

* website/inject

* BUNDLE-README

* READMEs

* architecture

* move Remark settings to the plugin

* add `listItemIndent` setting

* list indent fix

* fix ignored files

* revert changelog changes

* fixup! architecture

* Revert changes in ignored files

* Remove unnecessary HTML tags from READMEs
2021-10-14 16:10:45 +02:00
Antoine du Hamel
1eb317ba3a Release 2021-10-06 15:55:29 +02:00
Merlijn Vos
3002201f38
Fix i18n error in CopyLinkButton (#3235) 2021-10-01 17:39:25 +02:00
Merlijn Vos
b7559acd7c
Make @uppy/unsplash production ready (#3196)
Co-authored-by: Alexander Zaytsev <nqst@users.noreply.github.com>
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-10-01 16:31:58 +02:00
Murderlon
b34394ba56
Revert "Fix i18n error in CopyLinkButton"
This reverts commit cc81561ec6.
2021-10-01 15:28:31 +02:00
Murderlon
cc81561ec6
Fix i18n error in CopyLinkButton 2021-10-01 15:27:45 +02:00
Merlijn Vos
a298e59f17
Show all details on mobile when showProgressDetails is true (#3174) 2021-09-20 15:47:28 +02:00
Antoine du Hamel
c33c4e43b2
@uppy/dashboard: fix linter (#3206) 2021-09-20 15:44:34 +02:00
Murderlon
b3b68c0777
Release 2021-09-20 11:51:06 +02:00
Merlijn Vos
bbb035a9df
Fix autoOpenFileEditor for @uppy/dashboard (#3186) 2021-09-10 12:38:55 +02:00
Murderlon
246eafc51a
Release 2021-09-01 11:30:19 +02:00
Artur Paikin
d69043aacc Release 2021-08-24 20:54:05 +01:00
Artur Paikin
b398248198 Update peerDependencies to ^2.0.0 in all uppy packages 2021-08-24 20:22:13 +01:00
Murderlon
ab771cbe1c
Release 2021-08-24 16:13:19 +02:00
Artur Paikin
dbe3ed25b3
build: add stylelint (#3124)
* add stylelint with stylelint-config-standard

* autofix style issues

* fix more linting issues

* add stylelint-scss

* fix two more

* add stylelint-config-rational-order and autofix order

https://github.com/constverum/stylelint-config-rational-order
2021-08-24 01:37:57 +01: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
ec87b232e9
meta: enforce no-unused-vars linter rule (#3118)
* meta: enforce `no-unused-vars` linter rule

* meta: fix `@typescript-eslint/no-unused-vars` linter warnings

* meta: enforce `no-unused-expressions` lint rule

* @uppy/companion: fix `tsc` build
2021-08-23 13:10:17 +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
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
JT
89f09c810a
Strictly type uppy events (#3085) 2021-08-17 16:29:41 +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
Merlijn Vos
667a2366fa
Fix editFile locale usage (#3108) 2021-08-17 12:32:21 +01:00
Artur Paikin
6e8b1d50d7 update nanoid to 3.1.25 to fix missing commonjs issue 2021-08-12 14:28:23 +01:00
Merlijn Vos
8fb6078256
Improve a11y of remove button in dashboard (#3088)
* Improve a11y of remove button in dashboard

* Update `en_US.js`

* Update fr_FR.js

* Update `nl_NL.js`

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-08-10 19:04:42 +01:00
Antoine du Hamel
8f7e63b882
Revert "dashboard: mostly restore backwards compatibility for the browse strings (#2397)" (#3082)
This reverts commit 72965029f2.

Refs: https://github.com/transloadit/uppy/pull/2397
2021-08-09 19:33:24 +02:00
Antoine du Hamel
d94c7d1232
build: harden locale pack check for unused or duplicate key (#3081) 2021-08-09 19:32:44 +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
113b627dd0 Release 2021-08-02 22:38:11 +01:00
Artur Paikin
2b52d9f9ab fileSource string is unused 2021-08-02 21:48:36 +01:00
Artur Paikin
2f791c1747 @uppy/dashboard,@uppy/status-bar: call core methods directly (#3062)
Instead of passing props with x = uppy.x, pass uppy and call methods on
it directly (no need to use `.bind`).
2021-08-02 16:11:28 +02:00
Antoine du Hamel
9b0d25068d
build: fix building on Node.js v14.x LTS (#3061) 2021-08-02 12:36:25 +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
Artur Paikin
4ca78ab543
Set plugin titles from locale (#3023)
* What is happening "*"

* Instead of re-creating i18nInit, we could just make it part of the BasePlugin

* set plugin title and allow changing it from locale

* remove i18nInit method, since we now include it in BasePlugin

* All provider titles should come from locale

* Update en_US.js

* make translator private

//cc @aduh95

* init locale after calling setOptions

* Update en_US.js

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

* Bind `i18n` functions

* Remove duplicate i18nInit — it’s in BasePlugin already

* fix formatting

* fix name

* Update en_US.js

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-07-30 13:02:32 +01:00
Antoine du Hamel
396ebd6f73
@uppy/companion: remove lodash dependency (#3036)
* @uppy/companion: remove `lodash` dependency

* @uppy/companion: test the transpiled files instead of source

* @uppy/companion: rollback to using `lodash.merge`

* Revert "@uppy/companion: test the transpiled files instead of source"

This reverts commit 5ffd5786f1.

* @uppy/companion: remove Node.js v10 and v12 from the CI, add v16

* @uppy/companion: remove Node.js v16.x from the CI

* Revert "@uppy/companion: remove Node.js v10 and v12 from the CI, add v16"

This reverts commit 9dca738f2a.

* Remove optional chaining to keep Node.js v12 support
2021-07-30 12:23:02 +01:00
Antoine du Hamel
defc7b40f8
deps: replace cuid with nanoid (#3053)
Refs: https://github.com/transloadit/uppy/pull/3040#issuecomment-886468554
2021-07-29 17:29:52 +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
Antoine du Hamel
836a731d73
@uppy/core: avoid binding methods to instance in constructor (#3043)
Core classes methods are not suited to be used as eventHandlers, I don't
think it makes sense to have them bound.
2021-07-28 23:38:58 +01:00
Antoine du Hamel
4017033a32
@uppy/core: do not expose plugins property (#3045)
* @uppy/core: do not expose `plugins` property

* fixup! @uppy/core: do not expose `plugins` property
2021-07-28 14:37:09 +01:00
Artur Paikin
f20330aee9
Dashboard: rename Done to Cancel, add Save to Image Editor (#3033)
* Rename Done button to Cancel everywhere

* Add Save button to the top bar of the FileEditor

* Remove Save button from Image Editor toolbar

* fix locale
2021-07-21 14:07:42 +01:00
Merlijn Vos
f01538ba41
Resolve all type TODO's (#2963) 2021-07-20 14:40:31 +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
Antoine du Hamel
dcaef3173f core: fix types 2021-07-09 12:22:11 +02:00