@panneau/field-upload 3.0.220 → 3.0.222
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +15 -5
- package/package.json +9 -9
package/lib/index.js
CHANGED
|
@@ -33,7 +33,6 @@ var _asyncToGenerator = require('@babel/runtime/helpers/asyncToGenerator');
|
|
|
33
33
|
var _createForOfIteratorHelper = require('@babel/runtime/helpers/createForOfIteratorHelper');
|
|
34
34
|
var _typeof = require('@babel/runtime/helpers/typeof');
|
|
35
35
|
var ee = require('namespace-emitter');
|
|
36
|
-
var nonSecure = require('nanoid/non-secure');
|
|
37
36
|
var throttle = require('lodash/throttle.js');
|
|
38
37
|
var _wrapNativeSuper = require('@babel/runtime/helpers/wrapNativeSuper');
|
|
39
38
|
var prettierBytes = require('@transloadit/prettier-bytes');
|
|
@@ -219,6 +218,17 @@ function _apply2(locale) {
|
|
|
219
218
|
});
|
|
220
219
|
}
|
|
221
220
|
|
|
221
|
+
var urlAlphabet = 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict';
|
|
222
|
+
var nanoid = function nanoid() {
|
|
223
|
+
var size = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 21;
|
|
224
|
+
var id = '';
|
|
225
|
+
var i = size;
|
|
226
|
+
while (i--) {
|
|
227
|
+
id += urlAlphabet[Math.random() * 64 | 0];
|
|
228
|
+
}
|
|
229
|
+
return id;
|
|
230
|
+
};
|
|
231
|
+
|
|
222
232
|
function _classPrivateFieldLooseBase$5(receiver, privateKey) {
|
|
223
233
|
if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) {
|
|
224
234
|
throw new TypeError("attempted to use private field on non-instance");
|
|
@@ -2487,7 +2497,7 @@ function _createUpload2(fileIDs, opts) {
|
|
|
2487
2497
|
if (!allowNewUpload && !forceAllowNewUpload) {
|
|
2488
2498
|
throw new Error('Cannot create a new upload: already uploading.');
|
|
2489
2499
|
}
|
|
2490
|
-
var uploadID =
|
|
2500
|
+
var uploadID = nanoid();
|
|
2491
2501
|
this.emit('upload', {
|
|
2492
2502
|
id: uploadID,
|
|
2493
2503
|
fileIDs: fileIDs
|
|
@@ -5445,7 +5455,7 @@ function SearchFilterInput(props) {
|
|
|
5445
5455
|
var _useState3 = hooks.useState(function () {
|
|
5446
5456
|
var formEl = document.createElement('form');
|
|
5447
5457
|
formEl.setAttribute('tabindex', '-1');
|
|
5448
|
-
formEl.id =
|
|
5458
|
+
formEl.id = nanoid();
|
|
5449
5459
|
return formEl;
|
|
5450
5460
|
}),
|
|
5451
5461
|
_useState4 = _slicedToArray(_useState3, 1),
|
|
@@ -8897,7 +8907,7 @@ function FileCard(props) {
|
|
|
8897
8907
|
var _useState3 = hooks.useState(function () {
|
|
8898
8908
|
var formEl = document.createElement('form');
|
|
8899
8909
|
formEl.setAttribute('tabindex', '-1');
|
|
8900
|
-
formEl.id =
|
|
8910
|
+
formEl.id = nanoid();
|
|
8901
8911
|
return formEl;
|
|
8902
8912
|
}),
|
|
8903
8913
|
_useState4 = _slicedToArray(_useState3, 1),
|
|
@@ -9444,7 +9454,7 @@ var Dashboard$2 = /*#__PURE__*/function (_UIPlugin) {
|
|
|
9444
9454
|
writable: true,
|
|
9445
9455
|
value: void 0
|
|
9446
9456
|
});
|
|
9447
|
-
_this.modalName = "uppy-Dashboard-".concat(
|
|
9457
|
+
_this.modalName = "uppy-Dashboard-".concat(nanoid());
|
|
9448
9458
|
_this.superFocus = createSuperFocus();
|
|
9449
9459
|
_this.ifFocusedOnUppyRecently = false;
|
|
9450
9460
|
_this.removeTarget = function (plugin) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@panneau/field-upload",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.222",
|
|
4
4
|
"description": "An Upload field",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -57,13 +57,13 @@
|
|
|
57
57
|
"@fortawesome/fontawesome-svg-core": "^6.5.1",
|
|
58
58
|
"@fortawesome/free-solid-svg-icons": "^6.5.1",
|
|
59
59
|
"@fortawesome/react-fontawesome": "^0.2.0",
|
|
60
|
-
"@panneau/core": "^3.0.
|
|
61
|
-
"@panneau/element-button": "^3.0.
|
|
62
|
-
"@panneau/element-label": "^3.0.
|
|
63
|
-
"@panneau/element-media-card": "^3.0.
|
|
64
|
-
"@panneau/modal-resource-items": "^3.0.
|
|
65
|
-
"@panneau/themes": "^3.0.
|
|
66
|
-
"@panneau/uppy": "^3.0.
|
|
60
|
+
"@panneau/core": "^3.0.222",
|
|
61
|
+
"@panneau/element-button": "^3.0.222",
|
|
62
|
+
"@panneau/element-label": "^3.0.222",
|
|
63
|
+
"@panneau/element-media-card": "^3.0.222",
|
|
64
|
+
"@panneau/modal-resource-items": "^3.0.222",
|
|
65
|
+
"@panneau/themes": "^3.0.222",
|
|
66
|
+
"@panneau/uppy": "^3.0.222",
|
|
67
67
|
"@uppy/core": "^3.9.1",
|
|
68
68
|
"@uppy/dashboard": "^3.7.3",
|
|
69
69
|
"@uppy/drag-drop": "^3.0.3",
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
"publishConfig": {
|
|
81
81
|
"access": "public"
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "1d7f6c2943965c2c26fb6ce1d8f3c85eb88b2146"
|
|
84
84
|
}
|