pollination-react-io 1.58.1 → 1.59.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/build/hooks/usePollinationPanel.d.ts +1 -0
- package/build/index.esm.js +20 -13
- package/build/index.esm.js.map +1 -1
- package/build/index.js +20 -13
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
@@ -38031,6 +38031,11 @@ var usePollinationPanel = function () {
|
|
38031
38031
|
return;
|
38032
38032
|
return panel.FromFileToBase64(filePath);
|
38033
38033
|
}, [panel]);
|
38034
|
+
var fileExplorer = React.useCallback(function (root) {
|
38035
|
+
if (!panel)
|
38036
|
+
return;
|
38037
|
+
return panel.FileExplorer(root);
|
38038
|
+
}, [panel]);
|
38034
38039
|
var fetchLocalRun = React.useCallback(function (path) {
|
38035
38040
|
if (path === void 0) { path = ''; }
|
38036
38041
|
if (!panel)
|
@@ -38066,7 +38071,8 @@ var usePollinationPanel = function () {
|
|
38066
38071
|
fromFileToBase64: fromFileToBase64,
|
38067
38072
|
getFilesFromDir: getFilesFromDir,
|
38068
38073
|
fetchLocalRun: fetchLocalRun,
|
38069
|
-
fetchLocalJob: fetchLocalJob
|
38074
|
+
fetchLocalJob: fetchLocalJob,
|
38075
|
+
fileExplorer: fileExplorer
|
38070
38076
|
};
|
38071
38077
|
};
|
38072
38078
|
|
@@ -48749,7 +48755,7 @@ var RunCard = function (_a) {
|
|
48749
48755
|
var _b;
|
48750
48756
|
var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
48751
48757
|
var projectName = _a.projectName, projectOwner = _a.projectOwner, _run = _a.run, style = _a.style, authUser = _a.authUser, client = _a.client, enableClick = _a.enableClick, getTab = _a.getTab, defaultTab = _a.defaultTab, getValue = _a.getValue, _o = _a.interval, interval = _o === void 0 ? 5000 : _o, _p = _a.canWrite, canWrite = _p === void 0 ? false : _p, _q = _a.localRun, localRun = _q === void 0 ? false : _q, _r = _a.loaderNode, loaderNode = _r === void 0 ? undefined : _r;
|
48752
|
-
var _s = usePollinationPanel(), fetchLocalRun = _s.fetchLocalRun, fetchLocalJob = _s.fetchLocalJob;
|
48758
|
+
var _s = usePollinationPanel(), fetchLocalRun = _s.fetchLocalRun, fetchLocalJob = _s.fetchLocalJob, fileExplorer = _s.fileExplorer;
|
48753
48759
|
var disabled = React.useMemo(function () {
|
48754
48760
|
if (!localRun)
|
48755
48761
|
return;
|
@@ -48925,9 +48931,14 @@ var RunCard = function (_a) {
|
|
48925
48931
|
React__default["default"].createElement(FolderOutlined$1, { className: 'link', onClick: function (e) {
|
48926
48932
|
e.stopPropagation();
|
48927
48933
|
getTab(RunTabs.workspace);
|
48928
|
-
|
48929
|
-
|
48930
|
-
|
48934
|
+
if (localRun) {
|
48935
|
+
fileExplorer(_run.id);
|
48936
|
+
}
|
48937
|
+
else {
|
48938
|
+
toggleHover(RunTabs.workspace, true);
|
48939
|
+
toggleHover(RunTabs.details, false);
|
48940
|
+
toggleHover(RunTabs.debug, false);
|
48941
|
+
}
|
48931
48942
|
}, onMouseOver: function (e) {
|
48932
48943
|
toggleHover('workspaceOver', true);
|
48933
48944
|
}, onMouseLeave: function (e) {
|
@@ -49558,6 +49569,7 @@ styleInject(css_248z$2);
|
|
49558
49569
|
var RunContent = function (_a) {
|
49559
49570
|
var inputData = _a.inputData, projectOwner = _a.projectOwner, projectName = _a.projectName, studyId = _a.studyId, runId = _a.runId, client = _a.client, title = _a.title, style = _a.style, getFileCard = _a.getFileCard, getFolderCard = _a.getFolderCard, _b = _a.isCloud, isCloud = _b === void 0 ? true : _b;
|
49560
49571
|
var _c = React.useState([]), currData = _c[0], setCurrData = _c[1];
|
49572
|
+
var fileExplorer = usePollinationPanel().fileExplorer;
|
49561
49573
|
var _d = React.useState([]), currParams = _d[0], setCurrParams = _d[1];
|
49562
49574
|
var _e = React.useState([]), currFiles = _e[0], setCurrFiles = _e[1];
|
49563
49575
|
var _f = React.useState([]), currFolders = _f[0], setCurrFolders = _f[1];
|
@@ -49607,14 +49619,9 @@ var RunContent = function (_a) {
|
|
49607
49619
|
* @param card Folder card props
|
49608
49620
|
*/
|
49609
49621
|
var onFolderClicked = function (card) {
|
49610
|
-
|
49611
|
-
|
49612
|
-
|
49613
|
-
}
|
49614
|
-
else {
|
49615
|
-
// TODO: Fix it later when Local is ready
|
49616
|
-
getFolderCard(card);
|
49617
|
-
// alert(runId.concat('/').concat(card.path))
|
49622
|
+
getFolderCard(card);
|
49623
|
+
if (!isCloud) {
|
49624
|
+
fileExplorer(card.path);
|
49618
49625
|
}
|
49619
49626
|
};
|
49620
49627
|
return React__default["default"].createElement("div", { className: 'cards-container', style: __assign({}, style) },
|