@popsure/dirty-swan 0.38.4 → 0.38.5

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.
@@ -3,7 +3,7 @@ import { UploadStatus, UploadedFile } from '../types';
3
3
  interface Props {
4
4
  uploadStatus: UploadStatus;
5
5
  file: UploadedFile;
6
- onRemoveFile: (id: string) => void;
6
+ onRemoveFile?: (id: string) => void;
7
7
  uploading: boolean;
8
8
  }
9
9
  declare const UploadFileCell: React.FC<Props>;
@@ -3,7 +3,7 @@ interface MultiDropzoneProps {
3
3
  uploadedFiles: UploadedFile[];
4
4
  uploading: boolean;
5
5
  onFileSelect: (files: File[]) => void;
6
- onRemoveFile: (id: string) => void;
6
+ onRemoveFile?: (id: string) => void;
7
7
  accept?: AcceptType;
8
8
  isCondensed?: boolean;
9
9
  maxFiles?: number;
@@ -1,6 +1,6 @@
1
1
  import '../../../tslib.es6-5bc94358.js';
2
2
  import 'react/jsx-runtime';
3
3
  import '../../../index-6ea95111.js';
4
- export { U as default } from '../../../index-da10b7ad.js';
4
+ export { U as default } from '../../../index-3e39c956.js';
5
5
  import '../../../style-inject.es-1f59c1d0.js';
6
6
  //# sourceMappingURL=index.js.map
@@ -6,7 +6,7 @@ import { o as objectAssign } from '../../index-dd80248b.js';
6
6
  import { A as AnimateHeight } from '../../index-e27b50cf.js';
7
7
  import { g as generateId } from '../../index-fb46adf9.js';
8
8
  import { s as styleInject } from '../../style-inject.es-1f59c1d0.js';
9
- import { i as icons, U as UploadFileCell } from '../../index-da10b7ad.js';
9
+ import { i as icons, U as UploadFileCell } from '../../index-3e39c956.js';
10
10
 
11
11
  var propTypes = {exports: {}};
12
12
 
@@ -2857,7 +2857,7 @@ var MultiDropzone = function (_a) {
2857
2857
  progress: 0,
2858
2858
  }, onRemoveFile: function () { return removeError(id); }, uploading: false }, id));
2859
2859
  }),
2860
- uploadedFiles.length > 0 && (jsx("div", __assign({ className: "w100 mt16" }, { children: uploadedFiles.map(function (file) { return (jsx(UploadFileCell, { uploadStatus: getUploadStatus(file.progress, file.error), file: file, onRemoveFile: onRemoveFile, uploading: uploading }, file.id)); }) }), void 0)),
2860
+ uploadedFiles.length > 0 && (jsx("div", __assign({ className: "w100 mt16" }, { children: uploadedFiles.map(function (file) { return (jsx(UploadFileCell, __assign({ uploadStatus: getUploadStatus(file.progress, file.error), file: file }, !onRemoveFile ? {} : { onRemoveFile: onRemoveFile }, { uploading: uploading }), file.id)); }) }), void 0)),
2861
2861
  jsx(AnimateHeight, __assign({ duration: 300, height: isOverMaxFiles ? 'auto' : 0 }, { children: jsx("p", __assign({ className: "tc-red-500 p-p--small" }, { children: (textOverrides === null || textOverrides === void 0 ? void 0 : textOverrides.tooManyFilesError) || 'Too many files.' }), void 0) }), void 0)] }), void 0));
2862
2862
  };
2863
2863