pollination-react-io 1.28.3 → 1.28.5
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.
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { FileMeta } from "@pollination-solutions/pollination-sdk";
|
|
2
2
|
import { HTMLProps } from "react";
|
|
3
3
|
import { APIClient } from "../hooks";
|
|
4
|
-
export
|
|
4
|
+
export declare type FilePreviewProps = {
|
|
5
5
|
projectOwner?: string;
|
|
6
6
|
projectName?: string;
|
|
7
7
|
jobId?: string;
|
|
8
8
|
value?: FileMeta;
|
|
9
|
-
client: APIClient;
|
|
10
9
|
inputProps?: HTMLProps<HTMLInputElement>;
|
|
11
10
|
onPreviewChange?: (...any: any) => void;
|
|
12
|
-
|
|
11
|
+
client?: APIClient;
|
|
12
|
+
};
|
package/build/index.esm.js
CHANGED
|
@@ -44243,13 +44243,14 @@ var RecipeInputsForm = function (_a) {
|
|
|
44243
44243
|
flexDirection: 'column',
|
|
44244
44244
|
gap: 8
|
|
44245
44245
|
} }, g.map(function (input, i) {
|
|
44246
|
+
var _a;
|
|
44246
44247
|
var defaultValue = controlledValues && controlledValues[input.name] ? controlledValues[input.name].value : input.default;
|
|
44247
44248
|
var hidden = controlledValues && controlledValues[input.name] ? controlledValues[input.name].hidden : false;
|
|
44248
44249
|
var inputProps = __assign({}, register(input.name, {
|
|
44249
44250
|
valueAsNumber: ['DAGIntegerInput', 'DAGNumberInput'].includes(input.type)
|
|
44250
44251
|
}));
|
|
44251
44252
|
var handleReset = function () { return resetField(input.name); };
|
|
44252
|
-
return (React__default.createElement(FormInput, { key: "".concat(input.name, "-").concat(i), name: input.name, description: input.description, hidden: hidden }, (function () {
|
|
44253
|
+
return (React__default.createElement(FormInput, { key: "".concat(input.name, "-").concat(i), name: input.name, description: input.description, hidden: hidden, errorMessage: !input.required && errors[input.name] ? (_a = errors[input.name]) === null || _a === void 0 ? void 0 : _a.message : undefined }, (function () {
|
|
44253
44254
|
var _a;
|
|
44254
44255
|
switch (input.type) {
|
|
44255
44256
|
case 'DAGFileInput':
|
|
@@ -44288,7 +44289,12 @@ var RecipeInputsForm = function (_a) {
|
|
|
44288
44289
|
} },
|
|
44289
44290
|
React__default.createElement(InputDescription, { helpText: isValid ? 'Study is ready to go!' : ((_c = Object.values(errors)) === null || _c === void 0 ? void 0 : _c.length) > 0 ?
|
|
44290
44291
|
React__default.createElement("div", null,
|
|
44291
|
-
React__default.createElement("ul", { style: { padding: 0 } }))
|
|
44292
|
+
React__default.createElement("ul", { style: { padding: 0 } }, Object.entries(errors).map(function (_a) {
|
|
44293
|
+
var key = _a[0], val = _a[1];
|
|
44294
|
+
return (
|
|
44295
|
+
// @ts-ignore
|
|
44296
|
+
val.type !== 'required' && React__default.createElement("li", { key: key, style: { color: 'red', fontSize: '0.8rem', listStyle: 'none' } }, "".concat(key, " ").concat(val.message, ".")));
|
|
44297
|
+
}))) :
|
|
44292
44298
|
isSubmitSuccessful ? 'Study has been successfully submitted.' : 'Please, add the missing information.' },
|
|
44293
44299
|
React__default.createElement(Button, { type: 'submit', form: recipe.metadata.name, disabled: !isValid || loading, style: {
|
|
44294
44300
|
width: 'fit-content',
|