pollination-react-io 1.90.1 → 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 -7
- package/build/index.esm.js.map +1 -1
- package/build/index.js +50 -7
- 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,14 +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
|
47105
|
-
// or DAGLinkedInputAlias use the native input type
|
47136
|
+
// if the alias is DAGGenericInputAlias
|
47106
47137
|
if (key == 'type') {
|
47107
|
-
if (alias[key] === 'DAGGenericInputAlias'
|
47108
|
-
|| alias[key] === 'DAGLinkedInputAlias') {
|
47138
|
+
if (alias[key] === 'DAGGenericInputAlias') {
|
47109
47139
|
return;
|
47110
47140
|
}
|
47111
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
|
+
}
|
47112
47148
|
inputInfo[key] = alias[key];
|
47113
47149
|
}
|
47114
47150
|
});
|
@@ -47136,7 +47172,7 @@ var RecipeForm = function (_a) {
|
|
47136
47172
|
var _m = useForm({
|
47137
47173
|
resolver: Oe(schema),
|
47138
47174
|
mode: 'onChange'
|
47139
|
-
}), 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;
|
47140
47176
|
var watchStudyName = watch('study-name');
|
47141
47177
|
/**
|
47142
47178
|
* Form actions
|
@@ -47180,6 +47216,13 @@ var RecipeForm = function (_a) {
|
|
47180
47216
|
*/
|
47181
47217
|
var formComponents = function (i) {
|
47182
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
|
+
}
|
47183
47226
|
switch (i.type) {
|
47184
47227
|
case InputType.DAGNumberInput:
|
47185
47228
|
case InputTypeAlias.DAGNumberInputAlias:
|