-
{renderPath}
+ {treeView}
{
const [renderedFiles, setRenderedFiles] = useState([]);
useEffect(() => {
- if (history) {
- const fileNames = block?.action?.parameters["files"]?.value.split(", ");
- const updatedFiles = fileNames.map((fileName) => {
- const fileSplit = fileName.split("/");
- return fileSplit.length > 1 ? fileSplit.at(-1) : fileName;
+ const type = block?.action?.parameters["files"]?.type;
+ const value = block?.action?.parameters["files"]?.value;
+ if (history && type != "file[]" && typeof value == "string") {
+ const fileNames = JSON.parse(value);
+ const s3Files = fileNames.map((name) => {
+ return history + "/" + name;
});
setFocusAction((draft) => {
- draft.data[blockId].action.parameters["files"].type = "file[]";
- draft.data[blockId].action.parameters["files"].value =
- fileNames.join(", ");
+ draft.data[blockId].action.parameters["files"].type = "blob[]";
+ draft.data[blockId].action.parameters["files"].value = s3Files;
});
- setRenderedFiles(updatedFiles);
+ setRenderedFiles(fileNames);
}
}, [block]);
@@ -42,9 +42,8 @@ export const MultiFileBlock = ({ blockId, block, setFocusAction, history }) => {
const loadFiles = () => {
const files = Array.from(fileInput.current.files);
const filePaths = processFiles(files);
- const formattedValue = `[${filePaths.map((file) => `"${file}"`).join(", ")}]`;
setFocusAction((draft) => {
- draft.data[blockId].action.parameters["files"].value = formattedValue; // Update to formatted value
+ draft.data[blockId].action.parameters["files"].value = filePaths; // Update to formatted value
draft.data[blockId].action.parameters["files"].type = "file[]";
});
diff --git a/frontend/src/styles/color-tokens.scss b/frontend/src/styles/color-tokens.scss
index 7be9c913..f6de326e 100644
--- a/frontend/src/styles/color-tokens.scss
+++ b/frontend/src/styles/color-tokens.scss
@@ -29,7 +29,8 @@
--cds-layer: var(--ztn-gray-2) !important;
--cds-layer-accent: var(--ztn-white-0) !important;
--cds-text-primary: var(--ztn-black-0) !important;
- --focus-border: var(--ztn-purple-0);
+ --focus-border: var(--ztn-purple-0) !important;
+ --cds-interactive: var(--ztn-purple-0) !important;
}
@mixin ztn-colors-g100 {
@@ -63,4 +64,5 @@
--pipeline-background-color: var(--ztn-gray-1) !important;
--focus-border: var(--ztn-purple-0);
--cds-text-primary: var(--ztn-white-0) !important;
+ --cds-interactive: var(--ztn-purple-0) !important;
}
diff --git a/frontend/src/styles/drawflow.scss b/frontend/src/styles/drawflow.scss
index 062c896f..81d70984 100644
--- a/frontend/src/styles/drawflow.scss
+++ b/frontend/src/styles/drawflow.scss
@@ -62,7 +62,6 @@
.drawflow svg {
z-index: 0;
- position: absolute;
overflow: visible !important;
background: transparent;
}
diff --git a/frontend/src/utils/schemaValidation.js b/frontend/src/utils/schemaValidation.js
index 1ab33abc..80c0ff3d 100644
--- a/frontend/src/utils/schemaValidation.js
+++ b/frontend/src/utils/schemaValidation.js
@@ -7,7 +7,7 @@ export default function generateSchema(pipeline) {
schemaFields[key] = z.any().optional();
} else if (typeof value === "object" && !Array.isArray(value)) {
schemaFields[key] = generateSchema(value);
- } else if (key === "value") {
+ } else if (key === "value" && !Array.isArray(value)) {
schemaFields[key] = z
.any()
.refine((val) => val.replace(/['"]+/g, "").trim().length !== 0, {