pollination-react-io 1.68.2 → 1.69.1
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
@@ -38040,6 +38040,14 @@ var usePollinationPanel = function () {
|
|
38040
38040
|
var panel = React.useMemo(function () {
|
38041
38041
|
return checkPollinationPanel() && window.parent.chrome.webview.hostObjects.sync.study;
|
38042
38042
|
}, []);
|
38043
|
+
/**
|
38044
|
+
* Get local simulation path from po-panel
|
38045
|
+
*/
|
38046
|
+
var simulationPath = React.useMemo(function () {
|
38047
|
+
if (!panel)
|
38048
|
+
return;
|
38049
|
+
return panel.GetSimulationFolder();
|
38050
|
+
}, [panel]);
|
38043
38051
|
/**
|
38044
38052
|
* From base64 to file
|
38045
38053
|
*/
|
@@ -38240,7 +38248,8 @@ var usePollinationPanel = function () {
|
|
38240
38248
|
getPaginatedJob: getPaginatedJob,
|
38241
38249
|
getJob: getJob,
|
38242
38250
|
deleteJob: deleteJob,
|
38243
|
-
getPlatforms: getPlatforms
|
38251
|
+
getPlatforms: getPlatforms,
|
38252
|
+
simulationPath: simulationPath
|
38244
38253
|
};
|
38245
38254
|
};
|
38246
38255
|
|
@@ -41432,7 +41441,7 @@ var ConfigureLocalRun = function (_a) {
|
|
41432
41441
|
}
|
41433
41442
|
} })),
|
41434
41443
|
React__default["default"].createElement(Label, { label: "Select a Local Run Folder", disabled: !localConfig.isLocalJob },
|
41435
|
-
React__default["default"].createElement(SelectLocalArtifactNative, { disabled: !localConfig.isLocalJob, onChange: handleLocalPathChange, mode: 'directory', buttonLabel: 'Local Run Folder' }))));
|
41444
|
+
React__default["default"].createElement(SelectLocalArtifactNative, { disabled: !localConfig.isLocalJob, onChange: handleLocalPathChange, mode: 'directory', buttonLabel: 'Local Run Folder', value: localConfig && localConfig.localRunFolder }))));
|
41436
41445
|
};
|
41437
41446
|
|
41438
41447
|
function makeTypeChecker(tabsRole) {
|
@@ -44772,9 +44781,9 @@ var InputType;
|
|
44772
44781
|
})(InputType || (InputType = {}));
|
44773
44782
|
var RecipeForm = function (_a) {
|
44774
44783
|
var _b, _c;
|
44775
|
-
var recipe = _a.recipe, projectName = _a.projectName, projectOwner = _a.projectOwner, client = _a.client, onSubmit = _a.onSubmit, _d = _a.style, style = _d === void 0 ? {} : _d;
|
44776
|
-
var
|
44777
|
-
var
|
44784
|
+
var recipe = _a.recipe, projectName = _a.projectName, projectOwner = _a.projectOwner, client = _a.client, onSubmit = _a.onSubmit, _d = _a.style, style = _d === void 0 ? {} : _d, _e = _a.initAsLocal, initAsLocal = _e === void 0 ? false : _e;
|
44785
|
+
var _f = usePollinationPanel(), getJob = _f.getJob, simulationPath = _f.simulationPath;
|
44786
|
+
var _g = React.useState(false), loading = _g[0], setLoading = _g[1];
|
44778
44787
|
/**
|
44779
44788
|
* Input mapping
|
44780
44789
|
*/
|
@@ -44815,10 +44824,10 @@ var RecipeForm = function (_a) {
|
|
44815
44824
|
/**
|
44816
44825
|
* Hooks
|
44817
44826
|
*/
|
44818
|
-
var
|
44827
|
+
var _h = useForm({
|
44819
44828
|
resolver: Oe(schema),
|
44820
44829
|
mode: 'onChange'
|
44821
|
-
}), control =
|
44830
|
+
}), control = _h.control, register = _h.register, handleSubmit = _h.handleSubmit, resetField = _h.resetField, watch = _h.watch, _j = _h.formState, errors = _j.errors, isValid = _j.isValid;
|
44822
44831
|
var watchStudyName = watch('study-name');
|
44823
44832
|
/**
|
44824
44833
|
* Form actions
|
@@ -44895,7 +44904,7 @@ var RecipeForm = function (_a) {
|
|
44895
44904
|
/**
|
44896
44905
|
* Local study
|
44897
44906
|
*/
|
44898
|
-
var
|
44907
|
+
var _k = React.useState(__assign(__assign({}, _defaultConfig), { isLocalJob: initAsLocal, cloudProjectName: projectName, cloudProjectOwner: projectOwner, localRunFolder: simulationPath })), localConfig = _k[0], setLocalConfig = _k[1];
|
44899
44908
|
/**
|
44900
44909
|
* Warning for local study folder
|
44901
44910
|
*/
|
@@ -44994,10 +45003,9 @@ var RecipeForm = function (_a) {
|
|
44994
45003
|
justifyContent: 'center' }, disabled: !isValid || loading, form: recipe.metadata.name, loading: loading }, "Create Study"),
|
44995
45004
|
host !== 'web' && React__default["default"].createElement(Button, { type: 'submit', style: { width: '100%',
|
44996
45005
|
margin: '10px 0 0 0',
|
44997
|
-
justifyContent: 'center' }, disabled: !
|
44998
|
-
|
44999
|
-
|
45000
|
-
: false, form: recipe.metadata.name, loading: loading }, "Create Study")));
|
45006
|
+
justifyContent: 'center' }, disabled: !localConfig.isLocalJob
|
45007
|
+
? !isValid || loading
|
45008
|
+
: !isValid || loading || localConfig.localRunFolder == null, form: recipe.metadata.name, loading: loading }, "Create Study")));
|
45001
45009
|
};
|
45002
45010
|
|
45003
45011
|
var defaultStyle = {
|
@@ -49870,7 +49878,7 @@ var FileCard = function (_a) {
|
|
49870
49878
|
border: '1px solid var(--slate9)',
|
49871
49879
|
// @ts-ignore
|
49872
49880
|
highlight: 'var(--slate7)'
|
49873
|
-
}, hbjson: CADdata.data, buttonLabel: label, defaultAction: Action$1.
|
49881
|
+
}, hbjson: CADdata.data, buttonLabel: label, defaultAction: Action$1.preview, optionsConfig: {
|
49874
49882
|
add: true,
|
49875
49883
|
delete: false,
|
49876
49884
|
'subscribe-preview': false,
|
@@ -49883,7 +49891,7 @@ var FileCard = function (_a) {
|
|
49883
49891
|
border: '1px solid var(--slate9)',
|
49884
49892
|
// @ts-ignore
|
49885
49893
|
highlight: 'var(--slate7)'
|
49886
|
-
}, results: CADdata.data, buttonLabel: label, defaultAction: Action$1.
|
49894
|
+
}, results: CADdata.data, buttonLabel: label, defaultAction: Action$1.preview, optionsConfig: {
|
49887
49895
|
add: true,
|
49888
49896
|
delete: false,
|
49889
49897
|
'subscribe-preview': false,
|