pollination-react-io 1.90.0 → 1.91.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.esm.js +50 -5
- package/build/index.esm.js.map +1 -1
- package/build/index.js +50 -5
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
@@ -38746,10 +38746,41 @@ var useCreateStudy = function (accountName, projectName, client) {
|
|
38746
38746
|
}, [uploadArtifact]);
|
38747
38747
|
// downloads, saves all file inputs for handling by plugins for local runs
|
38748
38748
|
// regardless of whether it's a local run or cloud run, platform will handle input files
|
38749
|
-
var processEntryLocal = React.useCallback(function (_a, input, cloudProjectName) {
|
38749
|
+
var processEntryLocal = React.useCallback(function (_a, input, cloudProjectName, useHandlers) {
|
38750
38750
|
var name = _a[0], value = _a[1];
|
38751
38751
|
return new Promise(function (resolve, reject) {
|
38752
|
+
var _a;
|
38752
38753
|
var type = input.type;
|
38754
|
+
var alias = useHandlers && ((_a = input === null || input === void 0 ? void 0 : input.alias) === null || _a === void 0 ? void 0 : _a.find(function (a) { return a.platform.includes(host); }));
|
38755
|
+
if (alias) {
|
38756
|
+
// Linked data will be a file
|
38757
|
+
if (alias.type === 'DAGLinkedInputAlias'
|
38758
|
+
&& type === 'DAGFileInput'
|
38759
|
+
// placeholder
|
38760
|
+
&& typeof value === 'string'
|
38761
|
+
&& value.startsWith('linked')) {
|
38762
|
+
resolve({
|
38763
|
+
name: name,
|
38764
|
+
type: 'JobPathArgument',
|
38765
|
+
source: {
|
38766
|
+
type: 'ProjectFolder',
|
38767
|
+
path: value
|
38768
|
+
}
|
38769
|
+
});
|
38770
|
+
}
|
38771
|
+
// Linked data will be something else
|
38772
|
+
if (alias.type === 'DAGLinkedInputAlias'
|
38773
|
+
&& type !== 'DAGFileInput'
|
38774
|
+
// placeholder
|
38775
|
+
&& typeof value === 'string'
|
38776
|
+
&& value.startsWith('linked')) {
|
38777
|
+
resolve({
|
38778
|
+
name: name,
|
38779
|
+
type: 'JobArgument',
|
38780
|
+
value: value
|
38781
|
+
});
|
38782
|
+
}
|
38783
|
+
}
|
38753
38784
|
if (type !== 'DAGFileInput') {
|
38754
38785
|
resolve({
|
38755
38786
|
name: name,
|
@@ -38875,7 +38906,7 @@ var useCreateStudy = function (accountName, projectName, client) {
|
|
38875
38906
|
return [2 /*return*/];
|
38876
38907
|
return [4 /*yield*/, Promise.all(Object.entries(data).map(function (d) {
|
38877
38908
|
var input = recipe.inputs.find(function (i) { return i.name === d[0]; });
|
38878
|
-
return processEntryLocal(d, input, cloudProjectName);
|
38909
|
+
return processEntryLocal(d, input, cloudProjectName, useHandlers);
|
38879
38910
|
}))
|
38880
38911
|
.then(function (jobArguments) {
|
38881
38912
|
return ({
|
@@ -47089,6 +47120,7 @@ var InputTypeAlias;
|
|
47089
47120
|
InputTypeAlias["DAGPathInputAlias"] = "DAGPathInputAlias";
|
47090
47121
|
InputTypeAlias["DAGArrayInputAlias"] = "DAGArrayInputAlias";
|
47091
47122
|
InputTypeAlias["DAGJSONObjectInputAlias"] = "DAGJSONObjectInputAlias";
|
47123
|
+
InputTypeAlias["DAGLinkedInputAlias"] = "DAGLinkedInputAlias";
|
47092
47124
|
})(InputTypeAlias || (InputTypeAlias = {}));
|
47093
47125
|
var RecipeForm = function (_a) {
|
47094
47126
|
var _b, _c;
|
@@ -47128,12 +47160,18 @@ var RecipeForm = function (_a) {
|
|
47128
47160
|
};
|
47129
47161
|
alias && Object.keys(alias).forEach(function (key) {
|
47130
47162
|
if (key in inputInfo) {
|
47131
|
-
// if the alias is DAGGenericInputAlias
|
47163
|
+
// if the alias is DAGGenericInputAlias
|
47132
47164
|
if (key == 'type') {
|
47133
|
-
if (alias[key]
|
47165
|
+
if (alias[key] === 'DAGGenericInputAlias') {
|
47134
47166
|
return;
|
47135
47167
|
}
|
47136
47168
|
}
|
47169
|
+
// if Linked Input keep the native name
|
47170
|
+
// Example, see mapping: from sim-par and sim_par
|
47171
|
+
if (key == 'name'
|
47172
|
+
&& alias['type'] === 'DAGLinkedInputAlias') {
|
47173
|
+
return;
|
47174
|
+
}
|
47137
47175
|
inputInfo[key] = alias[key];
|
47138
47176
|
}
|
47139
47177
|
});
|
@@ -47161,7 +47199,7 @@ var RecipeForm = function (_a) {
|
|
47161
47199
|
var _m = useForm({
|
47162
47200
|
resolver: Oe(schema),
|
47163
47201
|
mode: 'onChange'
|
47164
|
-
}), control = _m.control, register = _m.register, handleSubmit = _m.handleSubmit, resetField = _m.resetField, watch = _m.watch, _o = _m.formState, errors = _o.errors, isValid = _o.isValid;
|
47202
|
+
}), control = _m.control, register = _m.register, handleSubmit = _m.handleSubmit, resetField = _m.resetField, watch = _m.watch, formSetValue = _m.setValue, _o = _m.formState, errors = _o.errors, isValid = _o.isValid;
|
47165
47203
|
var watchStudyName = watch('study-name');
|
47166
47204
|
/**
|
47167
47205
|
* Form actions
|
@@ -47205,6 +47243,13 @@ var RecipeForm = function (_a) {
|
|
47205
47243
|
*/
|
47206
47244
|
var formComponents = function (i) {
|
47207
47245
|
var _a, _b, _c, _d, _e;
|
47246
|
+
// DAGLinkedInputAlias add placeholder
|
47247
|
+
if (i.type === InputTypeAlias.DAGLinkedInputAlias) {
|
47248
|
+
formSetValue(i.name, 'linked', {
|
47249
|
+
shouldValidate: false
|
47250
|
+
});
|
47251
|
+
return React__default["default"].createElement(Tag, null, "Linked data");
|
47252
|
+
}
|
47208
47253
|
switch (i.type) {
|
47209
47254
|
case InputType.DAGNumberInput:
|
47210
47255
|
case InputTypeAlias.DAGNumberInputAlias:
|