@uppy/form
Advanced tools
Comparing version 2.0.4 to 2.0.5
"use strict"; | ||
var _class, _temp; | ||
const BasePlugin = require("@uppy/core/lib/BasePlugin"); | ||
const BasePlugin = require('@uppy/core/lib/BasePlugin'); | ||
const findDOMElement = require("@uppy/utils/lib/findDOMElement"); | ||
const findDOMElement = require('@uppy/utils/lib/findDOMElement'); | ||
const toArray = require("@uppy/utils/lib/toArray"); | ||
const toArray = require('@uppy/utils/lib/toArray'); // Rollup uses get-form-data's ES modules build, and rollup-plugin-commonjs automatically resolves `.default`. | ||
// So, if we are being built using rollup, this require() won't have a `.default` property. | ||
const getFormData = require("get-form-data").default || require("get-form-data"); | ||
const getFormData = require('get-form-data').default || require('get-form-data'); | ||
const packageJson = { | ||
"version": "2.0.5" | ||
}; | ||
/** | ||
@@ -18,4 +18,3 @@ * Form | ||
module.exports = (_temp = _class = class Form extends BasePlugin { | ||
class Form extends BasePlugin { | ||
constructor(uppy, opts) { | ||
@@ -71,3 +70,4 @@ super(uppy, opts); | ||
if (isButton && !el.disabled) { | ||
el.disabled = true; | ||
el.disabled = true; // eslint-disable-line no-param-reassign | ||
disabledByUppy.push(el); | ||
@@ -78,7 +78,7 @@ } | ||
disabledByUppy.forEach(button => { | ||
button.disabled = false; | ||
button.disabled = false; // eslint-disable-line no-param-reassign | ||
}); | ||
}, err => { | ||
disabledByUppy.forEach(button => { | ||
button.disabled = false; | ||
button.disabled = false; // eslint-disable-line no-param-reassign | ||
}); | ||
@@ -151,2 +151,5 @@ return Promise.reject(err); | ||
}, _class.VERSION = "2.0.4", _temp); | ||
} | ||
Form.VERSION = packageJson.version; | ||
module.exports = Form; |
{ | ||
"name": "@uppy/form", | ||
"description": "Connect Uppy to an existing HTML <form>.", | ||
"version": "2.0.4", | ||
"version": "2.0.5", | ||
"license": "MIT", | ||
"main": "lib/index.js", | ||
"type": "module", | ||
"types": "types/index.d.ts", | ||
@@ -23,9 +24,8 @@ "keywords": [ | ||
"dependencies": { | ||
"@uppy/utils": "^4.0.3", | ||
"@uppy/utils": "^4.0.7", | ||
"get-form-data": "^2.0.0" | ||
}, | ||
"peerDependencies": { | ||
"@uppy/core": "^2.0.0" | ||
}, | ||
"gitHead": "b8b4127bd55b8e7395889048407c074fce944295" | ||
} | ||
"@uppy/core": "^2.1.9" | ||
} | ||
} |
@@ -1,13 +0,14 @@ | ||
const BasePlugin = require('@uppy/core/lib/BasePlugin') | ||
const findDOMElement = require('@uppy/utils/lib/findDOMElement') | ||
const toArray = require('@uppy/utils/lib/toArray') | ||
// Rollup uses get-form-data's ES modules build, and rollup-plugin-commonjs automatically resolves `.default`. | ||
// So, if we are being built using rollup, this require() won't have a `.default` property. | ||
const getFormData = require('get-form-data').default || require('get-form-data') | ||
import BasePlugin from '@uppy/core/lib/BasePlugin' | ||
import findDOMElement from '@uppy/utils/lib/findDOMElement' | ||
import toArray from '@uppy/utils/lib/toArray' | ||
import getFormData from 'get-form-data' | ||
import packageJson from '../package.json' | ||
/** | ||
* Form | ||
*/ | ||
module.exports = class Form extends BasePlugin { | ||
static VERSION = require('../package.json').version | ||
export default class Form extends BasePlugin { | ||
static VERSION = packageJson.version | ||
@@ -64,3 +65,3 @@ constructor (uppy, opts) { | ||
if (isButton && !el.disabled) { | ||
el.disabled = true | ||
el.disabled = true // eslint-disable-line no-param-reassign | ||
disabledByUppy.push(el) | ||
@@ -71,7 +72,7 @@ } | ||
disabledByUppy.forEach((button) => { | ||
button.disabled = false | ||
button.disabled = false // eslint-disable-line no-param-reassign | ||
}) | ||
}, (err) => { | ||
disabledByUppy.forEach((button) => { | ||
button.disabled = false | ||
button.disabled = false // eslint-disable-line no-param-reassign | ||
}) | ||
@@ -78,0 +79,0 @@ return Promise.reject(err) |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10
256
Yes
21796
Updated@uppy/utils@^4.0.7