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.esm.js
CHANGED
@@ -46515,6 +46515,13 @@ var SendGeometry = function (_a) {
|
|
46515
46515
|
});
|
46516
46516
|
};
|
46517
46517
|
}, [disabled, geometry, geometryOptions, key, selOpt, sendMessage]);
|
46518
|
+
var helpTextButton = {
|
46519
|
+
add: "Add geometry to the ".concat(host, " viewport"),
|
46520
|
+
preview: "Preview geometry in the ".concat(host, " viewport"),
|
46521
|
+
delete: "Delete geometry from the ".concat(host, " viewport"),
|
46522
|
+
clear: "Clear geometry from the ".concat(host, " viewport"),
|
46523
|
+
'subscribe-preview': "Render geometry in the ".concat(host, " viewport"),
|
46524
|
+
};
|
46518
46525
|
return (React__default.createElement(SettingsButton, { style: style, disabled: disabled, onClick: function (e) {
|
46519
46526
|
e.stopPropagation();
|
46520
46527
|
if (disabled)
|
@@ -46589,7 +46596,7 @@ var SendGeometry = function (_a) {
|
|
46589
46596
|
return true;
|
46590
46597
|
return typeof optionsConfig[o.id] === 'undefined' ? true : optionsConfig[o.id];
|
46591
46598
|
}),
|
46592
|
-
}], asButtons: true, label: buttonLabel, helpText:
|
46599
|
+
}], asButtons: true, label: buttonLabel, helpText: helpTextButton[selOpt] }));
|
46593
46600
|
};
|
46594
46601
|
|
46595
46602
|
var Action$1;
|
@@ -46650,6 +46657,13 @@ var SendModel = function (_a) {
|
|
46650
46657
|
});
|
46651
46658
|
};
|
46652
46659
|
}, [disabled, hbjson, key, selOpt, sendHbjson]);
|
46660
|
+
var helpTextButton = {
|
46661
|
+
add: "Add model to the ".concat(host, " viewport"),
|
46662
|
+
preview: "Preview model in the ".concat(host, " viewport"),
|
46663
|
+
delete: "Delete model from the ".concat(host, " viewport"),
|
46664
|
+
clear: "Clear model from the ".concat(host, " viewport"),
|
46665
|
+
'subscribe-preview': "Render model in the ".concat(host, " viewport"),
|
46666
|
+
};
|
46653
46667
|
return (React__default.createElement(SettingsButton, { style: style, disabled: disabled, onClick: function (e) {
|
46654
46668
|
e.stopPropagation();
|
46655
46669
|
if (disabled)
|
@@ -46716,7 +46730,7 @@ var SendModel = function (_a) {
|
|
46716
46730
|
return true;
|
46717
46731
|
return typeof optionsConfig[o.id] === 'undefined' ? true : optionsConfig[o.id];
|
46718
46732
|
}),
|
46719
|
-
}], asButtons: true, label: buttonLabel, helpText:
|
46733
|
+
}], asButtons: true, label: buttonLabel, helpText: helpTextButton[selOpt] }));
|
46720
46734
|
};
|
46721
46735
|
|
46722
46736
|
var Action;
|
@@ -46776,6 +46790,13 @@ var SendResults = function (_a) {
|
|
46776
46790
|
});
|
46777
46791
|
};
|
46778
46792
|
}, [disabled, geometryOptions, key, results, selOpt, sendMessage]);
|
46793
|
+
var helpTextButton = {
|
46794
|
+
add: "Add results to the ".concat(host, " viewport"),
|
46795
|
+
preview: "Preview results in the ".concat(host, " viewport"),
|
46796
|
+
delete: "Delete results from the ".concat(host, " viewport"),
|
46797
|
+
clear: "Clear results from the ".concat(host, " viewport"),
|
46798
|
+
'subscribe-preview': "Render results in the ".concat(host, " viewport"),
|
46799
|
+
};
|
46779
46800
|
return (React__default.createElement(SettingsButton, { style: style, disabled: disabled, onClick: function (e) {
|
46780
46801
|
e.stopPropagation();
|
46781
46802
|
if (disabled)
|
@@ -46850,7 +46871,7 @@ var SendResults = function (_a) {
|
|
46850
46871
|
return true;
|
46851
46872
|
return typeof optionsConfig[o.id] === 'undefined' ? true : optionsConfig[o.id];
|
46852
46873
|
}),
|
46853
|
-
}], asButtons: true, label: buttonLabel, helpText:
|
46874
|
+
}], asButtons: true, label: buttonLabel, helpText: helpTextButton[selOpt] }));
|
46854
46875
|
};
|
46855
46876
|
|
46856
46877
|
var JobTabs;
|
@@ -49083,7 +49104,7 @@ var FilePreview = function (_a) {
|
|
49083
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}";
|
49084
49105
|
styleInject(css_248z$4);
|
49085
49106
|
|
49086
|
-
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}";
|
49087
49108
|
styleInject(css_248z$3);
|
49088
49109
|
|
49089
49110
|
var ParamCard = function (_a) {
|
@@ -49200,10 +49221,11 @@ var FileCard = function (_a) {
|
|
49200
49221
|
var _d = useState(false), open = _d[0], setOpen = _d[1];
|
49201
49222
|
var _e = useState(false), over = _e[0], setOver = _e[1];
|
49202
49223
|
var _f = useState(true), isLoading = _f[0], setIsLoading = _f[1];
|
49224
|
+
var _g = useState(false), isInactive = _g[0], setIsInactive = _g[1];
|
49203
49225
|
// Data to use for CAD injections
|
49204
|
-
var
|
49226
|
+
var _h = useState(), CADdata = _h[0], setCADdata = _h[1];
|
49205
49227
|
// File to send to parent
|
49206
|
-
var
|
49228
|
+
var _j = useState(), currFile = _j[0], setCurrFile = _j[1];
|
49207
49229
|
/**
|
49208
49230
|
* Check if run id is a valid UUID or file path (Local sim)
|
49209
49231
|
* @param str run id
|
@@ -49250,11 +49272,20 @@ var FileCard = function (_a) {
|
|
49250
49272
|
*/
|
49251
49273
|
var fetchAndSet = function (url) {
|
49252
49274
|
fetch(url)
|
49253
|
-
.then(function (
|
49254
|
-
.
|
49255
|
-
|
49256
|
-
|
49257
|
-
|
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
|
+
})
|
49258
49289
|
.catch(function () { })
|
49259
49290
|
.finally(function () { return setIsLoading(false); });
|
49260
49291
|
};
|
@@ -49270,12 +49301,18 @@ var FileCard = function (_a) {
|
|
49270
49301
|
onClicked({ label: label, path: path, file: currFile, description: description, runId: runId });
|
49271
49302
|
}
|
49272
49303
|
}, [studyId, runId, label, path]);
|
49273
|
-
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) {
|
49274
49307
|
event.stopPropagation();
|
49308
|
+
if (isInactive)
|
49309
|
+
return;
|
49275
49310
|
onClicked({ label: label, path: path, file: currFile, description: description });
|
49276
49311
|
} },
|
49277
49312
|
React__default.createElement("div", { className: 'title-param' },
|
49278
|
-
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' },
|
49279
49316
|
React__default.createElement("span", { style: { margin: '0 8px 0 0' } }, getFileIcon(18, ((_c = (_b = path.split('/')
|
49280
49317
|
.reverse()[0]) === null || _b === void 0 ? void 0 : _b.split('.')) === null || _c === void 0 ? void 0 : _c.pop()) || '')),
|
49281
49318
|
label)
|