@mcurros2/microm 1.1.40-0 → 1.1.42-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.js CHANGED
@@ -45253,7 +45253,7 @@ const $ff044f3295c81f45$export$6ff6b9827853730f = {
45253
45253
  cancelLabel: "Cancel"
45254
45254
  };
45255
45255
  function $ff044f3295c81f45$export$1a5cb5295a7d2749(props) {
45256
- const _a = (0, $b4te3$mantinecore.useComponentDefaultProps)("FileUploader", $ff044f3295c81f45$export$6ff6b9827853730f, props), { IdleIcon: IdleIcon, UploadText: UploadText, uploadAPI: uploadAPI, EachFileShouldNotExceedText: EachFileShouldNotExceedText, AttachUpToText: AttachUpToText, FilesText: FilesText, imageProps: imageProps, onDelete: onDelete, closeText: closeText, cancelledText: cancelledText, operationCancelledText: operationCancelledText, pdfCannotBeViewedText: pdfCannotBeViewedText, showCancelButton: showCancelButton, cancelLabel: cancelLabel } = _a, dropzoneProps = $ff044f3295c81f45$var$__rest(_a, [
45256
+ const _a = (0, $b4te3$mantinecore.useComponentDefaultProps)("FileUploader", $ff044f3295c81f45$export$6ff6b9827853730f, props), { IdleIcon: IdleIcon, UploadText: UploadText, uploadAPI: uploadAPI, EachFileShouldNotExceedText: EachFileShouldNotExceedText, AttachUpToText: AttachUpToText, FilesText: FilesText, imageProps: imageProps, onDelete: onDelete, closeText: closeText, cancelledText: cancelledText, operationCancelledText: operationCancelledText, pdfCannotBeViewedText: pdfCannotBeViewedText, showCancelButton: showCancelButton, cancelLabel: cancelLabel, parentFormAPI: parentFormAPI } = _a, dropzoneProps = $ff044f3295c81f45$var$__rest(_a, [
45257
45257
  "IdleIcon",
45258
45258
  "UploadText",
45259
45259
  "uploadAPI",
@@ -45267,11 +45267,13 @@ function $ff044f3295c81f45$export$1a5cb5295a7d2749(props) {
45267
45267
  "operationCancelledText",
45268
45268
  "pdfCannotBeViewedText",
45269
45269
  "showCancelButton",
45270
- "cancelLabel"
45270
+ "cancelLabel",
45271
+ "parentFormAPI"
45271
45272
  ]);
45272
45273
  const { uploadFiles: uploadFiles, uploadProgress: uploadProgress, errorNotification: errorNotification, cancelledNotification: cancelledNotification, clearNotifications: clearNotifications, uploadingNotification: uploadingNotification, deleteFile: deleteFile, downloadFile: downloadFile, cancelUpload: cancelUpload, loadingNotification: loadingNotification } = uploadAPI;
45273
45274
  const theme = (0, $b4te3$mantinecore.useMantineTheme)();
45274
45275
  const modals = (0, $k7qj2.useModal)();
45276
+ dropzoneProps.disabled = dropzoneProps.disabled || (parentFormAPI === null || parentFormAPI === void 0 ? void 0 : parentFormAPI.formMode) === "view";
45275
45277
  const handleUpload = (selectedFiles)=>$ff044f3295c81f45$var$__awaiter(this, void 0, void 0, function*() {
45276
45278
  yield uploadFiles(selectedFiles);
45277
45279
  });
@@ -45349,7 +45351,7 @@ function $ff044f3295c81f45$export$1a5cb5295a7d2749(props) {
45349
45351
  size: "1rem"
45350
45352
  })
45351
45353
  }),
45352
- (0, $b4te3$reactjsxruntime.jsx)((0, $b4te3$mantinecore.ActionIcon), {
45354
+ (parentFormAPI === null || parentFormAPI === void 0 ? void 0 : parentFormAPI.formMode) !== "view" && (0, $b4te3$reactjsxruntime.jsx)((0, $b4te3$mantinecore.ActionIcon), {
45353
45355
  disabled: dropzoneProps.disabled,
45354
45356
  color: theme.primaryColor,
45355
45357
  variant: "light",