pollination-react-io 1.12.1 → 1.12.2
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 +17 -2
- package/build/index.esm.js.map +1 -1
- package/build/index.js +17 -2
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.esm.js
CHANGED
|
@@ -39519,7 +39519,7 @@ var SelectCloudArtifacts = function (_a) {
|
|
|
39519
39519
|
var items = useMemo(function () {
|
|
39520
39520
|
return __spreadArray(__spreadArray([], artifacts.folders, true), artifacts.files, true).map(function (a) {
|
|
39521
39521
|
var match = a.file_name.match(fileMatchRegex);
|
|
39522
|
-
var disabled = match && match.length > 1 ? false : true;
|
|
39522
|
+
var disabled = a.file_type === 'folder' || (match && match.length) > 1 ? false : true;
|
|
39523
39523
|
return (__assign(__assign({}, a), { name: a.file_name, id: a.key, disabled: disabled }));
|
|
39524
39524
|
})
|
|
39525
39525
|
.sort(function (a, b) { return a.file_type === 'folder' ? -1 : 1; });
|
|
@@ -40189,6 +40189,21 @@ var CreateStudy = function (_a) {
|
|
|
40189
40189
|
return;
|
|
40190
40190
|
setActiveTabIndex(1);
|
|
40191
40191
|
}, [state.recipe]);
|
|
40192
|
+
var basePath = useMemo(function () {
|
|
40193
|
+
return client.config.basePath.replace('api', 'app');
|
|
40194
|
+
}, [client]);
|
|
40195
|
+
var handleCreateStudySuccess = useCallback(function (accountName, projectName, studyId) {
|
|
40196
|
+
if (!basePath) {
|
|
40197
|
+
throw new Error('CreateStudy: client.configuration.basepath not defined.');
|
|
40198
|
+
}
|
|
40199
|
+
window.open("".concat(basePath, "/").concat(accountName, "/projects/").concat(projectName, "/studies/").concat(studyId));
|
|
40200
|
+
}, [basePath]);
|
|
40201
|
+
var handleCreateStudy = useCallback(function (name, data, description) {
|
|
40202
|
+
if (!state.recipe && !state.recipe.source) {
|
|
40203
|
+
return new Promise(function (resolve, reject) { return resolve(); });
|
|
40204
|
+
}
|
|
40205
|
+
return createStudy({ name: name, source: state.recipe.source, description: description }, data, handleCreateStudySuccess);
|
|
40206
|
+
}, [createStudy, handleCreateStudySuccess, state.recipe]);
|
|
40192
40207
|
return (React__default.createElement("div", { "data-testid": "CreateProject", style: __assign(__assign({}, defaultStyle), style) },
|
|
40193
40208
|
React__default.createElement(Tabs, { selectedIndex: activeTabIndex, onSelect: function (index) { return setActiveTabIndex(index); }, forceRenderTabPanel: true },
|
|
40194
40209
|
React__default.createElement("div", { style: {
|
|
@@ -40230,7 +40245,7 @@ var CreateStudy = function (_a) {
|
|
|
40230
40245
|
flexDirection: 'column',
|
|
40231
40246
|
gap: 24
|
|
40232
40247
|
} },
|
|
40233
|
-
React__default.createElement(RecipeInputsForm, { client: client, projectOwner: projectOwner, projectName: projectSlug, recipe: state.recipe, onSubmit:
|
|
40248
|
+
React__default.createElement(RecipeInputsForm, { client: client, projectOwner: projectOwner, projectName: projectSlug, recipe: state.recipe, onSubmit: handleCreateStudy }))))));
|
|
40234
40249
|
};
|
|
40235
40250
|
|
|
40236
40251
|
var ConfigureLocalRun = function (_a) {
|