pollination-react-io 1.74.0 → 1.74.2
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];
|
@@ -49904,9 +49904,9 @@ var FileCard = function (_a) {
|
|
49904
49904
|
React.useEffect(function () {
|
49905
49905
|
if (isCloud) {
|
49906
49906
|
// Generate Blob on click
|
49907
|
-
|
49907
|
+
run && downloadArtifact(path, run.status.job_id)
|
49908
49908
|
.then(function (url) { return fetchAndSet(url); })
|
49909
|
-
.catch(function () { return onClicked({ label: label, path: path, file: undefined, description: description
|
49909
|
+
.catch(function () { return onClicked({ label: label, path: path, file: undefined, description: description }); });
|
49910
49910
|
}
|
49911
49911
|
else {
|
49912
49912
|
// Some inputs has path == null
|
@@ -49920,7 +49920,7 @@ var FileCard = function (_a) {
|
|
49920
49920
|
base64AndFetch(path);
|
49921
49921
|
}
|
49922
49922
|
}
|
49923
|
-
}, [
|
49923
|
+
}, [run, label, path]);
|
49924
49924
|
return React__default["default"].createElement("div", { className: isInactive
|
49925
49925
|
? 'card-param card-folder-inactive'
|
49926
49926
|
: 'card-param card-folder', tabIndex: 0, role: 'button', key: label, onClick: function (event) {
|
@@ -49969,10 +49969,10 @@ var FileCard = function (_a) {
|
|
49969
49969
|
// @ts-ignore
|
49970
49970
|
defaultAction: Action$1.preview, optionsConfig: {
|
49971
49971
|
add: true,
|
49972
|
-
delete:
|
49972
|
+
delete: (host === 'revit'),
|
49973
49973
|
'subscribe-preview': false,
|
49974
|
-
clear:
|
49975
|
-
preview:
|
49974
|
+
clear: (host !== 'revit'),
|
49975
|
+
preview: (host !== 'revit')
|
49976
49976
|
}, key: CADdata.id, defaultKey: CADdata.id })),
|
49977
49977
|
open && React__default["default"].createElement("div", { className: 'card-description' }, description));
|
49978
49978
|
};
|
@@ -50003,7 +50003,7 @@ var css_248z$2 = ":root {\n --background: #FFFAEE;\n --primary: #1890ff;\n --
|
|
50003
50003
|
styleInject(css_248z$2);
|
50004
50004
|
|
50005
50005
|
var RunContent = function (_a) {
|
50006
|
-
var inputData = _a.inputData, projectOwner = _a.projectOwner, projectName = _a.projectName,
|
50006
|
+
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
50007
|
var _c = React.useState([]), currData = _c[0], setCurrData = _c[1];
|
50008
50008
|
var fileExplorer = usePollinationPanel().fileExplorer;
|
50009
50009
|
var _d = React.useState([]), currParams = _d[0], setCurrParams = _d[1];
|
@@ -50020,7 +50020,7 @@ var RunContent = function (_a) {
|
|
50020
50020
|
switch (i.type) {
|
50021
50021
|
case 'StepFileInput':
|
50022
50022
|
case 'StepFileOutput':
|
50023
|
-
files.push({
|
50023
|
+
files.push({ run: run, label: i.name,
|
50024
50024
|
path: i.source.path, description: i.description });
|
50025
50025
|
break;
|
50026
50026
|
case 'StepFolderInput':
|
@@ -50062,10 +50062,10 @@ var RunContent = function (_a) {
|
|
50062
50062
|
};
|
50063
50063
|
return React__default["default"].createElement("div", { className: 'cards-container', style: __assign({}, style) },
|
50064
50064
|
React__default["default"].createElement("h5", { className: 'cards-container-title' }, title || 'Something'),
|
50065
|
-
currFiles.length > 0 && projectOwner && projectName && client &&
|
50065
|
+
currFiles.length > 0 && projectOwner && projectName && client && run && React__default["default"].createElement("div", { style: { padding: '20px' } },
|
50066
50066
|
React__default["default"].createElement("div", { className: 'cards' }, currFiles.map(function (_a, index) {
|
50067
50067
|
var label = _a.label, path = _a.path, description = _a.description;
|
50068
|
-
return React__default["default"].createElement(FileCard, { projectOwner: projectOwner, projectName: projectName,
|
50068
|
+
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
50069
|
}))),
|
50070
50070
|
currFolders.length > 0 && React__default["default"].createElement("div", { style: { padding: '20px' } },
|
50071
50071
|
React__default["default"].createElement("div", { className: 'cards' }, currFolders.map(function (_a, index) {
|
@@ -50112,11 +50112,11 @@ var RunDetails = function (_a) {
|
|
50112
50112
|
}, [run]);
|
50113
50113
|
return (React__default["default"].createElement("div", null,
|
50114
50114
|
outputs &&
|
50115
|
-
React__default["default"].createElement(RunContent, { title: 'Outputs', inputData: outputs, projectName: projectName, projectOwner: projectOwner,
|
50115
|
+
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
50116
|
recipeInputs &&
|
50117
|
-
React__default["default"].createElement(RunContent, { title: 'Inputs', inputData: recipeInputs, projectName: projectName, projectOwner: projectOwner,
|
50117
|
+
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
50118
|
extraInputs && extraInputs.length > 0 &&
|
50119
|
-
React__default["default"].createElement(RunContent, { title: 'Extra Inputs', inputData: extraInputs, projectName: projectName, projectOwner: projectOwner,
|
50119
|
+
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
50120
|
};
|
50121
50121
|
|
50122
50122
|
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}";
|