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.esm.js
CHANGED
@@ -38719,10 +38719,41 @@ var useCreateStudy = function (accountName, projectName, client) {
|
|
38719
38719
|
}, [uploadArtifact]);
|
38720
38720
|
// downloads, saves all file inputs for handling by plugins for local runs
|
38721
38721
|
// regardless of whether it's a local run or cloud run, platform will handle input files
|
38722
|
-
var processEntryLocal = useCallback(function (_a, input, cloudProjectName) {
|
38722
|
+
var processEntryLocal = useCallback(function (_a, input, cloudProjectName, useHandlers) {
|
38723
38723
|
var name = _a[0], value = _a[1];
|
38724
38724
|
return new Promise(function (resolve, reject) {
|
38725
|
+
var _a;
|
38725
38726
|
var type = input.type;
|
38727
|
+
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); }));
|
38728
|
+
if (alias) {
|
38729
|
+
// Linked data will be a file
|
38730
|
+
if (alias.type === 'DAGLinkedInputAlias'
|
38731
|
+
&& type === 'DAGFileInput'
|
38732
|
+
// placeholder
|
38733
|
+
&& typeof value === 'string'
|
38734
|
+
&& value.startsWith('linked')) {
|
38735
|
+
resolve({
|
38736
|
+
name: name,
|
38737
|
+
type: 'JobPathArgument',
|
38738
|
+
source: {
|
38739
|
+
type: 'ProjectFolder',
|
38740
|
+
path: value
|
38741
|
+
}
|
38742
|
+
});
|
38743
|
+
}
|
38744
|
+
// Linked data will be something else
|
38745
|
+
if (alias.type === 'DAGLinkedInputAlias'
|
38746
|
+
&& type !== 'DAGFileInput'
|
38747
|
+
// placeholder
|
38748
|
+
&& typeof value === 'string'
|
38749
|
+
&& value.startsWith('linked')) {
|
38750
|
+
resolve({
|
38751
|
+
name: name,
|
38752
|
+
type: 'JobArgument',
|
38753
|
+
value: value
|
38754
|
+
});
|
38755
|
+
}
|
38756
|
+
}
|
38726
38757
|
if (type !== 'DAGFileInput') {
|
38727
38758
|
resolve({
|
38728
38759
|
name: name,
|
@@ -38848,7 +38879,7 @@ var useCreateStudy = function (accountName, projectName, client) {
|
|
38848
38879
|
return [2 /*return*/];
|
38849
38880
|
return [4 /*yield*/, Promise.all(Object.entries(data).map(function (d) {
|
38850
38881
|
var input = recipe.inputs.find(function (i) { return i.name === d[0]; });
|
38851
|
-
return processEntryLocal(d, input, cloudProjectName);
|
38882
|
+
return processEntryLocal(d, input, cloudProjectName, useHandlers);
|
38852
38883
|
}))
|
38853
38884
|
.then(function (jobArguments) {
|
38854
38885
|
return ({
|
@@ -47062,6 +47093,7 @@ var InputTypeAlias;
|
|
47062
47093
|
InputTypeAlias["DAGPathInputAlias"] = "DAGPathInputAlias";
|
47063
47094
|
InputTypeAlias["DAGArrayInputAlias"] = "DAGArrayInputAlias";
|
47064
47095
|
InputTypeAlias["DAGJSONObjectInputAlias"] = "DAGJSONObjectInputAlias";
|
47096
|
+
InputTypeAlias["DAGLinkedInputAlias"] = "DAGLinkedInputAlias";
|
47065
47097
|
})(InputTypeAlias || (InputTypeAlias = {}));
|
47066
47098
|
var RecipeForm = function (_a) {
|
47067
47099
|
var _b, _c;
|
@@ -47101,12 +47133,18 @@ var RecipeForm = function (_a) {
|
|
47101
47133
|
};
|
47102
47134
|
alias && Object.keys(alias).forEach(function (key) {
|
47103
47135
|
if (key in inputInfo) {
|
47104
|
-
// if the alias is DAGGenericInputAlias
|
47136
|
+
// if the alias is DAGGenericInputAlias
|
47105
47137
|
if (key == 'type') {
|
47106
|
-
if (alias[key]
|
47138
|
+
if (alias[key] === 'DAGGenericInputAlias') {
|
47107
47139
|
return;
|
47108
47140
|
}
|
47109
47141
|
}
|
47142
|
+
// if Linked Input keep the native name
|
47143
|
+
// Example, see mapping: from sim-par and sim_par
|
47144
|
+
if (key == 'name'
|
47145
|
+
&& alias['type'] === 'DAGLinkedInputAlias') {
|
47146
|
+
return;
|
47147
|
+
}
|
47110
47148
|
inputInfo[key] = alias[key];
|
47111
47149
|
}
|
47112
47150
|
});
|
@@ -47134,7 +47172,7 @@ var RecipeForm = function (_a) {
|
|
47134
47172
|
var _m = useForm({
|
47135
47173
|
resolver: Oe(schema),
|
47136
47174
|
mode: 'onChange'
|
47137
|
-
}), control = _m.control, register = _m.register, handleSubmit = _m.handleSubmit, resetField = _m.resetField, watch = _m.watch, _o = _m.formState, errors = _o.errors, isValid = _o.isValid;
|
47175
|
+
}), 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;
|
47138
47176
|
var watchStudyName = watch('study-name');
|
47139
47177
|
/**
|
47140
47178
|
* Form actions
|
@@ -47178,6 +47216,13 @@ var RecipeForm = function (_a) {
|
|
47178
47216
|
*/
|
47179
47217
|
var formComponents = function (i) {
|
47180
47218
|
var _a, _b, _c, _d, _e;
|
47219
|
+
// DAGLinkedInputAlias add placeholder
|
47220
|
+
if (i.type === InputTypeAlias.DAGLinkedInputAlias) {
|
47221
|
+
formSetValue(i.name, 'linked', {
|
47222
|
+
shouldValidate: false
|
47223
|
+
});
|
47224
|
+
return React__default.createElement(Tag, null, "Linked data");
|
47225
|
+
}
|
47181
47226
|
switch (i.type) {
|
47182
47227
|
case InputType.DAGNumberInput:
|
47183
47228
|
case InputTypeAlias.DAGNumberInputAlias:
|