pollination-react-io 1.53.3 → 1.53.4
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 +26 -10
- package/build/index.esm.js.map +1 -1
- package/build/index.js +26 -10
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.esm.js
CHANGED
@@ -49104,7 +49104,7 @@ var FilePreview = function (_a) {
|
|
49104
49104
|
var css_248z$4 = ":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.card-group {\n border: 0.05rem solid var(--slate9);\n padding: 10px;\n margin: 0 0 10px 0;\n border-radius: 6px;\n background-color: \"#fff\" !important;\n}\n\n.expander {\n border: 0.05rem solid var(--slate9);\n padding: 10px;\n cursor: pointer;\n margin: 0 0 10px 0;\n transition: opacity 0.5s;\n border-radius: 6px;\n background-color: \"#fff\" !important;\n}\n\n.expander:hover {\n opacity: 0.7;\n}\n\n.expander > p {\n color: var(--primary3);\n display: inline;\n margin: 0 10px 0 0;\n text-align: left;\n}\n\n.arrow {\n float: right;\n padding: 0 10px 0 0;\n}";
|
49105
49105
|
styleInject(css_248z$4);
|
49106
49106
|
|
49107
|
-
var css_248z$3 = ".card-param {\n padding: 15px;\n position: relative;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-direction: column;\n flex-direction: column;\n min-width: 0;\n word-wrap: break-word;\n background-color: #fff;\n background-clip: border-box;\n border: 1px solid rgba(0, 0, 0, 0.125);\n border-radius: 0.35rem;\n text-align: center !important;\n transition: box-shadow 0.3s ease 0s, border-color 0.3s ease 0s;\n}\n\n.card-description {\n font-size: 0.8rem;\n color: rgb(125, 125, 125);\n line-height: 1.5;\n margin: 10px 0 0 0;\n text-align: left !important;\n}\n\n.card-folder: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.title-param {\n color: v(--primary3);\n font-weight: bolder;\n}\n\n.value-param {\n font-size: 1.25rem;\n color: rgb(125, 125, 125);\n}\n\nhr {\n width: 100%;\n text-align: left;\n margin-top: 1rem 1rem 0 0;\n border: 0;\n border-top: 1px solid rgba(0, 0, 0, 0.1) !important;\n}";
|
49107
|
+
var css_248z$3 = ".card-param {\n padding: 15px;\n position: relative;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-direction: column;\n flex-direction: column;\n min-width: 0;\n word-wrap: break-word;\n background-color: #fff;\n background-clip: border-box;\n border: 1px solid rgba(0, 0, 0, 0.125);\n border-radius: 0.35rem;\n text-align: center !important;\n transition: box-shadow 0.3s ease 0s, border-color 0.3s ease 0s;\n}\n\n.card-description {\n font-size: 0.8rem;\n color: rgb(125, 125, 125);\n line-height: 1.5;\n margin: 10px 0 0 0;\n text-align: left !important;\n}\n\n.card-folder: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.card-folder-inactive {\n filter: grayscale(1) !important;\n color: rgb(125, 125, 125) !important;\n cursor: auto;\n}\n\n.title-param {\n color: v(--primary3);\n font-weight: bolder;\n}\n\n.value-param {\n font-size: 1.25rem;\n color: rgb(125, 125, 125);\n}\n\nhr {\n width: 100%;\n text-align: left;\n margin-top: 1rem 1rem 0 0;\n border: 0;\n border-top: 1px solid rgba(0, 0, 0, 0.1) !important;\n}";
|
49108
49108
|
styleInject(css_248z$3);
|
49109
49109
|
|
49110
49110
|
var ParamCard = function (_a) {
|
@@ -49221,10 +49221,11 @@ var FileCard = function (_a) {
|
|
49221
49221
|
var _d = useState(false), open = _d[0], setOpen = _d[1];
|
49222
49222
|
var _e = useState(false), over = _e[0], setOver = _e[1];
|
49223
49223
|
var _f = useState(true), isLoading = _f[0], setIsLoading = _f[1];
|
49224
|
+
var _g = useState(false), isInactive = _g[0], setIsInactive = _g[1];
|
49224
49225
|
// Data to use for CAD injections
|
49225
|
-
var
|
49226
|
+
var _h = useState(), CADdata = _h[0], setCADdata = _h[1];
|
49226
49227
|
// File to send to parent
|
49227
|
-
var
|
49228
|
+
var _j = useState(), currFile = _j[0], setCurrFile = _j[1];
|
49228
49229
|
/**
|
49229
49230
|
* Check if run id is a valid UUID or file path (Local sim)
|
49230
49231
|
* @param str run id
|
@@ -49271,11 +49272,20 @@ var FileCard = function (_a) {
|
|
49271
49272
|
*/
|
49272
49273
|
var fetchAndSet = function (url) {
|
49273
49274
|
fetch(url)
|
49274
|
-
.then(function (
|
49275
|
-
.
|
49276
|
-
|
49277
|
-
|
49278
|
-
|
49275
|
+
.then(function (res) {
|
49276
|
+
if (res.status === 404) {
|
49277
|
+
// Deleted from cloud
|
49278
|
+
setIsInactive(true);
|
49279
|
+
setCurrFile(undefined);
|
49280
|
+
setCADintegration(undefined);
|
49281
|
+
return;
|
49282
|
+
}
|
49283
|
+
res.blob()
|
49284
|
+
.then(function (blob) {
|
49285
|
+
setCurrFile(blob);
|
49286
|
+
setCADintegration(blob);
|
49287
|
+
});
|
49288
|
+
})
|
49279
49289
|
.catch(function () { })
|
49280
49290
|
.finally(function () { return setIsLoading(false); });
|
49281
49291
|
};
|
@@ -49291,12 +49301,18 @@ var FileCard = function (_a) {
|
|
49291
49301
|
onClicked({ label: label, path: path, file: currFile, description: description, runId: runId });
|
49292
49302
|
}
|
49293
49303
|
}, [studyId, runId, label, path]);
|
49294
|
-
return React__default.createElement("div", { className:
|
49304
|
+
return React__default.createElement("div", { className: isInactive
|
49305
|
+
? 'card-param card-folder-inactive'
|
49306
|
+
: 'card-param card-folder', tabIndex: 0, role: 'button', key: label, onClick: function (event) {
|
49295
49307
|
event.stopPropagation();
|
49308
|
+
if (isInactive)
|
49309
|
+
return;
|
49296
49310
|
onClicked({ label: label, path: path, file: currFile, description: description });
|
49297
49311
|
} },
|
49298
49312
|
React__default.createElement("div", { className: 'title-param' },
|
49299
|
-
React__default.createElement("div", { style: { float: 'left', margin: '0 8px 0 0' } }, !isLoading ? React__default.createElement("div", { title:
|
49313
|
+
React__default.createElement("div", { style: { float: 'left', margin: '0 8px 0 0' } }, !isLoading ? React__default.createElement("div", { title: !isInactive
|
49314
|
+
? 'Open the viewer'
|
49315
|
+
: 'File preview disabled. Download the output from workspace' },
|
49300
49316
|
React__default.createElement("span", { style: { margin: '0 8px 0 0' } }, getFileIcon(18, ((_c = (_b = path.split('/')
|
49301
49317
|
.reverse()[0]) === null || _b === void 0 ? void 0 : _b.split('.')) === null || _c === void 0 ? void 0 : _c.pop()) || '')),
|
49302
49318
|
label)
|