pollination-react-io 1.64.0 → 1.64.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
@@ -41278,8 +41278,14 @@ var ComboFileSelector = function (_a) {
41278
41278
  return (React__default["default"].createElement(SelectCloudArtifacts, { projectOwner: projectOwner, projectName: projectName, value: value, hidden: hidden, fileNameMatch: typeof inputProps.accept === 'string' ?
41279
41279
  ".*(".concat(inputProps.accept.replace(/\./g, '').split(', ').join('$|'), "$)") : '.*', onChange: onChange, client: client }));
41280
41280
  case 'get_local':
41281
- return (React__default["default"].createElement(SelectLocalArtifactNative, { onChange: handleLocalArtifactSelect, buttonLabel: "Select ".concat(inputProps.accept.split(',').length > 1 ?
41282
- 'any of' : 'an', " ").concat(inputProps.accept, " ").concat(inputProps.accept.split(',').length > 1 ? 'file types' : 'file', "."), fileMatchPattern: "File types ".concat(inputProps.accept, "|*").concat(inputProps.accept.split(', ').join(';*')) }));
41281
+ return (React__default["default"].createElement(SelectLocalArtifactNative, { onChange: handleLocalArtifactSelect, buttonLabel: (inputProps === null || inputProps === void 0 ? void 0 : inputProps.accept)
41282
+ ? "Select ".concat(inputProps.accept.split(',').length > 1
41283
+ ? 'any of'
41284
+ : 'an', " ").concat(inputProps.accept, " ").concat(inputProps.accept.split(',').length > 1
41285
+ ? 'file types' : 'file', ".")
41286
+ : 'Select a file.', fileMatchPattern: (inputProps === null || inputProps === void 0 ? void 0 : inputProps.accept)
41287
+ ? "File types ".concat(inputProps.accept, "|*").concat(inputProps.accept.split(', ').join(';*'))
41288
+ : 'File types | *.*' }));
41283
41289
  default:
41284
41290
  return (React__default["default"].createElement(FileInput, { onChange: onChange, inputProps: inputProps, accept: typeof inputProps.accept === 'string' ?
41285
41291
  inputProps.accept.split(', ') : undefined }));
@@ -44785,15 +44791,15 @@ var RecipeForm = function (_a) {
44785
44791
  : React__default["default"].createElement(TextInput, { key: i.name, inputProps: __assign(__assign({}, register(i.name)), { defaultValue: i.default }), reset: function () { return handleReset(i); } });
44786
44792
  case InputType.DAGFileInput:
44787
44793
  return React__default["default"].createElement(Controller, { name: i.name, control: control, defaultValue: i.default, render: function (_a) {
44788
- var _b, _c, _d;
44789
- var _e = _a.field, value = _e.value, onChange = _e.onChange, field = __rest(_e, ["value", "onChange"]);
44794
+ var _b, _c;
44795
+ var _d = _a.field, value = _d.value, onChange = _d.onChange, field = __rest(_d, ["value", "onChange"]);
44790
44796
  return React__default["default"].createElement(ComboFileSelector, { projectOwner: projectOwner, projectName: projectName, defaultOption: i.extensions &&
44791
44797
  ((_b = i.extensions) === null || _b === void 0 ? void 0 : _b.includes('hbjson')) &&
44792
44798
  host !== 'web' ? 'get_model' : 'get_cloud', optionsConfig: {
44793
- get_model: ((_c = i.extensions) === null || _c === void 0 ? void 0 : _c.includes('hbjson')) && host !== 'web',
44799
+ get_model: host !== 'web' && i.extensions && i.extensions.includes('hbjson'),
44794
44800
  get_local: host !== 'web',
44795
44801
  get_file: host === 'web'
44796
- }, value: value, onChange: onChange, inputProps: __assign(__assign({}, field), { accept: i.extensions && ((_d = i.extensions) === null || _d === void 0 ? void 0 : _d.map(function (e) { return ".".concat(e); }).join(', ')) }), client: client });
44802
+ }, value: value, onChange: onChange, inputProps: __assign(__assign({}, field), { accept: i.extensions && ((_c = i.extensions) === null || _c === void 0 ? void 0 : _c.map(function (e) { return ".".concat(e); }).join(', ')) }), client: client });
44797
44803
  } });
44798
44804
  // Others...
44799
44805
  default: