pollination-react-io 1.58.0 → 1.58.1

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.
@@ -49402,6 +49402,8 @@ var FileCard = function (_a) {
49402
49402
  .finally(function () { return setIsLoading(false); });
49403
49403
  };
49404
49404
  var extension = useMemo(function () {
49405
+ if (!path)
49406
+ return;
49405
49407
  return path.split('/').reverse()[0];
49406
49408
  }, [path]);
49407
49409
  /**
@@ -49429,6 +49431,7 @@ var FileCard = function (_a) {
49429
49431
  }
49430
49432
  fetchAndSet("data:".concat(t, ";base64,").concat(base64Data));
49431
49433
  };
49434
+ var isPanel = useMemo(function () { return checkPollinationPanel(); }, []);
49432
49435
  useEffect(function () {
49433
49436
  if (isCloud) {
49434
49437
  // Generate Blob on click
@@ -49437,15 +49440,15 @@ var FileCard = function (_a) {
49437
49440
  .catch(function () { return onClicked({ label: label, path: path, file: undefined, description: description, runId: runId }); });
49438
49441
  }
49439
49442
  else {
49440
- var isPanel = checkPollinationPanel();
49441
49443
  if (!isPanel) {
49442
49444
  setIsInactive(true);
49443
49445
  setCurrFile(undefined);
49444
49446
  setCADintegration(undefined);
49445
49447
  setIsLoading(false);
49446
- return;
49447
49448
  }
49448
- base64AndFetch(path);
49449
+ else {
49450
+ base64AndFetch(path);
49451
+ }
49449
49452
  }
49450
49453
  }, [studyId, runId, label, path]);
49451
49454
  return React__default.createElement("div", { className: isInactive
@@ -49460,7 +49463,7 @@ var FileCard = function (_a) {
49460
49463
  React__default.createElement("div", { style: { float: 'left', margin: '0 8px 0 0' } }, !isLoading ? React__default.createElement("div", { title: !isInactive
49461
49464
  ? 'Open the viewer'
49462
49465
  : 'File is missing. Check run workspace' },
49463
- React__default.createElement("span", { style: { margin: '0 8px 0 0' } }, getFileIcon(18, ((_c = (_b = path.split('/')
49466
+ React__default.createElement("span", { style: { margin: '0 8px 0 0' } }, path && getFileIcon(18, ((_c = (_b = path.split('/')
49464
49467
  .reverse()[0]) === null || _b === void 0 ? void 0 : _b.split('.')) === null || _c === void 0 ? void 0 : _c.pop()) || '')),
49465
49468
  label)
49466
49469
  : React__default.createElement(LoadingIcon, { size: 14 })),