Commit graph

159 commits

Author SHA1 Message Date
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
Antoine du Hamel
405157ea49
@uppy/aws-s3: refactor to use private fields (#3094) 2021-08-17 20:14:49 +02:00
JT
89f09c810a
Strictly type uppy events (#3085) 2021-08-17 16:29:41 +02:00
Antoine du Hamel
c94664613a
@uppy/utils: resolve remaining linter errors (#3091) 2021-08-10 16:06:49 +02:00
Antoine du Hamel
0cccb686fd @uppy/utils: improve support of data URI in dataURItoBlob (#3080) 2021-08-09 16:13:04 +02:00
Antoine du Hamel
6cd5309544 @uppy/utils: simplify canvasToBlob (#3080)
The built-in `HTMLCanvasElement#toBlob` is supported everywhere.
2021-08-09 16:12:59 +02:00
Antoine du Hamel
c8606ae5fe @uppy/utils: use private fields in EventTracker (#3080) 2021-08-09 16:12:54 +02:00
Antoine du Hamel
9866fc1f5c @uppy/utils: remove ponyfill for Array#findIndex (#3080)
The built-in method is supported everywhere.
2021-08-09 16:12:51 +02:00
Antoine du Hamel
2c1287fc52 @uppy/utils: simplify getTimeStamp (#3080) 2021-08-09 16:12:47 +02:00
Antoine du Hamel
126984ece3 @uppy/utils: avoid creating throw-away <div> in isDragDropSupported (#3080) 2021-08-09 16:12:47 +02:00
Antoine du Hamel
2178f531a4 @uppy/utils: simplify code using optional chaining (#3080) 2021-08-09 16:12:37 +02:00
Antoine du Hamel
dc5cab4922 @uppy/utils: use private fields in ProgressTimeout (#3080) 2021-08-09 16:12:33 +02:00
Antoine du Hamel
059870a80b @uppy/utils: refactor prettyETA (#3080) 2021-08-09 16:12:23 +02:00
Antoine du Hamel
3626172b0c @uppy/utils: use private fields in RateLimitedQueue (#3080) 2021-08-09 16:12:18 +02:00
Antoine du Hamel
2cdb19a8c5 @uppy/utils: use Array.from insterad of custom utils (#3080) 2021-08-09 16:12:13 +02:00
Antoine du Hamel
65ffbed1a2 @uppy/utils: refactor truncateString (#3080) 2021-08-09 16:12:08 +02:00
Artur Paikin
113b627dd0 Release 2021-08-02 22:38:11 +01:00
Merlijn Vos
f01538ba41
Resolve all type TODO's (#2963) 2021-07-20 14:40:31 +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
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
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
Artur Paikin
4b782ffbbb Release 2021-06-30 23:07:21 +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
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
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
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
Artur Paikin
1751241362 Release 2021-03-31 23:59:08 +01:00
Renée Kooi
c1d15abf10
error on import lint failure + some misc lint fixes (#2813)
Co-authored-by: Artur Paikin <artur@arturpaikin.com>
2021-03-20 11:02:49 +01:00
Kevin van Zonneveld
764c2ccada
Update Linter (#2796)
* relocate .vscode

* Switch to transloadit linter

* Update .eslintrc.json

* autofix code

* unlink and install eslint-config-transloadit@1.1.1

* Change 0 to "off"

* Don't change 'use strict'

* Do not vertically align

* disable key-spacing

* add import/no-extraneous-dependencies per package

* add more react/a11y warnings

* Revert "autofix code"

This reverts commit 14c8a8cde8.

* add import/no-extraneous-dependencies per example and main package

* autofix code (2)

* Allow devDependencies in ./bin

* Change import/no-extraneous-dependencies to warn again

* upgrade linter

* Set import/no-extraneous-dependencies to warn
2021-03-15 16:25:17 +00:00
Renée Kooi
4bf1072363
Release 2021-03-10 13:11:28 +01:00
Renée Kooi
29956dd9d3
utils: loosen flaky test 2021-03-10 12:19:12 +01:00
Artur Paikin
502a755458
Use Array.findIndex instead of Array.indexOf in uppy.removePlugin (#2793)
* move findIndex to @uppy/utils, add tests

* use Array.findIndex instead of Array.indexOf in uppy.removePlugin

because strict comparison started failing with Vue3 Proxies
2021-03-08 18:16:01 +00:00
Artur Paikin
2eabc33099 Release 2021-02-10 18:55:14 +00:00
Dominic Eden
183c25b128
[FIX] Safari 14.0 on Mac records audio (using the Webcam Uppy component) with MIME-type ‘audio/mp4’. Update the file extensions checker to reflect this as otherwise audio cannot be recorded with Safari. (#2753) 2021-02-10 18:26:28 +00:00
Artur Paikin
7c55bd855e Release 2021-01-28 16:08:14 +00:00
Renée Kooi
52760d2bb7
dashboard: improve support for right-to-left scripts (#2705)
* dashboard: fix modal position on rtl pages, fixes #2495

* Align text to the right on right-to-left pages

* core: fix default text alignment on right-to-left pages

* dashboard: fix margin in provider browser on right-to-left pages

* dashboard: use direction-aware offset properties

* provider-views: use logical offset CSS properties

* status-bar: use logical offset CSS properties

* dashboard: fix addMore icon margin on RTL pages

* dashboard: some more logical properties

* build: compile logical properties to old CSS

* dashboard: set dir attribute if page did not provide one

* status-bar: set fallback text direction if not provided

* support direction option for inline and modal dashboard

* use companion.uppy.io on deploy previews

* provider-views: fix RTL alignment of file icons

* put the dir attribute on a wrapper div

* fix icon alignment in RTL provider views

* informer: fix ? alignment in RTL mode
2021-01-27 17:13:38 +00:00
Artur Paikin
e1efe07927 Release 2021-01-27 16:22:43 +00:00
Renée Kooi
c81780230d
Add all the CI badges (#2725)
* Add all the CI badges

* flip the CI / npm version order

* add github actions tests badges to all package readmes

* remove |

Co-authored-by: Artur Paikin <artur@arturpaikin.com>
2021-01-13 00:30:59 +00:00
Artur Paikin
1493a807fe Release 2020-12-23 18:04:51 +00:00
Ahmed Kandil
916d4d7eaa
utils: Add archive mime types (#2703)
Resolves #2702
2020-12-18 21:09:18 +00:00
ifedapoolarewaju
3ff9ab042f
Release 2020-11-13 11:52:51 +01:00
Artur Paikin
3967e05fbc
Add uppy.passesRestrictions(file) and disallow selecting files that don’t pass restrictions in providers (#2602)
* add passesRestrictions(file) and utilize it in provider-views

* disallow selecting more than maxNumberOfFiles

* add restriction reason and include folders

* let’s leave folder out of this for now — otherwise not only you can’t select them, but navigate too

* disallow selecting if totalCurrentSelectionFileSize is over maxTotalFileSize

* handle maxNumberOfFiles not being set 🙈

* fix totalCurrentSelectionFileSize and handle no file.name

* support grid in restrictions

* refactor the restriction reason logic, rename to validateRestrictions, wrap icon in a container

* add uppyFileSizes 🙈

* get rid of canSelectMore in favor of validateRestrictions (file, files)

* handle shift key bulk selection

* remove unused props

* use infoTimeout
2020-11-11 21:41:16 +00:00
Artur Paikin
84f7b4d37d Release 2020-10-30 03:27:41 +00:00
Ifedapo .A. Olarewaju
d586a4cf53
companion,unsplash: Unsplash provider (#2431)
* unsplash[wip]: implement unsplash provider + plugin

* unsplash,provider-views,companion-client: fully working unsplash plugin

* unsplash: clean up plugin implementation

* provider-views: refactor CloseWrapper

* companion-client: encode search text before adding it to URL

Co-authored-by: Renée Kooi <renee@kooi.me>

* companion: use object spread over Object.assign

Co-authored-by: Renée Kooi <renee@kooi.me>

* zoom: fix provider-view import

* circle icon

* update locale strings and package-lock

* move truncateString to @uppy/utils and use it for Unsplash name-description conversion, adding .jpg

* use alt_description if description in null

* companion: handle name truncation internally

* companion: handling carriage for truncation + fix urlmeta import

Co-authored-by: Renée Kooi <renee@kooi.me>
Co-authored-by: Artur Paikin <artur@arturpaikin.com>
2020-10-28 19:50:51 +01:00
ifedapoolarewaju
7bf5ca55a7
Release 2020-09-07 12:40:44 +01:00
Andrew
0533357d61
Remove the --save flag (#2503) 2020-09-04 14:32:21 +02:00