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.
- package/build/index.esm.js +7 -4
- package/build/index.esm.js.map +1 -1
- package/build/index.js +7 -4
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
@@ -49428,6 +49428,8 @@ var FileCard = function (_a) {
|
|
49428
49428
|
.finally(function () { return setIsLoading(false); });
|
49429
49429
|
};
|
49430
49430
|
var extension = React.useMemo(function () {
|
49431
|
+
if (!path)
|
49432
|
+
return;
|
49431
49433
|
return path.split('/').reverse()[0];
|
49432
49434
|
}, [path]);
|
49433
49435
|
/**
|
@@ -49455,6 +49457,7 @@ var FileCard = function (_a) {
|
|
49455
49457
|
}
|
49456
49458
|
fetchAndSet("data:".concat(t, ";base64,").concat(base64Data));
|
49457
49459
|
};
|
49460
|
+
var isPanel = React.useMemo(function () { return checkPollinationPanel(); }, []);
|
49458
49461
|
React.useEffect(function () {
|
49459
49462
|
if (isCloud) {
|
49460
49463
|
// Generate Blob on click
|
@@ -49463,15 +49466,15 @@ var FileCard = function (_a) {
|
|
49463
49466
|
.catch(function () { return onClicked({ label: label, path: path, file: undefined, description: description, runId: runId }); });
|
49464
49467
|
}
|
49465
49468
|
else {
|
49466
|
-
var isPanel = checkPollinationPanel();
|
49467
49469
|
if (!isPanel) {
|
49468
49470
|
setIsInactive(true);
|
49469
49471
|
setCurrFile(undefined);
|
49470
49472
|
setCADintegration(undefined);
|
49471
49473
|
setIsLoading(false);
|
49472
|
-
return;
|
49473
49474
|
}
|
49474
|
-
|
49475
|
+
else {
|
49476
|
+
base64AndFetch(path);
|
49477
|
+
}
|
49475
49478
|
}
|
49476
49479
|
}, [studyId, runId, label, path]);
|
49477
49480
|
return React__default["default"].createElement("div", { className: isInactive
|
@@ -49486,7 +49489,7 @@ var FileCard = function (_a) {
|
|
49486
49489
|
React__default["default"].createElement("div", { style: { float: 'left', margin: '0 8px 0 0' } }, !isLoading ? React__default["default"].createElement("div", { title: !isInactive
|
49487
49490
|
? 'Open the viewer'
|
49488
49491
|
: 'File is missing. Check run workspace' },
|
49489
|
-
React__default["default"].createElement("span", { style: { margin: '0 8px 0 0' } }, getFileIcon(18, ((_c = (_b = path.split('/')
|
49492
|
+
React__default["default"].createElement("span", { style: { margin: '0 8px 0 0' } }, path && getFileIcon(18, ((_c = (_b = path.split('/')
|
49490
49493
|
.reverse()[0]) === null || _b === void 0 ? void 0 : _b.split('.')) === null || _c === void 0 ? void 0 : _c.pop()) || '')),
|
49491
49494
|
label)
|
49492
49495
|
: React__default["default"].createElement(LoadingIcon, { size: 14 })),
|