pollination-react-io 1.53.2 → 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 +50 -13
- package/build/index.esm.js.map +1 -1
- package/build/index.js +50 -13
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
@@ -46541,6 +46541,13 @@ var SendGeometry = function (_a) {
|
|
46541
46541
|
});
|
46542
46542
|
};
|
46543
46543
|
}, [disabled, geometry, geometryOptions, key, selOpt, sendMessage]);
|
46544
|
+
var helpTextButton = {
|
46545
|
+
add: "Add geometry to the ".concat(host, " viewport"),
|
46546
|
+
preview: "Preview geometry in the ".concat(host, " viewport"),
|
46547
|
+
delete: "Delete geometry from the ".concat(host, " viewport"),
|
46548
|
+
clear: "Clear geometry from the ".concat(host, " viewport"),
|
46549
|
+
'subscribe-preview': "Render geometry in the ".concat(host, " viewport"),
|
46550
|
+
};
|
46544
46551
|
return (React__default["default"].createElement(SettingsButton, { style: style, disabled: disabled, onClick: function (e) {
|
46545
46552
|
e.stopPropagation();
|
46546
46553
|
if (disabled)
|
@@ -46615,7 +46622,7 @@ var SendGeometry = function (_a) {
|
|
46615
46622
|
return true;
|
46616
46623
|
return typeof optionsConfig[o.id] === 'undefined' ? true : optionsConfig[o.id];
|
46617
46624
|
}),
|
46618
|
-
}], asButtons: true, label: buttonLabel, helpText:
|
46625
|
+
}], asButtons: true, label: buttonLabel, helpText: helpTextButton[selOpt] }));
|
46619
46626
|
};
|
46620
46627
|
|
46621
46628
|
var Action$1;
|
@@ -46676,6 +46683,13 @@ var SendModel = function (_a) {
|
|
46676
46683
|
});
|
46677
46684
|
};
|
46678
46685
|
}, [disabled, hbjson, key, selOpt, sendHbjson]);
|
46686
|
+
var helpTextButton = {
|
46687
|
+
add: "Add model to the ".concat(host, " viewport"),
|
46688
|
+
preview: "Preview model in the ".concat(host, " viewport"),
|
46689
|
+
delete: "Delete model from the ".concat(host, " viewport"),
|
46690
|
+
clear: "Clear model from the ".concat(host, " viewport"),
|
46691
|
+
'subscribe-preview': "Render model in the ".concat(host, " viewport"),
|
46692
|
+
};
|
46679
46693
|
return (React__default["default"].createElement(SettingsButton, { style: style, disabled: disabled, onClick: function (e) {
|
46680
46694
|
e.stopPropagation();
|
46681
46695
|
if (disabled)
|
@@ -46742,7 +46756,7 @@ var SendModel = function (_a) {
|
|
46742
46756
|
return true;
|
46743
46757
|
return typeof optionsConfig[o.id] === 'undefined' ? true : optionsConfig[o.id];
|
46744
46758
|
}),
|
46745
|
-
}], asButtons: true, label: buttonLabel, helpText:
|
46759
|
+
}], asButtons: true, label: buttonLabel, helpText: helpTextButton[selOpt] }));
|
46746
46760
|
};
|
46747
46761
|
|
46748
46762
|
var Action;
|
@@ -46802,6 +46816,13 @@ var SendResults = function (_a) {
|
|
46802
46816
|
});
|
46803
46817
|
};
|
46804
46818
|
}, [disabled, geometryOptions, key, results, selOpt, sendMessage]);
|
46819
|
+
var helpTextButton = {
|
46820
|
+
add: "Add results to the ".concat(host, " viewport"),
|
46821
|
+
preview: "Preview results in the ".concat(host, " viewport"),
|
46822
|
+
delete: "Delete results from the ".concat(host, " viewport"),
|
46823
|
+
clear: "Clear results from the ".concat(host, " viewport"),
|
46824
|
+
'subscribe-preview': "Render results in the ".concat(host, " viewport"),
|
46825
|
+
};
|
46805
46826
|
return (React__default["default"].createElement(SettingsButton, { style: style, disabled: disabled, onClick: function (e) {
|
46806
46827
|
e.stopPropagation();
|
46807
46828
|
if (disabled)
|
@@ -46876,7 +46897,7 @@ var SendResults = function (_a) {
|
|
46876
46897
|
return true;
|
46877
46898
|
return typeof optionsConfig[o.id] === 'undefined' ? true : optionsConfig[o.id];
|
46878
46899
|
}),
|
46879
|
-
}], asButtons: true, label: buttonLabel, helpText:
|
46900
|
+
}], asButtons: true, label: buttonLabel, helpText: helpTextButton[selOpt] }));
|
46880
46901
|
};
|
46881
46902
|
|
46882
46903
|
var JobTabs;
|
@@ -49109,7 +49130,7 @@ var FilePreview = function (_a) {
|
|
49109
49130
|
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}";
|
49110
49131
|
styleInject(css_248z$4);
|
49111
49132
|
|
49112
|
-
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}";
|
49133
|
+
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}";
|
49113
49134
|
styleInject(css_248z$3);
|
49114
49135
|
|
49115
49136
|
var ParamCard = function (_a) {
|
@@ -49226,10 +49247,11 @@ var FileCard = function (_a) {
|
|
49226
49247
|
var _d = React.useState(false), open = _d[0], setOpen = _d[1];
|
49227
49248
|
var _e = React.useState(false), over = _e[0], setOver = _e[1];
|
49228
49249
|
var _f = React.useState(true), isLoading = _f[0], setIsLoading = _f[1];
|
49250
|
+
var _g = React.useState(false), isInactive = _g[0], setIsInactive = _g[1];
|
49229
49251
|
// Data to use for CAD injections
|
49230
|
-
var
|
49252
|
+
var _h = React.useState(), CADdata = _h[0], setCADdata = _h[1];
|
49231
49253
|
// File to send to parent
|
49232
|
-
var
|
49254
|
+
var _j = React.useState(), currFile = _j[0], setCurrFile = _j[1];
|
49233
49255
|
/**
|
49234
49256
|
* Check if run id is a valid UUID or file path (Local sim)
|
49235
49257
|
* @param str run id
|
@@ -49276,11 +49298,20 @@ var FileCard = function (_a) {
|
|
49276
49298
|
*/
|
49277
49299
|
var fetchAndSet = function (url) {
|
49278
49300
|
fetch(url)
|
49279
|
-
.then(function (
|
49280
|
-
.
|
49281
|
-
|
49282
|
-
|
49283
|
-
|
49301
|
+
.then(function (res) {
|
49302
|
+
if (res.status === 404) {
|
49303
|
+
// Deleted from cloud
|
49304
|
+
setIsInactive(true);
|
49305
|
+
setCurrFile(undefined);
|
49306
|
+
setCADintegration(undefined);
|
49307
|
+
return;
|
49308
|
+
}
|
49309
|
+
res.blob()
|
49310
|
+
.then(function (blob) {
|
49311
|
+
setCurrFile(blob);
|
49312
|
+
setCADintegration(blob);
|
49313
|
+
});
|
49314
|
+
})
|
49284
49315
|
.catch(function () { })
|
49285
49316
|
.finally(function () { return setIsLoading(false); });
|
49286
49317
|
};
|
@@ -49296,12 +49327,18 @@ var FileCard = function (_a) {
|
|
49296
49327
|
onClicked({ label: label, path: path, file: currFile, description: description, runId: runId });
|
49297
49328
|
}
|
49298
49329
|
}, [studyId, runId, label, path]);
|
49299
|
-
return React__default["default"].createElement("div", { className:
|
49330
|
+
return React__default["default"].createElement("div", { className: isInactive
|
49331
|
+
? 'card-param card-folder-inactive'
|
49332
|
+
: 'card-param card-folder', tabIndex: 0, role: 'button', key: label, onClick: function (event) {
|
49300
49333
|
event.stopPropagation();
|
49334
|
+
if (isInactive)
|
49335
|
+
return;
|
49301
49336
|
onClicked({ label: label, path: path, file: currFile, description: description });
|
49302
49337
|
} },
|
49303
49338
|
React__default["default"].createElement("div", { className: 'title-param' },
|
49304
|
-
React__default["default"].createElement("div", { style: { float: 'left', margin: '0 8px 0 0' } }, !isLoading ? React__default["default"].createElement("div", { title:
|
49339
|
+
React__default["default"].createElement("div", { style: { float: 'left', margin: '0 8px 0 0' } }, !isLoading ? React__default["default"].createElement("div", { title: !isInactive
|
49340
|
+
? 'Open the viewer'
|
49341
|
+
: 'File preview disabled. Download the output from workspace' },
|
49305
49342
|
React__default["default"].createElement("span", { style: { margin: '0 8px 0 0' } }, getFileIcon(18, ((_c = (_b = path.split('/')
|
49306
49343
|
.reverse()[0]) === null || _b === void 0 ? void 0 : _b.split('.')) === null || _c === void 0 ? void 0 : _c.pop()) || '')),
|
49307
49344
|
label)
|