@panneau/modal-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.
Files changed (2) hide show
  1. package/lib/index.js +15 -5
  2. package/package.json +5 -5
package/lib/index.js CHANGED
@@ -23,7 +23,6 @@ var _typeof = require('@babel/runtime/helpers/typeof');
23
23
  var _defineProperty = require('@babel/runtime/helpers/defineProperty');
24
24
  var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
25
25
  var ee = require('namespace-emitter');
26
- var nonSecure = require('nanoid/non-secure');
27
26
  var throttle = require('lodash/throttle.js');
28
27
  var _wrapNativeSuper = require('@babel/runtime/helpers/wrapNativeSuper');
29
28
  var prettierBytes = require('@transloadit/prettier-bytes');
@@ -210,6 +209,17 @@ function _apply2(locale) {
210
209
  });
211
210
  }
212
211
 
212
+ var urlAlphabet = 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict';
213
+ var nanoid = function nanoid() {
214
+ var size = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 21;
215
+ var id = '';
216
+ var i = size;
217
+ while (i--) {
218
+ id += urlAlphabet[Math.random() * 64 | 0];
219
+ }
220
+ return id;
221
+ };
222
+
213
223
  function _classPrivateFieldLooseBase$5(receiver, privateKey) {
214
224
  if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) {
215
225
  throw new TypeError("attempted to use private field on non-instance");
@@ -2478,7 +2488,7 @@ function _createUpload2(fileIDs, opts) {
2478
2488
  if (!allowNewUpload && !forceAllowNewUpload) {
2479
2489
  throw new Error('Cannot create a new upload: already uploading.');
2480
2490
  }
2481
- var uploadID = nonSecure.nanoid();
2491
+ var uploadID = nanoid();
2482
2492
  this.emit('upload', {
2483
2493
  id: uploadID,
2484
2494
  fileIDs: fileIDs
@@ -5436,7 +5446,7 @@ function SearchFilterInput(props) {
5436
5446
  var _useState3 = hooks.useState(function () {
5437
5447
  var formEl = document.createElement('form');
5438
5448
  formEl.setAttribute('tabindex', '-1');
5439
- formEl.id = nonSecure.nanoid();
5449
+ formEl.id = nanoid();
5440
5450
  return formEl;
5441
5451
  }),
5442
5452
  _useState4 = _slicedToArray(_useState3, 1),
@@ -8888,7 +8898,7 @@ function FileCard(props) {
8888
8898
  var _useState3 = hooks.useState(function () {
8889
8899
  var formEl = document.createElement('form');
8890
8900
  formEl.setAttribute('tabindex', '-1');
8891
- formEl.id = nonSecure.nanoid();
8901
+ formEl.id = nanoid();
8892
8902
  return formEl;
8893
8903
  }),
8894
8904
  _useState4 = _slicedToArray(_useState3, 1),
@@ -9435,7 +9445,7 @@ var Dashboard$2 = /*#__PURE__*/function (_UIPlugin) {
9435
9445
  writable: true,
9436
9446
  value: void 0
9437
9447
  });
9438
- _this.modalName = "uppy-Dashboard-".concat(nonSecure.nanoid());
9448
+ _this.modalName = "uppy-Dashboard-".concat(nanoid());
9439
9449
  _this.superFocus = createSuperFocus();
9440
9450
  _this.ifFocusedOnUppyRecently = false;
9441
9451
  _this.removeTarget = function (plugin) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@panneau/modal-upload",
3
- "version": "3.0.220",
3
+ "version": "3.0.222",
4
4
  "description": "File upload modal",
5
5
  "keywords": [
6
6
  "javascript"
@@ -54,9 +54,9 @@
54
54
  },
55
55
  "dependencies": {
56
56
  "@babel/runtime": "^7.12.5",
57
- "@panneau/core": "^3.0.220",
58
- "@panneau/modal-dialog": "^3.0.220",
59
- "@panneau/uppy": "^3.0.220",
57
+ "@panneau/core": "^3.0.222",
58
+ "@panneau/modal-dialog": "^3.0.222",
59
+ "@panneau/uppy": "^3.0.222",
60
60
  "@uppy/core": "^3.9.1",
61
61
  "@uppy/dashboard": "^3.7.3",
62
62
  "@uppy/drag-drop": "^3.0.3",
@@ -71,5 +71,5 @@
71
71
  "publishConfig": {
72
72
  "access": "public"
73
73
  },
74
- "gitHead": "0011db795f1312bd76635dba4745c21f043ff871"
74
+ "gitHead": "1d7f6c2943965c2c26fb6ce1d8f3c85eb88b2146"
75
75
  }