@mcurros2/microm 1.1.347-0 → 1.1.348-0
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/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9092,7 +9092,7 @@ const $ad822dbf504c78b4$var$createStatusID = (file)=>{
|
|
|
9092
9092
|
return `${file.name}-${file.size}-${randomPart}`;
|
|
9093
9093
|
};
|
|
9094
9094
|
function $ad822dbf504c78b4$export$5c1c888d0d490e03(props) {
|
|
9095
|
-
const { client: client, maxIndividualFileSize: maxIndividualFileSize, maxTotalFilesSize: maxTotalFilesSize, maxFilesCount: maxFilesCount, youCanUploadAMaximumOfText: youCanUploadAMaximumOfText, filesText: filesText, exceedMaximumIndividualSizeText: exceedMaximumIndividualSizeText, unspecifiedErrorWhenUploadingFileText: unspecifiedErrorWhenUploadingFileText, totalUploadExceedsMaximumSizeText: totalUploadExceedsMaximumSizeText, fileProcessColumn: fileProcessColumn, onCancel: onCancel, editor: editor, imageProcessing: imageProcessing, imageEditorTitle: imageEditorTitle, imageEditorProps: imageEditorProps, imageEditorModalProps: imageEditorModalProps, onValidateFile: onValidateFile, onProcessFile: onProcessFile, onBeforeUpload: onBeforeUpload, onBeforeReplace: onBeforeReplace, onUploadComplete: onUploadComplete, thumbnailMaxSize: thumbnailMaxSize, thumbnailQuality: thumbnailQuality, loadFilesOnMount: loadFilesOnMount } = (0, $b4te3$mantinecore.useComponentDefaultProps)('useFileUpload', $ad822dbf504c78b4$export$b54531e9f4f81a9, props);
|
|
9095
|
+
const { client: client, maxIndividualFileSize: maxIndividualFileSize, maxTotalFilesSize: maxTotalFilesSize, maxFilesCount: maxFilesCount, youCanUploadAMaximumOfText: youCanUploadAMaximumOfText, filesText: filesText, exceedMaximumIndividualSizeText: exceedMaximumIndividualSizeText, unspecifiedErrorWhenUploadingFileText: unspecifiedErrorWhenUploadingFileText, totalUploadExceedsMaximumSizeText: totalUploadExceedsMaximumSizeText, fileProcessColumn: fileProcessColumn, onCancel: onCancel, editor: editor, imageProcessing: imageProcessing, imageEditorTitle: imageEditorTitle, imageEditorProps: imageEditorProps, imageEditorModalProps: imageEditorModalProps, onValidateFile: onValidateFile, onProcessFile: onProcessFile, onBeforeUpload: onBeforeUpload, onBeforeReplace: onBeforeReplace, onUploadComplete: onUploadComplete, onDeleteComplete: onDeleteComplete, thumbnailMaxSize: thumbnailMaxSize, thumbnailQuality: thumbnailQuality, loadFilesOnMount: loadFilesOnMount } = (0, $b4te3$mantinecore.useComponentDefaultProps)('useFileUpload', $ad822dbf504c78b4$export$b54531e9f4f81a9, props);
|
|
9096
9096
|
const [filesByID, setFilesByID] = (0, $b4te3$react.useState)({});
|
|
9097
9097
|
const [operation, setOperation] = (0, $b4te3$react.useState)('idle');
|
|
9098
9098
|
const [errorNotification, setErrorNotification] = (0, $b4te3$react.useState)();
|
|
@@ -9457,7 +9457,9 @@ function $ad822dbf504c78b4$export$5c1c888d0d490e03(props) {
|
|
|
9457
9457
|
};
|
|
9458
9458
|
try {
|
|
9459
9459
|
setErrorNotification(undefined);
|
|
9460
|
-
|
|
9460
|
+
const result = await deleteStoredFile(fileGUID, controller.signal);
|
|
9461
|
+
if (!result.Failed) await onDeleteComplete?.(fileGUID);
|
|
9462
|
+
return result;
|
|
9461
9463
|
} catch (error) {
|
|
9462
9464
|
if (!(error instanceof Error && error.name === 'AbortError')) setErrorNotification(error instanceof Error ? error.message : String(error));
|
|
9463
9465
|
return {
|
|
@@ -9469,7 +9471,8 @@ function $ad822dbf504c78b4$export$5c1c888d0d490e03(props) {
|
|
|
9469
9471
|
}, [
|
|
9470
9472
|
beginOperation,
|
|
9471
9473
|
deleteStoredFile,
|
|
9472
|
-
finishOperation
|
|
9474
|
+
finishOperation,
|
|
9475
|
+
onDeleteComplete
|
|
9473
9476
|
]);
|
|
9474
9477
|
const findFile = (0, $b4te3$react.useCallback)((file)=>{
|
|
9475
9478
|
if (typeof file !== 'string') return file;
|
|
@@ -42180,7 +42183,7 @@ const $8cba51256aebea2d$export$9e8d6341d22c7058 = {
|
|
|
42180
42183
|
}
|
|
42181
42184
|
};
|
|
42182
42185
|
function $8cba51256aebea2d$export$a2bc9feb52ac7227(props) {
|
|
42183
|
-
const { client: client, fileProcessColumn: fileProcessColumn, labels: suppliedLabels, initialImageURL: initialImageURL, parentFormAPI: parentFormAPI, fileGUIDColumn: fileGUIDColumn, maxFileSize: maxFileSize, editor: editor, imageProcessing: imageProcessing } = (0, $b4te3$mantinecore.useComponentDefaultProps)('AvatarUploader', $8cba51256aebea2d$export$9e8d6341d22c7058, props);
|
|
42186
|
+
const { client: client, fileProcessColumn: fileProcessColumn, labels: suppliedLabels, initialImageURL: initialImageURL, parentFormAPI: parentFormAPI, fileGUIDColumn: fileGUIDColumn, maxFileSize: maxFileSize, editor: editor, imageProcessing: imageProcessing, onDeleteComplete: onDeleteComplete } = (0, $b4te3$mantinecore.useComponentDefaultProps)('AvatarUploader', $8cba51256aebea2d$export$9e8d6341d22c7058, props);
|
|
42184
42187
|
const labels = (0, $b4te3$react.useMemo)(()=>({
|
|
42185
42188
|
...$8cba51256aebea2d$var$AvatarUploaderDefaultLabels,
|
|
42186
42189
|
...suppliedLabels
|
|
@@ -42273,7 +42276,8 @@ function $8cba51256aebea2d$export$a2bc9feb52ac7227(props) {
|
|
|
42273
42276
|
withCloseButton: false
|
|
42274
42277
|
},
|
|
42275
42278
|
onBeforeReplace: async ()=>await confirmReplacement(),
|
|
42276
|
-
onUploadComplete: commitUploadedFile
|
|
42279
|
+
onUploadComplete: commitUploadedFile,
|
|
42280
|
+
onDeleteComplete: onDeleteComplete
|
|
42277
42281
|
});
|
|
42278
42282
|
const selectedGUID = fileGUIDColumn.value || undefined;
|
|
42279
42283
|
const currentFile = uploadAPI.files.find((file)=>file.vc_fileguid === selectedGUID);
|