@mcurros2/microm 1.1.39-0 → 1.1.41-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
@@ -36478,6 +36478,7 @@ const $55dd21617ac1c7dc$export$5e15d737b33a1c27 = /*#__PURE__*/ (0, $b4te3$react
36478
36478
  });
36479
36479
  const { handleLoadMore: handleLoadMore } = dataViewAPI;
36480
36480
  const limit_number = parseInt(limit || "0");
36481
+ const effectiveFormMode = formMode || (parentFormAPI === null || parentFormAPI === void 0 ? void 0 : parentFormAPI.formMode) || "view";
36481
36482
  return (0, $b4te3$reactjsxruntime.jsx)("section", {
36482
36483
  ref: ref,
36483
36484
  children: (0, $b4te3$reactjsxruntime.jsxs)((0, $b4te3$mantinecore.Stack), {
@@ -36530,7 +36531,7 @@ const $55dd21617ac1c7dc$export$5e15d737b33a1c27 = /*#__PURE__*/ (0, $b4te3$react
36530
36531
  actionsButtonVariant: actionsButtonVariant,
36531
36532
  clientActions: entity ? entity.def.clientActions : {},
36532
36533
  handleExecuteAction: dataViewAPI.handleExecuteAction,
36533
- parentFormMode: formMode || (parentFormAPI === null || parentFormAPI === void 0 ? void 0 : parentFormAPI.formMode)
36534
+ parentFormMode: effectiveFormMode
36534
36535
  })),
36535
36536
  dataViewAPI.isLoading && (0, $b4te3$reactjsxruntime.jsxs)((0, $b4te3$mantinecore.Group), {
36536
36537
  children: [
@@ -36576,9 +36577,9 @@ const $55dd21617ac1c7dc$export$5e15d737b33a1c27 = /*#__PURE__*/ (0, $b4te3$react
36576
36577
  EntityCard: Card,
36577
36578
  recordIndex: index,
36578
36579
  entity: entity,
36579
- enableDelete: enableDelete,
36580
- enableEdit: enableEdit,
36581
- enableView: enableView,
36580
+ enableDelete: effectiveFormMode !== "view" && enableDelete,
36581
+ enableEdit: effectiveFormMode !== "view" && enableEdit,
36582
+ enableView: enableView || effectiveFormMode === "view",
36582
36583
  handleSelectRecord: dataViewAPI.handleSelectRecord,
36583
36584
  handleDeselectRecord: dataViewAPI.handleDeselectRecord,
36584
36585
  handleDeleteClick: dataViewAPI.handleDeleteRecord,
@@ -45252,7 +45253,7 @@ const $ff044f3295c81f45$export$6ff6b9827853730f = {
45252
45253
  cancelLabel: "Cancel"
45253
45254
  };
45254
45255
  function $ff044f3295c81f45$export$1a5cb5295a7d2749(props) {
45255
- 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, [
45256
45257
  "IdleIcon",
45257
45258
  "UploadText",
45258
45259
  "uploadAPI",
@@ -45266,7 +45267,8 @@ function $ff044f3295c81f45$export$1a5cb5295a7d2749(props) {
45266
45267
  "operationCancelledText",
45267
45268
  "pdfCannotBeViewedText",
45268
45269
  "showCancelButton",
45269
- "cancelLabel"
45270
+ "cancelLabel",
45271
+ "parentFormAPI"
45270
45272
  ]);
45271
45273
  const { uploadFiles: uploadFiles, uploadProgress: uploadProgress, errorNotification: errorNotification, cancelledNotification: cancelledNotification, clearNotifications: clearNotifications, uploadingNotification: uploadingNotification, deleteFile: deleteFile, downloadFile: downloadFile, cancelUpload: cancelUpload, loadingNotification: loadingNotification } = uploadAPI;
45272
45274
  const theme = (0, $b4te3$mantinecore.useMantineTheme)();
@@ -45338,26 +45340,30 @@ function $ff044f3295c81f45$export$1a5cb5295a7d2749(props) {
45338
45340
  size: "1rem"
45339
45341
  })
45340
45342
  }),
45341
- (0, $b4te3$reactjsxruntime.jsx)((0, $b4te3$mantinecore.ActionIcon), {
45342
- color: theme.primaryColor,
45343
- variant: "light",
45344
- onClick: ()=>$ff044f3295c81f45$var$__awaiter(this, void 0, void 0, function*() {
45345
- return yield downloadFile(report.documentURL);
45346
- }),
45347
- children: (0, $b4te3$reactjsxruntime.jsx)((0, $b4te3$tablericonsreact.IconDownload), {
45348
- size: "1rem"
45349
- })
45350
- }),
45351
- (0, $b4te3$reactjsxruntime.jsx)((0, $b4te3$mantinecore.ActionIcon), {
45352
- disabled: dropzoneProps.disabled,
45353
- color: theme.primaryColor,
45354
- variant: "light",
45355
- onClick: ()=>$ff044f3295c81f45$var$__awaiter(this, void 0, void 0, function*() {
45356
- return yield handleDeleteFile(report.file_id);
45343
+ (parentFormAPI === null || parentFormAPI === void 0 ? void 0 : parentFormAPI.formMode) !== "view" && (0, $b4te3$reactjsxruntime.jsxs)((0, $b4te3$reactjsxruntime.Fragment), {
45344
+ children: [
45345
+ (0, $b4te3$reactjsxruntime.jsx)((0, $b4te3$mantinecore.ActionIcon), {
45346
+ color: theme.primaryColor,
45347
+ variant: "light",
45348
+ onClick: ()=>$ff044f3295c81f45$var$__awaiter(this, void 0, void 0, function*() {
45349
+ return yield downloadFile(report.documentURL);
45350
+ }),
45351
+ children: (0, $b4te3$reactjsxruntime.jsx)((0, $b4te3$tablericonsreact.IconDownload), {
45352
+ size: "1rem"
45353
+ })
45357
45354
  }),
45358
- children: (0, $b4te3$reactjsxruntime.jsx)((0, $b4te3$tablericonsreact.IconTrash), {
45359
- size: "1rem"
45360
- })
45355
+ (0, $b4te3$reactjsxruntime.jsx)((0, $b4te3$mantinecore.ActionIcon), {
45356
+ disabled: dropzoneProps.disabled,
45357
+ color: theme.primaryColor,
45358
+ variant: "light",
45359
+ onClick: ()=>$ff044f3295c81f45$var$__awaiter(this, void 0, void 0, function*() {
45360
+ return yield handleDeleteFile(report.file_id);
45361
+ }),
45362
+ children: (0, $b4te3$reactjsxruntime.jsx)((0, $b4te3$tablericonsreact.IconTrash), {
45363
+ size: "1rem"
45364
+ })
45365
+ })
45366
+ ]
45361
45367
  })
45362
45368
  ]
45363
45369
  })