filepond 4.30.3 → 4.30.4

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/README.md CHANGED
@@ -63,6 +63,7 @@ A JavaScript library that can upload anything you throw at it, optimizes images
63
63
  * [Get file](https://github.com/nielsboogaard/filepond-plugin-get-file) ([nielsboogaard/filepond-plugin-get-file](https://github.com/nielsboogaard/filepond-plugin-get-file))
64
64
  * [Zip Directory Uploads](https://github.com/tzsk/filepond-plugin-zipper) ([tzsk/filepond-plugin-zipper](https://github.com/tzsk/filepond-plugin-zipper))
65
65
  * [PDF Preview](https://github.com/Adri-Glez/filepond-plugin-pdf-preview) ([Adri-Glez/filepond-plugin-pdf-preview](https://github.com/Adri-Glez/filepond-plugin-pdf-preview)
66
+ * [PDF Convert](https://github.com/alexandreDavid/filepond-plugin-pdf-convert) ([alexandreDavid/filepond-plugin-pdf-convert](https://github.com/alexandreDavid/filepond-plugin-pdf-convert))
66
67
  * [Copy Path](https://github.com/jnkn6/filepond-plugin-copy-path) ([jnkn6/filepond-plugin-copy-path](https://github.com/jnkn6/filepond-plugin-copy-path))
67
68
 
68
69
 
package/dist/filepond.css CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * FilePond 4.30.3
2
+ * FilePond 4.30.4
3
3
  * Licensed under MIT, https://opensource.org/licenses/MIT/
4
4
  * Please visit https://pqina.nl/filepond/ for details.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * FilePond 4.30.3
2
+ * FilePond 4.30.4
3
3
  * Licensed under MIT, https://opensource.org/licenses/MIT/
4
4
  * Please visit https://pqina.nl/filepond/ for details.
5
5
  */
@@ -1600,7 +1600,7 @@ const InteractionMethod = {
1600
1600
  const getUniqueId = () =>
1601
1601
  Math.random()
1602
1602
  .toString(36)
1603
- .substr(2, 9);
1603
+ .substring(2, 11);
1604
1604
 
1605
1605
  const arrayRemove = (arr, index) => arr.splice(index, 1);
1606
1606
 
@@ -3453,7 +3453,7 @@ const createFileProcessor = (processFn, options) => {
3453
3453
  return api;
3454
3454
  };
3455
3455
 
3456
- const getFilenameWithoutExtension = name => name.substr(0, name.lastIndexOf('.')) || name;
3456
+ const getFilenameWithoutExtension = name => name.substring(0, name.lastIndexOf('.')) || name;
3457
3457
 
3458
3458
  const createFileStub = source => {
3459
3459
  let data = [source.name, source.size, source.type];
@@ -8063,7 +8063,7 @@ const write$9 = ({ root, props, actions }) => {
8063
8063
  .filter(action => /^DID_SET_STYLE_/.test(action.type))
8064
8064
  .filter(action => !isEmpty(action.data.value))
8065
8065
  .map(({ type, data }) => {
8066
- const name = toCamels(type.substr(8).toLowerCase(), '_');
8066
+ const name = toCamels(type.substring(8).toLowerCase(), '_');
8067
8067
  root.element.dataset[name] = data.value;
8068
8068
  root.invalidateLayout();
8069
8069
  });
@@ -8361,11 +8361,20 @@ const exceedsMaxFiles = (root, items) => {
8361
8361
 
8362
8362
  // if does not allow multiple items and dragging more than one item
8363
8363
  if (!allowMultiple && totalBrowseItems > 1) {
8364
+ root.dispatch('DID_THROW_MAX_FILES', {
8365
+ source: items,
8366
+ error: createResponse('warning', 0, 'Max files'),
8367
+ });
8364
8368
  return true;
8365
8369
  }
8366
8370
 
8367
8371
  // limit max items to one if not allowed to drop multiple items
8368
- maxItems = allowMultiple ? maxItems : allowReplace ? maxItems : 1;
8372
+ maxItems = allowMultiple ? maxItems : 1;
8373
+
8374
+ if (!allowMultiple && allowReplace) {
8375
+ // There is only one item, so there is room to replace or add an item
8376
+ return false;
8377
+ }
8369
8378
 
8370
8379
  // no more room?
8371
8380
  const hasMaxItems = isInt(maxItems);