pollination-react-io 1.74.1 → 1.74.3
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.js
CHANGED
@@ -49784,7 +49784,7 @@ var CADtypeEnum;
|
|
49784
49784
|
})(CADtypeEnum || (CADtypeEnum = {}));
|
49785
49785
|
var FileCard = function (_a) {
|
49786
49786
|
var _b, _c;
|
49787
|
-
var projectOwner = _a.projectOwner, projectName = _a.projectName, client = _a.client,
|
49787
|
+
var projectOwner = _a.projectOwner, projectName = _a.projectName, client = _a.client, run = _a.run, label = _a.label, path = _a.path, file = _a.file, description = _a.description, onClicked = _a.onClicked, _d = _a.isCloud, isCloud = _d === void 0 ? true : _d;
|
49788
49788
|
var host = getHost();
|
49789
49789
|
var fromFileToBase64 = usePollinationPanel().fromFileToBase64;
|
49790
49790
|
var _e = React.useState(false), open = _e[0], setOpen = _e[1];
|
@@ -49857,11 +49857,13 @@ var FileCard = function (_a) {
|
|
49857
49857
|
setCurrFile(blob);
|
49858
49858
|
setCADintegration(blob);
|
49859
49859
|
setIsLoading(false);
|
49860
|
+
setIsInactive(false);
|
49860
49861
|
});
|
49861
49862
|
})
|
49862
49863
|
.catch(function (err) {
|
49863
49864
|
console.error(err);
|
49864
49865
|
setIsLoading(false);
|
49866
|
+
setIsInactive(true);
|
49865
49867
|
});
|
49866
49868
|
};
|
49867
49869
|
var extension = React.useMemo(function () {
|
@@ -49904,9 +49906,9 @@ var FileCard = function (_a) {
|
|
49904
49906
|
React.useEffect(function () {
|
49905
49907
|
if (isCloud) {
|
49906
49908
|
// Generate Blob on click
|
49907
|
-
|
49909
|
+
run && downloadArtifact(path, run.status.job_id)
|
49908
49910
|
.then(function (url) { return fetchAndSet(url); })
|
49909
|
-
.catch(function () { return onClicked({ label: label, path: path, file: undefined, description: description
|
49911
|
+
.catch(function () { return onClicked({ label: label, path: path, file: undefined, description: description }); });
|
49910
49912
|
}
|
49911
49913
|
else {
|
49912
49914
|
// Some inputs has path == null
|
@@ -49920,7 +49922,7 @@ var FileCard = function (_a) {
|
|
49920
49922
|
base64AndFetch(path);
|
49921
49923
|
}
|
49922
49924
|
}
|
49923
|
-
}, [
|
49925
|
+
}, [run, label, path]);
|
49924
49926
|
return React__default["default"].createElement("div", { className: isInactive
|
49925
49927
|
? 'card-param card-folder-inactive'
|
49926
49928
|
: 'card-param card-folder', tabIndex: 0, role: 'button', key: label, onClick: function (event) {
|
@@ -50003,7 +50005,7 @@ var css_248z$2 = ":root {\n --background: #FFFAEE;\n --primary: #1890ff;\n --
|
|
50003
50005
|
styleInject(css_248z$2);
|
50004
50006
|
|
50005
50007
|
var RunContent = function (_a) {
|
50006
|
-
var inputData = _a.inputData, projectOwner = _a.projectOwner, projectName = _a.projectName,
|
50008
|
+
var inputData = _a.inputData, projectOwner = _a.projectOwner, projectName = _a.projectName, run = _a.run, client = _a.client, title = _a.title, style = _a.style, getFileCard = _a.getFileCard, getFolderCard = _a.getFolderCard, _b = _a.isCloud, isCloud = _b === void 0 ? true : _b;
|
50007
50009
|
var _c = React.useState([]), currData = _c[0], setCurrData = _c[1];
|
50008
50010
|
var fileExplorer = usePollinationPanel().fileExplorer;
|
50009
50011
|
var _d = React.useState([]), currParams = _d[0], setCurrParams = _d[1];
|
@@ -50020,7 +50022,7 @@ var RunContent = function (_a) {
|
|
50020
50022
|
switch (i.type) {
|
50021
50023
|
case 'StepFileInput':
|
50022
50024
|
case 'StepFileOutput':
|
50023
|
-
files.push({
|
50025
|
+
files.push({ run: run, label: i.name,
|
50024
50026
|
path: i.source.path, description: i.description });
|
50025
50027
|
break;
|
50026
50028
|
case 'StepFolderInput':
|
@@ -50062,10 +50064,10 @@ var RunContent = function (_a) {
|
|
50062
50064
|
};
|
50063
50065
|
return React__default["default"].createElement("div", { className: 'cards-container', style: __assign({}, style) },
|
50064
50066
|
React__default["default"].createElement("h5", { className: 'cards-container-title' }, title || 'Something'),
|
50065
|
-
currFiles.length > 0 && projectOwner && projectName && client &&
|
50067
|
+
currFiles.length > 0 && projectOwner && projectName && client && run && React__default["default"].createElement("div", { style: { padding: '20px' } },
|
50066
50068
|
React__default["default"].createElement("div", { className: 'cards' }, currFiles.map(function (_a, index) {
|
50067
50069
|
var label = _a.label, path = _a.path, description = _a.description;
|
50068
|
-
return React__default["default"].createElement(FileCard, { projectOwner: projectOwner, projectName: projectName,
|
50070
|
+
return React__default["default"].createElement(FileCard, { projectOwner: projectOwner, projectName: projectName, run: run, client: client, key: "filecard-".concat(index), label: label, path: path, description: description, onClicked: onFileClicked, isCloud: isCloud });
|
50069
50071
|
}))),
|
50070
50072
|
currFolders.length > 0 && React__default["default"].createElement("div", { style: { padding: '20px' } },
|
50071
50073
|
React__default["default"].createElement("div", { className: 'cards' }, currFolders.map(function (_a, index) {
|
@@ -50112,11 +50114,11 @@ var RunDetails = function (_a) {
|
|
50112
50114
|
}, [run]);
|
50113
50115
|
return (React__default["default"].createElement("div", null,
|
50114
50116
|
outputs &&
|
50115
|
-
React__default["default"].createElement(RunContent, { title: 'Outputs', inputData: outputs, projectName: projectName, projectOwner: projectOwner,
|
50117
|
+
React__default["default"].createElement(RunContent, { title: 'Outputs', inputData: outputs, projectName: projectName, projectOwner: projectOwner, run: run, client: client, style: style, getFileCard: getFileCard, getFolderCard: getFolderCard, isCloud: isCloud }),
|
50116
50118
|
recipeInputs &&
|
50117
|
-
React__default["default"].createElement(RunContent, { title: 'Inputs', inputData: recipeInputs, projectName: projectName, projectOwner: projectOwner,
|
50119
|
+
React__default["default"].createElement(RunContent, { title: 'Inputs', inputData: recipeInputs, projectName: projectName, projectOwner: projectOwner, run: run, client: client, style: style, getFileCard: getFileCard, getFolderCard: getFolderCard, isCloud: isCloud }),
|
50118
50120
|
extraInputs && extraInputs.length > 0 &&
|
50119
|
-
React__default["default"].createElement(RunContent, { title: 'Extra Inputs', inputData: extraInputs, projectName: projectName, projectOwner: projectOwner,
|
50121
|
+
React__default["default"].createElement(RunContent, { title: 'Extra Inputs', inputData: extraInputs, projectName: projectName, projectOwner: projectOwner, run: run, client: client, style: style, getFileCard: getFileCard, getFolderCard: getFolderCard, isCloud: isCloud })));
|
50120
50122
|
};
|
50121
50123
|
|
50122
50124
|
var css_248z$1 = ":root {\n --background: #FFFAEE;\n --primary: #1890ff;\n --primary2: #40a9ff;\n --primary1: #cceefe;\n --primary0: #e6f7ff;\n --secondary: #fff566;\n --primary3: #000;\n --success: #46A758;\n --warning: #F76809;\n --danger: #FF4616;\n /* radix-ui/colors */\n --slate1: hsl(206, 30.0%, 98.8%);\n --slate2: hsl(210, 16.7%, 97.6%);\n --slate3: hsl(209, 13.3%, 95.3%);\n --slate4: hsl(209, 12.2%, 93.2%);\n --slate5: hsl(208, 11.7%, 91.1%);\n --slate6: hsl(208, 11.3%, 88.9%);\n --slate7: hsl(207, 11.1%, 85.9%);\n --slate8: hsl(205, 10.7%, 78.0%);\n --slate9: hsl(206, 6.0%, 56.1%);\n --slate10: hsl(206, 5.8%, 52.3%);\n --slate11: hsl(206, 6.0%, 43.5%);\n --slate12: hsl(206, 24.0%, 9.0%);\n}\n\n@keyframes spin {\n from {\n transform: rotate(0);\n }\n to {\n transform: rotate(360deg);\n }\n}\n.spin {\n animation: spin 1s linear 0s infinite;\n}\n\n@keyframes Animation {\n 0% {\n background-position: 200%;\n }\n 50% {\n background-position: 100%;\n }\n 100% {\n background-position: 0%;\n }\n}\n.loading {\n background: linear-gradient(45deg, transparent, var(--primary), 12%, transparent);\n background-size: 200%;\n animation: Animation 3s ease infinite;\n}\n\n@keyframes open {\n from {\n height: 0;\n }\n to {\n height: var(--radix-collapsible-content-height);\n }\n}\n@keyframes close {\n from {\n height: var(--radix-collapsible-content-height);\n }\n to {\n height: 0;\n }\n}\n.collapse-content {\n overflow: hidden;\n font-size: inherit;\n color: inherit;\n}\n\n.collapse-content[data-state=open] {\n animation: open 300ms ease-out;\n}\n\n.collapse-content[data-state=closed] {\n animation: close 300ms ease-out;\n}\n\n.run-progress {\n grid-area: runprogress;\n font-size: 0.9rem;\n text-align: left !important;\n}\n\n.run-link {\n grid-area: runlink;\n text-align: right !important;\n font-size: 1rem;\n white-space: nowrap;\n}\n\n.run-details {\n grid-area: rundetails;\n font-size: 0.9rem;\n}\n\n.study-run-container {\n display: grid;\n grid-template-areas: \"runprogress runprogress runprogress runprogress runprogress runlink\" \"rundetails rundetails rundetails rundetails rundetails rundetails\";\n gap: 0.35rem;\n border: 0.1rem solid;\n align-items: center;\n padding: 0.75rem;\n transition: box-shadow 0.3s ease 0s, border-color 0.3s ease 0s;\n grid-template-rows: max-content auto;\n border-radius: 6px;\n line-height: 1.5;\n}\n\n.study-run-container:hover {\n cursor: pointer;\n box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 2px -2px, rgba(0, 0, 0, 0.12) 0px 3px 6px 0px, rgba(0, 0, 0, 0.09) 0px 5px 12px 4px;\n}\n\n.run-navigator {\n display: grid;\n grid-template-columns: min-content auto min-content min-content;\n grid-auto-rows: auto;\n align-items: center;\n grid-gap: 0.9rem;\n}\n\n.run-pg-input {\n margin: 0 4px 0 4px;\n padding: 8px 8px;\n text-align: center;\n color: rgba(0, 0, 0, 0.8509803922);\n width: min-content;\n border-radius: 2px;\n font-size: 12px;\n border: 1px solid rgba(0, 0, 0, 0.125);\n}\n\n.container-scroll {\n display: inline-flex;\n flex-direction: row;\n overflow-x: auto;\n width: 100%;\n}\n\n.blink-effect {\n animation: blinker 5s linear infinite;\n}\n\n@keyframes blinker {\n 50% {\n border: 0.1rem solid white;\n }\n}";
|