pollination-react-io 1.86.2 → 1.87.0
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
@@ -38897,7 +38897,7 @@ var useCreateStudy = function (accountName, projectName, client) {
|
|
38897
38897
|
}, [accountName, client, processEntryCloud, projectName]);
|
38898
38898
|
var createLocalStudy = React.useCallback(function (_a, data, _b, onSuccess, key) {
|
38899
38899
|
var name = _a.name, description = _a.description, recipe = _a.recipe, recipeFilter = _a.recipeFilter, authUserName = _a.authUserName;
|
38900
|
-
var localCPUCount = _b.localCPUCount, localRunFolder = _b.localRunFolder, isLocalJob = _b.isLocalJob, cloudProjectName = _b.cloudProjectName, cloudProjectOwner = _b.cloudProjectOwner,
|
38900
|
+
var localCPUCount = _b.localCPUCount, localRunFolder = _b.localRunFolder, isLocalJob = _b.isLocalJob, cloudProjectName = _b.cloudProjectName, cloudProjectOwner = _b.cloudProjectOwner, useHandlers = _b.useHandlers;
|
38901
38901
|
if (key === void 0) { key = performance.now().toString(); }
|
38902
38902
|
return __awaiter$1(void 0, void 0, void 0, function () {
|
38903
38903
|
var job, author, data_1, err_1, jobInfo, response;
|
@@ -38953,9 +38953,10 @@ var useCreateStudy = function (accountName, projectName, client) {
|
|
38953
38953
|
LocalRunFolder: localRunFolder,
|
38954
38954
|
Platform: host,
|
38955
38955
|
JobAuthor: author,
|
38956
|
+
UseHandlers: useHandlers
|
38956
38957
|
};
|
38957
38958
|
console.log(jobInfo);
|
38958
|
-
response = window.parent.chrome.webview.hostObjects.study.RunSimulation(JSON.stringify(jobInfo)
|
38959
|
+
response = window.parent.chrome.webview.hostObjects.study.RunSimulation(JSON.stringify(jobInfo))
|
38959
38960
|
.then(function (value) {
|
38960
38961
|
onSuccess && onSuccess({
|
38961
38962
|
accountName: cloudProjectOwner,
|
@@ -41931,7 +41932,7 @@ var _defaultConfig = {
|
|
41931
41932
|
isLocalJob: false,
|
41932
41933
|
cloudProjectName: undefined,
|
41933
41934
|
cloudProjectOwner: undefined,
|
41934
|
-
|
41935
|
+
useHandlers: false
|
41935
41936
|
};
|
41936
41937
|
var ConfigureLocalRun = function (_a) {
|
41937
41938
|
var _b = _a.disabled, disabled = _b === void 0 ? false : _b, defaultVal = _a.defaultVal, onChange = _a.onChange;
|
@@ -41970,26 +41971,6 @@ var ConfigureLocalRun = function (_a) {
|
|
41970
41971
|
} },
|
41971
41972
|
React__default["default"].createElement(Laptop$1, null),
|
41972
41973
|
"Local"))),
|
41973
|
-
React__default["default"].createElement(Label, { label: "Enable Validation" },
|
41974
|
-
React__default["default"].createElement(ButtonGroup, { wrapperProps: {
|
41975
|
-
style: {
|
41976
|
-
width: 'fit-content'
|
41977
|
-
}
|
41978
|
-
} },
|
41979
|
-
React__default["default"].createElement("button", { type: 'button', disabled: disabled, onClick: function () { return setLocalConfig(function (state) { return (__assign(__assign({}, state), { validationWithHandlers: false })); }); }, style: {
|
41980
|
-
display: 'flex',
|
41981
|
-
boxShadow: !disabled && !localConfig.validationWithHandlers ?
|
41982
|
-
'inset 0px 0px 9px 4px #096dd9' : undefined
|
41983
|
-
} },
|
41984
|
-
React__default["default"].createElement(X$3, { size: 16 }),
|
41985
|
-
"No"),
|
41986
|
-
React__default["default"].createElement("button", { type: 'button', disabled: disabled, onClick: function () { return setLocalConfig(function (state) { return (__assign(__assign({}, state), { validationWithHandlers: true })); }); }, style: {
|
41987
|
-
display: 'flex',
|
41988
|
-
boxShadow: !disabled && localConfig.validationWithHandlers ?
|
41989
|
-
'inset 0px 0px 9px 4px #096dd9' : undefined
|
41990
|
-
} },
|
41991
|
-
React__default["default"].createElement(Check$1, { size: 16 }),
|
41992
|
-
"Yes"))),
|
41993
41974
|
localConfig.isLocalJob && React__default["default"].createElement(Label, { label: "Number of CPUs", disabled: !localConfig.isLocalJob, style: {
|
41994
41975
|
backgroundColor: 'white'
|
41995
41976
|
} },
|
@@ -45413,7 +45394,8 @@ var RecipeForm = function (_a) {
|
|
45413
45394
|
if (!val)
|
45414
45395
|
delete data[key];
|
45415
45396
|
});
|
45416
|
-
|
45397
|
+
// Update useHandlers attribute
|
45398
|
+
onSubmit(studyName, data, studyDescription, __assign(__assign({}, localConfig), { useHandlers: handlers }))
|
45417
45399
|
.finally(function () {
|
45418
45400
|
setLoading(false);
|
45419
45401
|
});
|
@@ -45469,7 +45451,8 @@ var RecipeForm = function (_a) {
|
|
45469
45451
|
/**
|
45470
45452
|
* Local study
|
45471
45453
|
*/
|
45472
|
-
var _k = React.useState(
|
45454
|
+
var _k = React.useState(true), handlers = _k[0], setHandlers = _k[1];
|
45455
|
+
var _l = React.useState(__assign(__assign({}, _defaultConfig), { isLocalJob: initAsLocal, cloudProjectName: projectName, cloudProjectOwner: projectOwner, localRunFolder: simulationPath, useHandlers: handlers })), localConfig = _l[0], setLocalConfig = _l[1];
|
45473
45456
|
/**
|
45474
45457
|
* Warning for local study folder
|
45475
45458
|
*/
|
@@ -45519,7 +45502,25 @@ var RecipeForm = function (_a) {
|
|
45519
45502
|
default: "".concat(recipe.metadata.name, " study") }); } })),
|
45520
45503
|
React__default["default"].createElement(FormInput, { name: 'study-description', description: 'Study description is a optional field.', errorMessage: errors['studydescription'] ? (_c = errors['study-description']) === null || _c === void 0 ? void 0 : _c.message : undefined },
|
45521
45504
|
React__default["default"].createElement(TextInput, { inputProps: __assign(__assign({}, register('study-description')), { defaultValue: '' }), asTextArea: true, reset: function () { return handleReset({ name: 'study-description',
|
45522
|
-
default: '' }); } }))
|
45505
|
+
default: '' }); } })),
|
45506
|
+
host !== 'web' && React__default["default"].createElement(FormInput, { name: 'use-handlers', description: 'Enable handlers for an additional validation and/or to convert inputs to objects that are needed by the recipe.' },
|
45507
|
+
React__default["default"].createElement(ButtonGroup, { wrapperProps: {
|
45508
|
+
style: {
|
45509
|
+
width: 'fit-content'
|
45510
|
+
}
|
45511
|
+
} },
|
45512
|
+
React__default["default"].createElement("button", { type: 'button', onClick: function () { return setHandlers(false); }, style: {
|
45513
|
+
display: 'flex',
|
45514
|
+
boxShadow: !handlers ?
|
45515
|
+
'inset 0px 0px 9px 4px #096dd9' : undefined
|
45516
|
+
} },
|
45517
|
+
React__default["default"].createElement(X$3, { size: 16 })),
|
45518
|
+
React__default["default"].createElement("button", { type: 'button', onClick: function () { return setHandlers(true); }, style: {
|
45519
|
+
display: 'flex',
|
45520
|
+
boxShadow: handlers ?
|
45521
|
+
'inset 0px 0px 9px 4px #096dd9' : undefined
|
45522
|
+
} },
|
45523
|
+
React__default["default"].createElement(Check$1, { size: 16 })))))),
|
45523
45524
|
React__default["default"].createElement(Tabs, { forceRenderTabPanel: true },
|
45524
45525
|
React__default["default"].createElement(TabList, { style: {
|
45525
45526
|
flex: 1,
|