Update Prettier and add trailing comma (#2187)

* chore: Update prettier-plugin-tailwindcss to version 0.6.4

* Add trailing comma
This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-06-15 06:53:45 -07:00 • committed by GitHub
commit 57403d7b65
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
238 changed files with 975 additions and 988 deletions

View file

@ -103,7 +103,7 @@
"postcss": "^8.4.29", "postcss": "^8.4.29",
"prettier": "^3.3.2", "prettier": "^3.3.2",
"prettier-plugin-organize-imports": "^3.2.3", "prettier-plugin-organize-imports": "^3.2.3",
"prettier-plugin-tailwindcss": "^0.3.0", "prettier-plugin-tailwindcss": "^0.6.4",
"simple-git-hooks": "^2.11.1", "simple-git-hooks": "^2.11.1",
"tailwindcss": "^3.3.3", "tailwindcss": "^3.3.3",
"tailwindcss-dotted-background": "^1.1.0", "tailwindcss-dotted-background": "^1.1.0",
@ -3299,9 +3299,9 @@
} }
}, },
"node_modules/@swc/core": { "node_modules/@swc/core": {
"version": "1.5.29", "version": "1.6.0",
"resolved": "https://registry.npmjs.org/@swc/core/-/core-1.5.29.tgz", "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.6.0.tgz",
"integrity": "sha512-nvTtHJI43DUSOAf3h9XsqYg8YXKc0/N4il9y4j0xAkO0ekgDNo+3+jbw6MInawjKJF9uulyr+f5bAutTsOKVlw==", "integrity": "sha512-Wynbo79uIVBgmq3TPcTMdtXUkqk69IPSVuzo7/Jl1OhR4msC7cUaoRB1216ZanWttrAZ4/g6u17w9XZG4fzp1A==",
"dev": true, "dev": true,
"hasInstallScript": true, "hasInstallScript": true,
"dependencies": { "dependencies": {
@ -3316,16 +3316,16 @@
"url": "https://opencollective.com/swc" "url": "https://opencollective.com/swc"
}, },
"optionalDependencies": { "optionalDependencies": {
"@swc/core-darwin-arm64": "1.5.29", "@swc/core-darwin-arm64": "1.6.0",
"@swc/core-darwin-x64": "1.5.29", "@swc/core-darwin-x64": "1.6.0",
"@swc/core-linux-arm-gnueabihf": "1.5.29", "@swc/core-linux-arm-gnueabihf": "1.6.0",
"@swc/core-linux-arm64-gnu": "1.5.29", "@swc/core-linux-arm64-gnu": "1.6.0",
"@swc/core-linux-arm64-musl": "1.5.29", "@swc/core-linux-arm64-musl": "1.6.0",
"@swc/core-linux-x64-gnu": "1.5.29", "@swc/core-linux-x64-gnu": "1.6.0",
"@swc/core-linux-x64-musl": "1.5.29", "@swc/core-linux-x64-musl": "1.6.0",
"@swc/core-win32-arm64-msvc": "1.5.29", "@swc/core-win32-arm64-msvc": "1.6.0",
"@swc/core-win32-ia32-msvc": "1.5.29", "@swc/core-win32-ia32-msvc": "1.6.0",
"@swc/core-win32-x64-msvc": "1.5.29" "@swc/core-win32-x64-msvc": "1.6.0"
}, },
"peerDependencies": { "peerDependencies": {
"@swc/helpers": "*" "@swc/helpers": "*"
@ -3337,9 +3337,9 @@
} }
}, },
"node_modules/@swc/core-darwin-arm64": { "node_modules/@swc/core-darwin-arm64": {
"version": "1.5.29", "version": "1.6.0",
"resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.5.29.tgz", "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.6.0.tgz",
"integrity": "sha512-6F/sSxpHaq3nzg2ADv9FHLi4Fu2A8w8vP8Ich8gIl16D2htStlwnaPmCLjRswO+cFkzgVqy/l01gzNGWd4DFqA==", "integrity": "sha512-W1Mwk0WRrJ5lAVkYRPxpxOmwu8p9ASXeOmiORhXvE7DYREyI30005xlqSOITU1pfSNKj7G9u3+9DjsOzPPPbBw==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@ -3353,9 +3353,9 @@
} }
}, },
"node_modules/@swc/core-darwin-x64": { "node_modules/@swc/core-darwin-x64": {
"version": "1.5.29", "version": "1.6.0",
"resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.5.29.tgz", "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.6.0.tgz",
"integrity": "sha512-rF/rXkvUOTdTIfoYbmszbSUGsCyvqACqy1VeP3nXONS+LxFl4bRmRcUTRrblL7IE5RTMCKUuPbqbQSE2hK7bqg==", "integrity": "sha512-EzxLnpPC1zgLb2Y0iVUG6b+/GUv43k6uJUIs52UzxOnBElYP/WeItI3RJ+LUMFzCpZMk/IxB10wofEoeQ1H/Xg==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@ -3369,9 +3369,9 @@
} }
}, },
"node_modules/@swc/core-linux-arm-gnueabihf": { "node_modules/@swc/core-linux-arm-gnueabihf": {
"version": "1.5.29", "version": "1.6.0",
"resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.5.29.tgz", "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.6.0.tgz",
"integrity": "sha512-2OAPL8iWBsmmwkjGXqvuUhbmmoLxS1xNXiMq87EsnCNMAKohGc7wJkdAOUL6J/YFpean/vwMWg64rJD4pycBeg==", "integrity": "sha512-uP/STDjWZ5N6lc8mxJFsex4NXDaqhfzd8UOrI3LfdV97+4faE4/BC6bVqDNHFFzZi0PHuVBxD6md7IfPjugk6A==",
"cpu": [ "cpu": [
"arm" "arm"
], ],
@ -3385,9 +3385,9 @@
} }
}, },
"node_modules/@swc/core-linux-arm64-gnu": { "node_modules/@swc/core-linux-arm64-gnu": {
"version": "1.5.29", "version": "1.6.0",
"resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.5.29.tgz", "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.6.0.tgz",
"integrity": "sha512-eH/Q9+8O5qhSxMestZnhuS1xqQMr6M7SolZYxiXJqxArXYILLCF+nq2R9SxuMl0CfjHSpb6+hHPk/HXy54eIRA==", "integrity": "sha512-UgNz6anowcnYzJtZohzpii31FOgouBHJqluiq+p2geX/agbC+KfOKwVXdljn95+Qc4ygBuw/hjKjgF2msOLeVg==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@ -3401,9 +3401,9 @@
} }
}, },
"node_modules/@swc/core-linux-arm64-musl": { "node_modules/@swc/core-linux-arm64-musl": {
"version": "1.5.29", "version": "1.6.0",
"resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.5.29.tgz", "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.6.0.tgz",
"integrity": "sha512-TERh2OICAJz+SdDIK9+0GyTUwF6r4xDlFmpoiHKHrrD/Hh3u+6Zue0d7jQ/he/i80GDn4tJQkHlZys+RZL5UZg==", "integrity": "sha512-xPV6qrnj4nFwXQbIv70C1Kn5z5Th53sirIY76aEonr78qeC6+ywaBZR4uLFNHsljVjyuvVQfTTcl2qraGhu6oQ==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@ -3417,9 +3417,9 @@
} }
}, },
"node_modules/@swc/core-linux-x64-gnu": { "node_modules/@swc/core-linux-x64-gnu": {
"version": "1.5.29", "version": "1.6.0",
"resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.5.29.tgz", "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.6.0.tgz",
"integrity": "sha512-WMDPqU7Ji9dJpA+Llek2p9t7pcy7Bob8ggPUvgsIlv3R/eesF9DIzSbrgl6j3EAEPB9LFdSafsgf6kT/qnvqFg==", "integrity": "sha512-xTeWn4OT5uQ+DxT2cy94ngK8tF1U/5fMC49/V6FhCS2Wh+Xa/O+OWcOyKvYtk3b0eGYS4iNIRKgzog7fLSFtvQ==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@ -3433,9 +3433,9 @@
} }
}, },
"node_modules/@swc/core-linux-x64-musl": { "node_modules/@swc/core-linux-x64-musl": {
"version": "1.5.29", "version": "1.6.0",
"resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.5.29.tgz", "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.6.0.tgz",
"integrity": "sha512-DO14glwpdKY4POSN0201OnGg1+ziaSVr6/RFzuSLggshwXeeyVORiHv3baj7NENhJhWhUy3NZlDsXLnRFkmhHQ==", "integrity": "sha512-3P01mYD5XbyaVLT0MGZmZE+ZdgmGSvuvIhSejRDBlEXqkFnH79nWds+KsE+91hzVU8XsgzX57Yzv4eO5dlIuPw==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@ -3449,9 +3449,9 @@
} }
}, },
"node_modules/@swc/core-win32-arm64-msvc": { "node_modules/@swc/core-win32-arm64-msvc": {
"version": "1.5.29", "version": "1.6.0",
"resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.5.29.tgz", "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.6.0.tgz",
"integrity": "sha512-V3Y1+a1zG1zpYXUMqPIHEMEOd+rHoVnIpO/KTyFwAmKVu8v+/xPEVx/AGoYE67x4vDAAvPQrKI3Aokilqa5yVg==", "integrity": "sha512-xFuook1efU0ctzMAEeol4eI7J6+k/c/pMJpp/NP/4JJDnhlHwAi2iyiZcID8YZS+ePHgXMLndGdIMHVv/wIPkQ==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@ -3465,9 +3465,9 @@
} }
}, },
"node_modules/@swc/core-win32-ia32-msvc": { "node_modules/@swc/core-win32-ia32-msvc": {
"version": "1.5.29", "version": "1.6.0",
"resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.5.29.tgz", "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.6.0.tgz",
"integrity": "sha512-OrM6yfXw4wXhnVFosOJzarw0Fdz5Y0okgHfn9oFbTPJhoqxV5Rdmd6kXxWu2RiVKs6kGSJFZXHDeUq2w5rTIMg==", "integrity": "sha512-VCJa5vTywxzASqvf9OEUM5SZBcNrWbuIkSGM5T9guuBzyrh/tSqVHjzOWL9qpP69uPVj5G/I5bJObLiUKErhvQ==",
"cpu": [ "cpu": [
"ia32" "ia32"
], ],
@ -3481,9 +3481,9 @@
} }
}, },
"node_modules/@swc/core-win32-x64-msvc": { "node_modules/@swc/core-win32-x64-msvc": {
"version": "1.5.29", "version": "1.6.0",
"resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.5.29.tgz", "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.6.0.tgz",
"integrity": "sha512-eD/gnxqKyZQQR0hR7TMkIlJ+nCF9dzYmVVNbYZWuA1Xy94aBPUsEk3Uw3oG7q6R3ErrEUPP0FNf2ztEnv+I+dw==", "integrity": "sha512-L7i8WBSIJTQiMONJGHnznDydZmlJIqHjZ3VhBHeTTms8cEAuwkAVgzPwgr5cD9GhmcwdeBI9iYdOuKr1pUx19Q==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@ -10299,20 +10299,20 @@
} }
}, },
"node_modules/prettier-plugin-tailwindcss": { "node_modules/prettier-plugin-tailwindcss": {
"version": "0.3.0", "version": "0.6.4",
"resolved": "https://registry.npmjs.org/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.3.0.tgz", "resolved": "https://registry.npmjs.org/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.6.4.tgz",
"integrity": "sha512-009/Xqdy7UmkcTBpwlq7jsViDqXAYSOMLDrHAdTMlVZOrKfM2o9Ci7EMWTMZ7SkKBFTG04UM9F9iM2+4i6boDA==", "integrity": "sha512-3vhbIvlKyAWPaw9bUr2cw6M1BGx2Oy9CCLJyv+nxEiBGCTcL69WcAz2IFMGqx8IXSzQCInGSo2ujAByg9poHLQ==",
"dev": true, "dev": true,
"engines": { "engines": {
"node": ">=12.17.0" "node": ">=14.21.3"
}, },
"peerDependencies": { "peerDependencies": {
"@ianvs/prettier-plugin-sort-imports": "*", "@ianvs/prettier-plugin-sort-imports": "*",
"@prettier/plugin-pug": "*", "@prettier/plugin-pug": "*",
"@shopify/prettier-plugin-liquid": "*", "@shopify/prettier-plugin-liquid": "*",
"@shufo/prettier-plugin-blade": "*",
"@trivago/prettier-plugin-sort-imports": "*", "@trivago/prettier-plugin-sort-imports": "*",
"prettier": ">=2.2.0", "@zackad/prettier-plugin-twig-melody": "*",
"prettier": "^3.0",
"prettier-plugin-astro": "*", "prettier-plugin-astro": "*",
"prettier-plugin-css-order": "*", "prettier-plugin-css-order": "*",
"prettier-plugin-import-sort": "*", "prettier-plugin-import-sort": "*",
@ -10320,9 +10320,9 @@
"prettier-plugin-marko": "*", "prettier-plugin-marko": "*",
"prettier-plugin-organize-attributes": "*", "prettier-plugin-organize-attributes": "*",
"prettier-plugin-organize-imports": "*", "prettier-plugin-organize-imports": "*",
"prettier-plugin-sort-imports": "*",
"prettier-plugin-style-order": "*", "prettier-plugin-style-order": "*",
"prettier-plugin-svelte": "*", "prettier-plugin-svelte": "*"
"prettier-plugin-twig-melody": "*"
}, },
"peerDependenciesMeta": { "peerDependenciesMeta": {
"@ianvs/prettier-plugin-sort-imports": { "@ianvs/prettier-plugin-sort-imports": {
@ -10334,10 +10334,10 @@
"@shopify/prettier-plugin-liquid": { "@shopify/prettier-plugin-liquid": {
"optional": true "optional": true
}, },
"@shufo/prettier-plugin-blade": { "@trivago/prettier-plugin-sort-imports": {
"optional": true "optional": true
}, },
"@trivago/prettier-plugin-sort-imports": { "@zackad/prettier-plugin-twig-melody": {
"optional": true "optional": true
}, },
"prettier-plugin-astro": { "prettier-plugin-astro": {
@ -10361,14 +10361,14 @@
"prettier-plugin-organize-imports": { "prettier-plugin-organize-imports": {
"optional": true "optional": true
}, },
"prettier-plugin-sort-imports": {
"optional": true
},
"prettier-plugin-style-order": { "prettier-plugin-style-order": {
"optional": true "optional": true
}, },
"prettier-plugin-svelte": { "prettier-plugin-svelte": {
"optional": true "optional": true
},
"prettier-plugin-twig-melody": {
"optional": true
} }
} }
}, },

View file

@ -125,7 +125,7 @@
"postcss": "^8.4.29", "postcss": "^8.4.29",
"prettier": "^3.3.2", "prettier": "^3.3.2",
"prettier-plugin-organize-imports": "^3.2.3", "prettier-plugin-organize-imports": "^3.2.3",
"prettier-plugin-tailwindcss": "^0.3.0", "prettier-plugin-tailwindcss": "^0.6.4",
"simple-git-hooks": "^2.11.1", "simple-git-hooks": "^2.11.1",
"tailwindcss": "^3.3.3", "tailwindcss": "^3.3.3",
"tailwindcss-dotted-background": "^1.1.0", "tailwindcss-dotted-background": "^1.1.0",

View file

@ -1,3 +1,3 @@
module.exports = { module.exports = {
plugins: [require("prettier-plugin-tailwindcss")], plugins: ["prettier-plugin-tailwindcss"],
}; };

View file

@ -29,10 +29,10 @@ export default function App() {
useTrackLastVisitedPath(); useTrackLastVisitedPath();
const removeFromTempNotificationList = useAlertStore( const removeFromTempNotificationList = useAlertStore(
(state) => state.removeFromTempNotificationList (state) => state.removeFromTempNotificationList,
); );
const tempNotificationList = useAlertStore( const tempNotificationList = useAlertStore(
(state) => state.tempNotificationList (state) => state.tempNotificationList,
); );
const [fetchError, setFetchError] = useState(false); const [fetchError, setFetchError] = useState(false);
const isLoading = useFlowsManagerStore((state) => state.isLoading); const isLoading = useFlowsManagerStore((state) => state.isLoading);
@ -48,7 +48,7 @@ export default function App() {
const refreshVersion = useDarkStore((state) => state.refreshVersion); const refreshVersion = useDarkStore((state) => state.refreshVersion);
const refreshStars = useDarkStore((state) => state.refreshStars); const refreshStars = useDarkStore((state) => state.refreshStars);
const setGlobalVariables = useGlobalVariablesStore( const setGlobalVariables = useGlobalVariablesStore(
(state) => state.setGlobalVariables (state) => state.setGlobalVariables,
); );
const checkHasStore = useStoreStore((state) => state.checkHasStore); const checkHasStore = useStoreStore((state) => state.checkHasStore);
const navigate = useNavigate(); const navigate = useNavigate();

View file

@ -238,7 +238,7 @@ export default function ParameterComponent({
isValidConnection(connection, nodes, edges) isValidConnection(connection, nodes, edges)
} }
className={classNames( className={classNames(
left ? "my-12 -ml-0.5 " : " my-12 -mr-0.5 ", left ? "my-12 -ml-0.5" : "my-12 -mr-0.5",
"h-3 w-3 rounded-full border-2 bg-background", "h-3 w-3 rounded-full border-2 bg-background",
!showNode ? "mt-0" : "", !showNode ? "mt-0" : "",
)} )}
@ -260,7 +260,7 @@ export default function ParameterComponent({
"relative mt-1 flex w-full flex-wrap items-center justify-between bg-muted px-5 py-2" + "relative mt-1 flex w-full flex-wrap items-center justify-between bg-muted px-5 py-2" +
((name === "code" && type === "code") || ((name === "code" && type === "code") ||
(name.includes("code") && proxy) (name.includes("code") && proxy)
? " hidden " ? " hidden"
: "") : "")
} }
> >
@ -279,13 +279,13 @@ export default function ParameterComponent({
{proxy ? ( {proxy ? (
<ShadTooltip content={<span>{proxy.id}</span>}> <ShadTooltip content={<span>{proxy.id}</span>}>
<span className={!left && data.node?.frozen ? " text-ice" : ""}> <span className={!left && data.node?.frozen ? "text-ice" : ""}>
{title} {title}
</span> </span>
</ShadTooltip> </ShadTooltip>
) : ( ) : (
<div className="flex gap-2"> <div className="flex gap-2">
<span className={!left && data.node?.frozen ? " text-ice" : ""}> <span className={!left && data.node?.frozen ? "text-ice" : ""}>
{title} {title}
</span> </span>
{!left && ( {!left && (
@ -309,8 +309,8 @@ export default function ParameterComponent({
className={classNames( className={classNames(
"h-5 w-5 rounded-md", "h-5 w-5 rounded-md",
displayOutputPreview && !unknownOutput displayOutputPreview && !unknownOutput
? " hover:bg-secondary-foreground/5 hover:text-medium-indigo" ? "hover:bg-secondary-foreground/5 hover:text-medium-indigo"
: " cursor-not-allowed text-muted-foreground", : "cursor-not-allowed text-muted-foreground",
)} )}
name={"ScanEye"} name={"ScanEye"}
/> />
@ -401,7 +401,7 @@ export default function ParameterComponent({
</div> </div>
</Case> </Case>
<Case condition={data.node?.template[name]?.multiline}> <Case condition={data.node?.template[name]?.multiline}>
<div className="mt-2 flex w-full flex-col "> <div className="mt-2 flex w-full flex-col">
<div className="flex-grow"> <div className="flex-grow">
<TextAreaComponent <TextAreaComponent
disabled={disabled} disabled={disabled}

View file

@ -24,7 +24,7 @@ const TooltipRenderComponent = ({ item, index, left }) => {
<span <span
key={index} key={index}
className={classNames( className={classNames(
index > 0 ? "mt-2 flex items-center" : "mt-3 flex items-center" index > 0 ? "mt-2 flex items-center" : "mt-3 flex items-center",
)} )}
> >
<div <div

View file

@ -61,10 +61,10 @@ export default function GenericNode({
const setErrorData = useAlertStore((state) => state.setErrorData); const setErrorData = useAlertStore((state) => state.setErrorData);
const isDark = useDarkStore((state) => state.dark); const isDark = useDarkStore((state) => state.dark);
const buildStatus = useFlowStore( const buildStatus = useFlowStore(
(state) => state.flowBuildStatus[data.id]?.status (state) => state.flowBuildStatus[data.id]?.status,
); );
const lastRunTime = useFlowStore( const lastRunTime = useFlowStore(
(state) => state.flowBuildStatus[data.id]?.timestamp (state) => state.flowBuildStatus[data.id]?.timestamp,
); );
const takeSnapshot = useFlowsManagerStore((state) => state.takeSnapshot); const takeSnapshot = useFlowsManagerStore((state) => state.takeSnapshot);
@ -72,7 +72,7 @@ export default function GenericNode({
const [nodeName, setNodeName] = useState(data.node!.display_name); const [nodeName, setNodeName] = useState(data.node!.display_name);
const [inputDescription, setInputDescription] = useState(false); const [inputDescription, setInputDescription] = useState(false);
const [nodeDescription, setNodeDescription] = useState( const [nodeDescription, setNodeDescription] = useState(
data.node?.description! data.node?.description!,
); );
const [isOutdated, setIsOutdated] = useState(false); const [isOutdated, setIsOutdated] = useState(false);
const [validationStatus, setValidationStatus] = const [validationStatus, setValidationStatus] =
@ -90,7 +90,7 @@ export default function GenericNode({
data.node!, data.node!,
setNode, setNode,
setIsOutdated, setIsOutdated,
updateNodeInternals updateNodeInternals,
); );
const name = nodeIconsLucide[data.type] ? data.type : types[data.type]; const name = nodeIconsLucide[data.type] ? data.type : types[data.type];
@ -117,12 +117,12 @@ export default function GenericNode({
selected: boolean, selected: boolean,
showNode: boolean, showNode: boolean,
buildStatus: BuildStatus | undefined, buildStatus: BuildStatus | undefined,
validationStatus: VertexBuildTypeAPI | null validationStatus: VertexBuildTypeAPI | null,
) => { ) => {
const specificClassFromBuildStatus = getSpecificClassFromBuildStatus( const specificClassFromBuildStatus = getSpecificClassFromBuildStatus(
buildStatus, buildStatus,
validationStatus, validationStatus,
isDark isDark,
); );
const baseBorderClass = getBaseBorderClass(selected); const baseBorderClass = getBaseBorderClass(selected);
@ -131,7 +131,7 @@ export default function GenericNode({
baseBorderClass, baseBorderClass,
nodeSizeClass, nodeSizeClass,
"generic-node-div group/node", "generic-node-div group/node",
specificClassFromBuildStatus specificClassFromBuildStatus,
); );
return names; return names;
}; };
@ -176,7 +176,7 @@ export default function GenericNode({
showNode, showNode,
isEmoji, isEmoji,
nodeIconFragment, nodeIconFragment,
checkNodeIconFragment checkNodeIconFragment,
); );
function countHandles(): void { function countHandles(): void {
@ -309,7 +309,7 @@ export default function GenericNode({
selected, selected,
showNode, showNode,
buildStatus, buildStatus,
validationStatus validationStatus,
)} )}
> >
{data.node?.beta && showNode && ( {data.node?.beta && showNode && (
@ -323,14 +323,14 @@ export default function GenericNode({
className={ className={
"generic-node-div-title " + "generic-node-div-title " +
(!showNode (!showNode
? " relative h-24 w-24 rounded-full " ? " relative h-24 w-24 rounded-full"
: " justify-between rounded-t-lg ") : " justify-between rounded-t-lg")
} }
> >
<div <div
className={ className={
"generic-node-title-arrangement rounded-full" + "generic-node-title-arrangement rounded-full" +
(!showNode && " justify-center ") (!showNode && " justify-center")
} }
data-testid="generic-node-title-arrangement" data-testid="generic-node-title-arrangement"
> >
@ -457,7 +457,7 @@ export default function GenericNode({
} }
title={getFieldTitle( title={getFieldTitle(
data.node?.template!, data.node?.template!,
templateField templateField,
)} )}
info={data.node?.template[templateField].info} info={data.node?.template[templateField].info}
name={templateField} name={templateField}
@ -485,7 +485,7 @@ export default function GenericNode({
proxy={data.node?.template[templateField].proxy} proxy={data.node?.template[templateField].proxy}
showNode={showNode} showNode={showNode}
/> />
) ),
)} )}
<ParameterComponent <ParameterComponent
selected={selected} selected={selected}
@ -643,7 +643,7 @@ export default function GenericNode({
!data.node?.description) && !data.node?.description) &&
nameEditable nameEditable
? "font-light italic" ? "font-light italic"
: "" : "",
)} )}
onDoubleClick={(e) => { onDoubleClick={(e) => {
setInputDescription(true); setInputDescription(true);
@ -654,10 +654,7 @@ export default function GenericNode({
nameEditable ? ( nameEditable ? (
"Double Click to Edit Description" "Double Click to Edit Description"
) : ( ) : (
<Markdown <Markdown className="markdown prose flex flex-col text-primary word-break-break-word dark:prose-invert">
className="markdown prose flex flex-col text-primary word-break-break-word
dark:prose-invert"
>
{String(data.node?.description)} {String(data.node?.description)}
</Markdown> </Markdown>
)} )}
@ -713,13 +710,13 @@ export default function GenericNode({
} }
title={getFieldTitle( title={getFieldTitle(
data.node?.template!, data.node?.template!,
templateField templateField,
)} )}
info={data.node?.template[templateField].info} info={data.node?.template[templateField].info}
name={templateField} name={templateField}
tooltipTitle={ tooltipTitle={
data.node?.template[templateField].input_types?.join( data.node?.template[templateField].input_types?.join(
"\n" "\n",
) ?? data.node?.template[templateField].type ) ?? data.node?.template[templateField].type
} }
required={data.node!.template[templateField].required} required={data.node!.template[templateField].required}
@ -746,7 +743,7 @@ export default function GenericNode({
<div <div
className={classNames( className={classNames(
Object.keys(data.node!.template).length < 1 ? "hidden" : "", Object.keys(data.node!.template).length < 1 ? "hidden" : "",
"flex-max-width justify-center" "flex-max-width justify-center",
)} )}
> >
{" "} {" "}

View file

@ -4,7 +4,7 @@ import { VertexBuildTypeAPI } from "../../types/api";
export const getSpecificClassFromBuildStatus = ( export const getSpecificClassFromBuildStatus = (
buildStatus: BuildStatus | undefined, buildStatus: BuildStatus | undefined,
validationStatus: VertexBuildTypeAPI | null, validationStatus: VertexBuildTypeAPI | null,
isDark: boolean isDark: boolean,
) => { ) => {
let isInvalid = validationStatus && !validationStatus.valid; let isInvalid = validationStatus && !validationStatus.valid;

View file

@ -6,7 +6,7 @@ const useCheckCodeValidity = (
data: NodeDataType, data: NodeDataType,
templates: { [key: string]: any }, templates: { [key: string]: any },
setIsOutdated: (value: boolean) => void, setIsOutdated: (value: boolean) => void,
types types,
) => { ) => {
useEffect(() => { useEffect(() => {
// This one should run only once // This one should run only once

View file

@ -13,7 +13,7 @@ const useFetchDataOnMount = (
handleUpdateValues, handleUpdateValues,
setNode, setNode,
renderTooltips, renderTooltips,
setIsLoading setIsLoading,
) => { ) => {
const setErrorData = useAlertStore((state) => state.setErrorData); const setErrorData = useAlertStore((state) => state.setErrorData);

View file

@ -14,7 +14,7 @@ const useHandleOnNewValue = (
debouncedHandleUpdateValues, debouncedHandleUpdateValues,
setNode, setNode,
renderTooltips, renderTooltips,
setIsLoading setIsLoading,
) => { ) => {
const setErrorData = useAlertStore((state) => state.setErrorData); const setErrorData = useAlertStore((state) => state.setErrorData);

View file

@ -6,7 +6,7 @@ const useHandleNodeClass = (
takeSnapshot, takeSnapshot,
setNode, setNode,
updateNodeInternals, updateNodeInternals,
renderTooltips renderTooltips,
) => { ) => {
const handleNodeClass = (newNodeClass, code) => { const handleNodeClass = (newNodeClass, code) => {
if (!data.node) return; if (!data.node) return;

View file

@ -12,8 +12,8 @@ const useIconNodeRender = (
checkNodeIconFragment: ( checkNodeIconFragment: (
iconColor: string, iconColor: string,
iconName: string, iconName: string,
iconClassName: string iconClassName: string,
) => JSX.Element ) => JSX.Element,
) => { ) => {
const iconNodeRender = useCallback(() => { const iconNodeRender = useCallback(() => {
const iconElement = data?.node?.icon; const iconElement = data?.node?.icon;

View file

@ -6,7 +6,7 @@ import { VertexBuildTypeAPI } from "../../types/api";
const useIconStatus = ( const useIconStatus = (
buildStatus: BuildStatus | undefined, buildStatus: BuildStatus | undefined,
validationStatus: VertexBuildTypeAPI | null validationStatus: VertexBuildTypeAPI | null,
) => { ) => {
const conditionSuccess = validationStatus && validationStatus.valid; const conditionSuccess = validationStatus && validationStatus.valid;
const conditionError = const conditionError =

View file

@ -7,7 +7,7 @@ const useUpdateNodeCode = (
dataNode: APIClassType, // Define YourNodeType according to your data structure dataNode: APIClassType, // Define YourNodeType according to your data structure
setNode: (id: string, callback: (oldNode) => any) => void, setNode: (id: string, callback: (oldNode) => any) => void,
setIsOutdated: (value: boolean) => void, setIsOutdated: (value: boolean) => void,
updateNodeInternals: (id: string) => void updateNodeInternals: (id: string) => void,
) => { ) => {
const updateNodeCode = useCallback( const updateNodeCode = useCallback(
(newNodeClass: APIClassType, code: string, name: string) => { (newNodeClass: APIClassType, code: string, name: string) => {
@ -30,7 +30,7 @@ const useUpdateNodeCode = (
updateNodeInternals(dataId); updateNodeInternals(dataId);
}, },
[dataId, dataNode, setNode, setIsOutdated, updateNodeInternals] [dataId, dataNode, setNode, setIsOutdated, updateNodeInternals],
); );
return updateNodeCode; return updateNodeCode;

View file

@ -2,7 +2,7 @@ import { APITemplateType } from "../../types/api";
export default function getFieldTitle( export default function getFieldTitle(
template: APITemplateType, template: APITemplateType,
templateField: string templateField: string,
): string { ): string {
return template[templateField].display_name return template[templateField].display_name
? template[templateField].display_name! ? template[templateField].display_name!

View file

@ -83,7 +83,7 @@ export default function SingleAlert({
<div className="flex-shrink-0 cursor-help"> <div className="flex-shrink-0 cursor-help">
<IconComponent <IconComponent
name="Info" name="Info"
className="h-5 w-5 text-status-blue " className="h-5 w-5 text-status-blue"
aria-hidden="true" aria-hidden="true"
/> />
</div> </div>

View file

@ -16,13 +16,13 @@ export default function AlertDropdown({
}: AlertDropdownType): JSX.Element { }: AlertDropdownType): JSX.Element {
const notificationList = useAlertStore((state) => state.notificationList); const notificationList = useAlertStore((state) => state.notificationList);
const clearNotificationList = useAlertStore( const clearNotificationList = useAlertStore(
(state) => state.clearNotificationList (state) => state.clearNotificationList,
); );
const removeFromNotificationList = useAlertStore( const removeFromNotificationList = useAlertStore(
(state) => state.removeFromNotificationList (state) => state.removeFromNotificationList,
); );
const setNotificationCenter = useAlertStore( const setNotificationCenter = useAlertStore(
(state) => state.setNotificationCenter (state) => state.setNotificationCenter,
); );
const [open, setOpen] = useState(false); const [open, setOpen] = useState(false);
@ -39,7 +39,7 @@ export default function AlertDropdown({
<PopoverContent className="nocopy nowheel nopan nodelete nodrag noundo flex h-[500px] w-[500px] flex-col"> <PopoverContent className="nocopy nowheel nopan nodelete nodrag noundo flex h-[500px] w-[500px] flex-col">
<div className="text-md flex flex-row justify-between pl-3 font-medium text-foreground"> <div className="text-md flex flex-row justify-between pl-3 font-medium text-foreground">
Notifications Notifications
<div className="flex gap-3 pr-3 "> <div className="flex gap-3 pr-3">
<button <button
className="text-foreground hover:text-status-red" className="text-foreground hover:text-status-red"
onClick={() => { onClick={() => {

View file

@ -42,7 +42,7 @@ export default function NoticeAlert({
<div className="flex-shrink-0 cursor-help"> <div className="flex-shrink-0 cursor-help">
<IconComponent <IconComponent
name="Info" name="Info"
className="h-5 w-5 text-status-blue " className="h-5 w-5 text-status-blue"
aria-hidden="true" aria-hidden="true"
/> />
</div> </div>

View file

@ -31,14 +31,14 @@ export default function ImageViewer({ image }) {
const fullPageButton = document.getElementById("full-page-button"); const fullPageButton = document.getElementById("full-page-button");
zoomInButton!.addEventListener("click", () => zoomInButton!.addEventListener("click", () =>
viewer.viewport.zoomBy(1.2) viewer.viewport.zoomBy(1.2),
); );
zoomOutButton!.addEventListener("click", () => zoomOutButton!.addEventListener("click", () =>
viewer.viewport.zoomBy(0.8) viewer.viewport.zoomBy(0.8),
); );
homeButton!.addEventListener("click", () => viewer.viewport.goHome()); homeButton!.addEventListener("click", () => viewer.viewport.goHome());
fullPageButton!.addEventListener("click", () => fullPageButton!.addEventListener("click", () =>
viewer.setFullScreen(true) viewer.setFullScreen(true),
); );
// Optionally, you can set additional viewer options here // Optionally, you can set additional viewer options here
@ -47,16 +47,16 @@ export default function ImageViewer({ image }) {
return () => { return () => {
viewer.destroy(); viewer.destroy();
zoomInButton!.removeEventListener("click", () => zoomInButton!.removeEventListener("click", () =>
viewer.viewport.zoomBy(1.2) viewer.viewport.zoomBy(1.2),
); );
zoomOutButton!.removeEventListener("click", () => zoomOutButton!.removeEventListener("click", () =>
viewer.viewport.zoomBy(0.8) viewer.viewport.zoomBy(0.8),
); );
homeButton!.removeEventListener("click", () => homeButton!.removeEventListener("click", () =>
viewer.viewport.goHome() viewer.viewport.goHome(),
); );
fullPageButton!.removeEventListener("click", () => fullPageButton!.removeEventListener("click", () =>
viewer.setFullScreen(true) viewer.setFullScreen(true),
); );
}; };
} }
@ -82,7 +82,7 @@ export default function ImageViewer({ image }) {
return image === "" ? ( return image === "" ? (
<div className="align-center flex h-full w-full flex-col justify-center gap-5 rounded-md border border-border bg-muted"> <div className="align-center flex h-full w-full flex-col justify-center gap-5 rounded-md border border-border bg-muted">
<div className="align-center flex justify-center gap-2 "> <div className="align-center flex justify-center gap-2">
<ForwardedIconComponent name="Image" /> <ForwardedIconComponent name="Image" />
{IMGViewErrorTitle} {IMGViewErrorTitle}
</div> </div>
@ -98,7 +98,7 @@ export default function ImageViewer({ image }) {
<div className="shadow-round-btn-shadow hover:shadow-round-btn-shadow flex w-[50%] items-center justify-center rounded-sm border bg-muted shadow-md transition-all"> <div className="shadow-round-btn-shadow hover:shadow-round-btn-shadow flex w-[50%] items-center justify-center rounded-sm border bg-muted shadow-md transition-all">
<button <button
id="zoom-in-button" id="zoom-in-button"
className="relative inline-flex w-full w-full items-center justify-center px-3 py-3 text-sm font-semibold transition-all transition-all duration-500 ease-in-out ease-in-out hover:bg-hover" className="relative inline-flex w-full items-center justify-center px-3 py-3 text-sm font-semibold transition-all duration-500 ease-in-out hover:bg-hover"
> >
<ForwardedIconComponent <ForwardedIconComponent
name="ZoomIn" name="ZoomIn"
@ -110,7 +110,7 @@ export default function ImageViewer({ image }) {
</div> </div>
<button <button
id="zoom-out-button" id="zoom-out-button"
className="relative inline-flex w-full items-center justify-center px-3 py-3 text-sm font-semibold transition-all transition-all duration-500 ease-in-out ease-in-out hover:bg-hover" className="relative inline-flex w-full items-center justify-center px-3 py-3 text-sm font-semibold transition-all duration-500 ease-in-out hover:bg-hover"
> >
<ForwardedIconComponent <ForwardedIconComponent
name="ZoomOut" name="ZoomOut"
@ -122,7 +122,7 @@ export default function ImageViewer({ image }) {
</div> </div>
<button <button
id="home-button" id="home-button"
className="relative inline-flex w-full items-center justify-center px-3 py-3 text-sm font-semibold transition-all transition-all duration-500 ease-in-out ease-in-out hover:bg-hover" className="relative inline-flex w-full items-center justify-center px-3 py-3 text-sm font-semibold transition-all duration-500 ease-in-out hover:bg-hover"
> >
<ForwardedIconComponent <ForwardedIconComponent
name="RotateCcw" name="RotateCcw"
@ -134,7 +134,7 @@ export default function ImageViewer({ image }) {
</div> </div>
<button <button
id="full-page-button" id="full-page-button"
className="relative inline-flex w-full items-center justify-center px-3 py-3 text-sm font-semibold transition-all transition-all duration-500 ease-in-out ease-in-out hover:bg-hover" className="relative inline-flex w-full items-center justify-center px-3 py-3 text-sm font-semibold transition-all duration-500 ease-in-out hover:bg-hover"
> >
<ForwardedIconComponent <ForwardedIconComponent
name="Maximize2" name="Maximize2"
@ -147,7 +147,7 @@ export default function ImageViewer({ image }) {
<button <button
onClick={download} onClick={download}
className="relative inline-flex w-full items-center justify-center px-3 py-3 text-sm font-semibold transition-all transition-all duration-500 ease-in-out ease-in-out hover:bg-hover" className="relative inline-flex w-full items-center justify-center px-3 py-3 text-sm font-semibold transition-all duration-500 ease-in-out hover:bg-hover"
> >
<ForwardedIconComponent <ForwardedIconComponent
name="ArrowDownToLine" name="ArrowDownToLine"
@ -156,7 +156,7 @@ export default function ImageViewer({ image }) {
</button> </button>
</div> </div>
</div> </div>
<div id="canvas" ref={viewerRef} className={`h-[90%] w-full `} /> <div id="canvas" ref={viewerRef} className={`h-[90%] w-full`} />
</> </>
); );
} }

View file

@ -15,7 +15,7 @@ export default function FolderAccordionComponent({
options, options,
}: AccordionComponentType): JSX.Element { }: AccordionComponentType): JSX.Element {
const [value, setValue] = useState( const [value, setValue] = useState(
open.length === 0 ? "" : getOpenAccordion() open.length === 0 ? "" : getOpenAccordion(),
); );
function getOpenAccordion(): string { function getOpenAccordion(): string {

View file

@ -17,7 +17,7 @@ export default function AccordionComponent({
sideBar, sideBar,
}: AccordionComponentType): JSX.Element { }: AccordionComponentType): JSX.Element {
const [value, setValue] = useState( const [value, setValue] = useState(
open.length === 0 ? "" : getOpenAccordion() open.length === 0 ? "" : getOpenAccordion(),
); );
function getOpenAccordion(): string { function getOpenAccordion(): string {
@ -52,7 +52,7 @@ export default function AccordionComponent({
disabled={disabled} disabled={disabled}
className={cn( className={cn(
sideBar ? "w-full bg-muted px-[0.75rem] py-[0.5rem]" : "ml-3", sideBar ? "w-full bg-muted px-[0.75rem] py-[0.5rem]" : "ml-3",
disabled ? "cursor-not-allowed" : "cursor-pointer" disabled ? "cursor-not-allowed" : "cursor-pointer",
)} )}
> >
{trigger} {trigger}

View file

@ -29,19 +29,19 @@ export default function AddNewVariableButton({
const setErrorData = useAlertStore((state) => state.setErrorData); const setErrorData = useAlertStore((state) => state.setErrorData);
const componentFields = useTypesStore((state) => state.ComponentFields); const componentFields = useTypesStore((state) => state.ComponentFields);
const unavaliableFields = new Set( const unavaliableFields = new Set(
Object.keys(useGlobalVariablesStore((state) => state.unavaliableFields)) Object.keys(useGlobalVariablesStore((state) => state.unavaliableFields)),
); );
const availableFields = () => { const availableFields = () => {
const fields = Array.from(componentFields).filter( const fields = Array.from(componentFields).filter(
(field) => !unavaliableFields.has(field) (field) => !unavaliableFields.has(field),
); );
return sortByName(fields); return sortByName(fields);
}; };
const addGlobalVariable = useGlobalVariablesStore( const addGlobalVariable = useGlobalVariablesStore(
(state) => state.addGlobalVariable (state) => state.addGlobalVariable,
); );
function handleSaveVariable() { function handleSaveVariable() {
@ -92,7 +92,7 @@ export default function AddNewVariableButton({
<span className="pr-2"> Create Variable </span> <span className="pr-2"> Create Variable </span>
<ForwardedIconComponent <ForwardedIconComponent
name="Globe" name="Globe"
className="h-6 w-6 pl-1 text-primary " className="h-6 w-6 pl-1 text-primary"
aria-hidden="true" aria-hidden="true"
/> />
</BaseModal.Header> </BaseModal.Header>

View file

@ -10,7 +10,7 @@ export default function DragCardComponent({ data }: { data: storeComponent }) {
draggable draggable
//TODO check color schema //TODO check color schema
className={cn( className={cn(
"group relative flex flex-col justify-between overflow-hidden transition-all hover:bg-muted/50 hover:shadow-md hover:dark:bg-[#ffffff10]" "group relative flex flex-col justify-between overflow-hidden transition-all hover:bg-muted/50 hover:shadow-md hover:dark:bg-[#ffffff10]",
)} )}
> >
<div> <div>
@ -22,7 +22,7 @@ export default function DragCardComponent({ data }: { data: storeComponent }) {
"visible flex-shrink-0", "visible flex-shrink-0",
data.is_component data.is_component
? "mx-0.5 h-6 w-6 text-component-icon" ? "mx-0.5 h-6 w-6 text-component-icon"
: "h-7 w-7 flex-shrink-0 text-flow-icon" : "h-7 w-7 flex-shrink-0 text-flow-icon",
)} )}
name={data.is_component ? "ToyBrick" : "Group"} name={data.is_component ? "ToyBrick" : "Group"}
/> />

View file

@ -60,11 +60,11 @@ export default function CollectionCardComponent({
const [loading, setLoading] = useState(false); const [loading, setLoading] = useState(false);
const [loadingLike, setLoadingLike] = useState(false); const [loadingLike, setLoadingLike] = useState(false);
const [liked_by_user, setLiked_by_user] = useState( const [liked_by_user, setLiked_by_user] = useState(
data?.liked_by_user ?? false data?.liked_by_user ?? false,
); );
const [likes_count, setLikes_count] = useState(data?.liked_by_count ?? 0); const [likes_count, setLikes_count] = useState(data?.liked_by_count ?? 0);
const [downloads_count, setDownloads_count] = useState( const [downloads_count, setDownloads_count] = useState(
data?.downloads_count ?? 0 data?.downloads_count ?? 0,
); );
const currentFlow = useFlowsManagerStore((state) => state.currentFlow); const currentFlow = useFlowsManagerStore((state) => state.currentFlow);
const setCurrentFlow = useFlowsManagerStore((state) => state.setCurrentFlow); const setCurrentFlow = useFlowsManagerStore((state) => state.setCurrentFlow);
@ -75,12 +75,12 @@ export default function CollectionCardComponent({
const [openPlayground, setOpenPlayground] = useState(false); const [openPlayground, setOpenPlayground] = useState(false);
const [openDelete, setOpenDelete] = useState(false); const [openDelete, setOpenDelete] = useState(false);
const setCurrentFlowId = useFlowsManagerStore( const setCurrentFlowId = useFlowsManagerStore(
(state) => state.setCurrentFlowId (state) => state.setCurrentFlowId,
); );
const [loadingPlayground, setLoadingPlayground] = useState(false); const [loadingPlayground, setLoadingPlayground] = useState(false);
const selectedFlowsComponentsCards = useFlowsManagerStore( const selectedFlowsComponentsCards = useFlowsManagerStore(
(state) => state.selectedFlowsComponentsCards (state) => state.selectedFlowsComponentsCards,
); );
const name = data.is_component ? "Component" : "Flow"; const name = data.is_component ? "Component" : "Flow";
@ -220,7 +220,7 @@ export default function CollectionCardComponent({
"group relative flex h-[11rem] flex-col justify-between overflow-hidden hover:bg-muted/50 hover:shadow-md hover:dark:bg-[#5f5f5f0e]", "group relative flex h-[11rem] flex-col justify-between overflow-hidden hover:bg-muted/50 hover:shadow-md hover:dark:bg-[#5f5f5f0e]",
disabled ? "pointer-events-none opacity-50" : "", disabled ? "pointer-events-none opacity-50" : "",
onClick ? "cursor-pointer" : "", onClick ? "cursor-pointer" : "",
isSelectedCard ? "border border-selected" : "" isSelectedCard ? "border border-selected" : "",
)} )}
onClick={onClick} onClick={onClick}
> >
@ -233,7 +233,7 @@ export default function CollectionCardComponent({
"visible flex-shrink-0", "visible flex-shrink-0",
data.is_component data.is_component
? "mx-0.5 h-6 w-6 text-component-icon" ? "mx-0.5 h-6 w-6 text-component-icon"
: "h-7 w-7 flex-shrink-0 text-flow-icon" : "h-7 w-7 flex-shrink-0 text-flow-icon",
)} )}
name={data.is_component ? "ToyBrick" : "Group"} name={data.is_component ? "ToyBrick" : "Group"}
/> />
@ -262,10 +262,7 @@ export default function CollectionCardComponent({
)} )}
<ShadTooltip content="Likes"> <ShadTooltip content="Likes">
<span className="flex items-center gap-1.5 text-xs text-muted-foreground"> <span className="flex items-center gap-1.5 text-xs text-muted-foreground">
<IconComponent <IconComponent name="Heart" className={cn("h-4 w-4")} />
name="Heart"
className={cn("h-4 w-4 ")}
/>
<span data-testid={`likes-${data.name}`}> <span data-testid={`likes-${data.name}`}>
{likes_count ?? 0} {likes_count ?? 0}
</span> </span>
@ -428,7 +425,7 @@ export default function CollectionCardComponent({
name="Trash2" name="Trash2"
className={cn( className={cn(
"h-5 w-5", "h-5 w-5",
!authorized ? " text-ring" : "" !authorized ? "text-ring" : "",
)} )}
/> />
</Button> </Button>
@ -463,7 +460,7 @@ export default function CollectionCardComponent({
liked_by_user liked_by_user
? "fill-destructive stroke-destructive" ? "fill-destructive stroke-destructive"
: "", : "",
!authorized ? " text-ring" : "" !authorized ? "text-ring" : "",
)} )}
/> />
</Button> </Button>
@ -501,7 +498,7 @@ export default function CollectionCardComponent({
} }
className={cn( className={cn(
loading ? "h-5 w-5 animate-spin" : "h-5 w-5", loading ? "h-5 w-5 animate-spin" : "h-5 w-5",
!authorized ? " text-ring" : "" !authorized ? "text-ring" : "",
)} )}
/> />
</Button> </Button>

View file

@ -65,7 +65,7 @@ export default function CardsWrapComponent({
"h-full w-full", "h-full w-full",
isDragging isDragging
? "mb-36 flex flex-col items-center justify-center gap-4 text-2xl font-light" ? "mb-36 flex flex-col items-center justify-center gap-4 text-2xl font-light"
: "" : "",
)} )}
> >
{isDragging ? ( {isDragging ? (

View file

@ -62,10 +62,10 @@ export default function FlowToolbar(): JSX.Element {
<button <button
disabled={!hasApiKey || !validApiKey || !hasStore} disabled={!hasApiKey || !validApiKey || !hasStore}
className={classNames( className={classNames(
"relative inline-flex h-full w-full items-center justify-center gap-[4px] bg-muted px-5 py-3 text-sm font-semibold text-foreground transition-all duration-150 ease-in-out hover:bg-background hover:bg-hover ", "relative inline-flex h-full w-full items-center justify-center gap-[4px] bg-muted px-5 py-3 text-sm font-semibold text-foreground transition-all duration-150 ease-in-out hover:bg-background hover:bg-hover",
!hasApiKey || !validApiKey || !hasStore !hasApiKey || !validApiKey || !hasStore
? " button-disable text-muted-foreground " ? "button-disable text-muted-foreground"
: "" : "",
)} )}
> >
<ForwardedIconComponent <ForwardedIconComponent
@ -74,7 +74,7 @@ export default function FlowToolbar(): JSX.Element {
"-m-0.5 -ml-1 h-6 w-6", "-m-0.5 -ml-1 h-6 w-6",
!hasApiKey || !validApiKey || !hasStore !hasApiKey || !validApiKey || !hasStore
? "extra-side-bar-save-disable" ? "extra-side-bar-save-disable"
: "" : "",
)} )}
/> />
Share Share
@ -88,7 +88,7 @@ export default function FlowToolbar(): JSX.Element {
hasStore, hasStore,
openShareModal, openShareModal,
setOpenShareModal, setOpenShareModal,
] ],
); );
return ( return (
@ -115,18 +115,18 @@ export default function FlowToolbar(): JSX.Element {
<div className="relative inline-flex w-full items-center justify-center gap-1 px-5 py-3 text-sm font-semibold transition-all duration-500 ease-in-out hover:bg-hover"> <div className="relative inline-flex w-full items-center justify-center gap-1 px-5 py-3 text-sm font-semibold transition-all duration-500 ease-in-out hover:bg-hover">
<ForwardedIconComponent <ForwardedIconComponent
name="BotMessageSquareIcon" name="BotMessageSquareIcon"
className={" h-5 w-5 transition-all"} className={"h-5 w-5 transition-all"}
/> />
Playground Playground
</div> </div>
</IOModal> </IOModal>
) : ( ) : (
<div <div
className={`relative inline-flex w-full cursor-not-allowed items-center justify-center gap-1 px-5 py-3 text-sm font-semibold text-muted-foreground transition-all duration-150 ease-in-out ease-in-out`} className={`relative inline-flex w-full cursor-not-allowed items-center justify-center gap-1 px-5 py-3 text-sm font-semibold text-muted-foreground transition-all duration-150 ease-in-out`}
> >
<ForwardedIconComponent <ForwardedIconComponent
name="BotMessageSquareIcon" name="BotMessageSquareIcon"
className={" h-5 w-5 transition-all"} className={"h-5 w-5 transition-all"}
/> />
Playground Playground
</div> </div>
@ -144,12 +144,12 @@ export default function FlowToolbar(): JSX.Element {
> >
<div <div
className={classNames( className={classNames(
"relative inline-flex w-full items-center justify-center gap-1 px-5 py-3 text-sm font-semibold text-foreground transition-all duration-150 ease-in-out hover:bg-hover" "relative inline-flex w-full items-center justify-center gap-1 px-5 py-3 text-sm font-semibold text-foreground transition-all duration-150 ease-in-out hover:bg-hover",
)} )}
> >
<ForwardedIconComponent <ForwardedIconComponent
name="Code2" name="Code2"
className={" h-5 w-5"} className={"h-5 w-5"}
/> />
API API
</div> </div>
@ -163,8 +163,8 @@ export default function FlowToolbar(): JSX.Element {
<div <div
className={`side-bar-button ${ className={`side-bar-button ${
!hasApiKey || !validApiKey || !hasStore !hasApiKey || !validApiKey || !hasStore
? " cursor-not-allowed" ? "cursor-not-allowed"
: " cursor-pointer" : "cursor-pointer"
}`} }`}
> >
{ModalMemo} {ModalMemo}

View file

@ -18,7 +18,7 @@ export default function CodeAreaComponent({
setOpen, setOpen,
}: CodeAreaComponentType) { }: CodeAreaComponentType) {
const [myValue, setMyValue] = useState( const [myValue, setMyValue] = useState(
typeof value == "string" ? value : JSON.stringify(value) typeof value == "string" ? value : JSON.stringify(value),
); );
useEffect(() => { useEffect(() => {
if (disabled && myValue !== "") { if (disabled && myValue !== "") {
@ -32,7 +32,7 @@ export default function CodeAreaComponent({
}, [value]); }, [value]);
return ( return (
<div className={disabled ? "pointer-events-none w-full " : " w-full"}> <div className={disabled ? "pointer-events-none w-full" : "w-full"}>
<CodeAreaModal <CodeAreaModal
open={open} open={open}
setOpen={setOpen} setOpen={setOpen}
@ -53,8 +53,8 @@ export default function CodeAreaComponent({
className={ className={
editNode editNode
? "input-edit-node input-dialog" ? "input-edit-node input-dialog"
: (disabled ? " input-disable input-ring " : "") + : (disabled ? "input-disable input-ring " : "") +
" primary-input text-muted-foreground " " primary-input text-muted-foreground"
} }
> >
{myValue !== "" ? myValue : "Type something..."} {myValue !== "" ? myValue : "Type something..."}

View file

@ -98,7 +98,7 @@ export default function CodeTabsComponent({
value={activeTab} value={activeTab}
className={ className={
"api-modal-tabs inset-0 m-0 " + "api-modal-tabs inset-0 m-0 " +
(isMessage ? "dark " : "") + (isMessage ? "dark" : "") +
(dark && isMessage ? "bg-background" : "") (dark && isMessage ? "bg-background" : "")
} }
onValueChange={(value) => { onValueChange={(value) => {
@ -138,7 +138,7 @@ export default function CodeTabsComponent({
<Label <Label
className={cn( className={cn(
"relative right-1 top-[4px] text-xs font-medium text-muted-foreground", "relative right-1 top-[4px] text-xs font-medium text-muted-foreground",
activeTweaks ? "text-primary" : "" activeTweaks ? "text-primary" : "",
)} )}
htmlFor="tweaks-switch" htmlFor="tweaks-switch"
> >
@ -193,7 +193,7 @@ export default function CodeTabsComponent({
<div className="api-modal-according-display"> <div className="api-modal-according-display">
<div <div
className={classNames( className={classNames(
"h-[70vh] w-full overflow-y-auto overflow-x-hidden rounded-lg bg-muted custom-scroll" "h-[70vh] w-full overflow-y-auto overflow-x-hidden rounded-lg bg-muted custom-scroll",
)} )}
> >
{data?.map((node: any, i) => ( {data?.map((node: any, i) => (
@ -232,8 +232,8 @@ export default function CodeTabsComponent({
.show && .show &&
LANGFLOW_SUPPORTED_TYPES.has( LANGFLOW_SUPPORTED_TYPES.has(
node.data.node.template[templateField] node.data.node.template[templateField]
.type .type,
) ),
) )
.map((templateField, indx) => { .map((templateField, indx) => {
return ( return (
@ -291,7 +291,7 @@ export default function CodeTabsComponent({
target, target,
node.data.node.template[ node.data.node.template[
templateField templateField
] ],
); );
}} }}
/> />
@ -337,7 +337,7 @@ export default function CodeTabsComponent({
target, target,
node.data.node.template[ node.data.node.template[
templateField templateField
] ],
); );
}} }}
/> />
@ -390,7 +390,7 @@ export default function CodeTabsComponent({
target, target,
node.data.node.template[ node.data.node.template[
templateField templateField
] ],
); );
}} }}
/> />
@ -427,7 +427,7 @@ export default function CodeTabsComponent({
e, e,
node.data.node.template[ node.data.node.template[
templateField templateField
] ],
); );
}} }}
size="small" size="small"
@ -458,7 +458,7 @@ export default function CodeTabsComponent({
].fileTypes ].fileTypes
} }
onFileChange={( onFileChange={(
value: any value: any,
) => { ) => {
node.data.node.template[ node.data.node.template[
templateField templateField
@ -511,7 +511,7 @@ export default function CodeTabsComponent({
target, target,
node.data.node.template[ node.data.node.template[
templateField templateField
] ],
); );
}} }}
/> />
@ -551,7 +551,7 @@ export default function CodeTabsComponent({
target, target,
node.data.node.template[ node.data.node.template[
templateField templateField
] ],
); );
}} }}
value={ value={
@ -613,7 +613,7 @@ export default function CodeTabsComponent({
target, target,
node.data.node.template[ node.data.node.template[
templateField templateField
] ],
); );
}} }}
/> />
@ -659,7 +659,7 @@ export default function CodeTabsComponent({
target, target,
node.data.node.template[ node.data.node.template[
templateField templateField
] ],
); );
}} }}
/> />
@ -705,7 +705,7 @@ export default function CodeTabsComponent({
target, target,
node.data.node.template[ node.data.node.template[
templateField templateField
] ],
); );
}} }}
/> />
@ -737,8 +737,8 @@ export default function CodeTabsComponent({
].value, ].value,
type( type(
node, node,
templateField templateField,
) ),
) )
} }
duplicateKey={ duplicateKey={
@ -747,15 +747,15 @@ export default function CodeTabsComponent({
onChange={(target) => { onChange={(target) => {
const valueToNumbers = const valueToNumbers =
convertValuesToNumbers( convertValuesToNumbers(
target target,
); );
node.data.node!.template[ node.data.node!.template[
templateField templateField
].value = valueToNumbers; ].value = valueToNumbers;
setErrorDuplicateKey( setErrorDuplicateKey(
hasDuplicateKeys( hasDuplicateKeys(
valueToNumbers valueToNumbers,
) ),
); );
setData((old) => { setData((old) => {
let newInputList = let newInputList =
@ -772,7 +772,7 @@ export default function CodeTabsComponent({
target, target,
node.data.node.template[ node.data.node.template[
templateField templateField
] ],
); );
}} }}
isList={ isList={
@ -820,7 +820,7 @@ export default function CodeTabsComponent({
target, target,
node.data.node.template[ node.data.node.template[
templateField templateField
] ],
); );
}} }}
/> />

View file

@ -31,7 +31,7 @@ export default function CrashErrorComponent({
href="https://github.com/langflow-ai/langflow/issues" href="https://github.com/langflow-ai/langflow/issues"
target="_blank" target="_blank"
rel="noopener noreferrer" rel="noopener noreferrer"
className="font-medium hover:underline " className="font-medium hover:underline"
> >
GitHub Issues GitHub Issues
</a>{" "} </a>{" "}

View file

@ -32,7 +32,7 @@ function CsvOutputComponent({
if (!file) { if (!file) {
return ( return (
<div className=" align-center flex h-full w-full flex-col items-center justify-center gap-5"> <div className="align-center flex h-full w-full flex-col items-center justify-center gap-5">
<div className="align-center flex w-full justify-center gap-2"> <div className="align-center flex w-full justify-center gap-2">
<ForwardedIconComponent name="Table" /> <ForwardedIconComponent name="Table" />
{CSVViewErrorTitle} {CSVViewErrorTitle}
@ -67,7 +67,7 @@ function CsvOutputComponent({
if (file) { if (file) {
const { rowData: data, colDefs: columns } = convertCSVToData( const { rowData: data, colDefs: columns } = convertCSVToData(
file, file,
separator separator,
); );
setRowData(data); setRowData(data);
setColDefs(columns); setColDefs(columns);
@ -81,9 +81,9 @@ function CsvOutputComponent({
}, [separator]); }, [separator]);
return ( return (
<div className=" h-full rounded-md border bg-muted"> <div className="h-full rounded-md border bg-muted">
{status === "nodata" && ( {status === "nodata" && (
<div className=" align-center flex h-full w-full flex-col items-center justify-center gap-5"> <div className="align-center flex h-full w-full flex-col items-center justify-center gap-5">
<div className="align-center flex w-full justify-center gap-2"> <div className="align-center flex w-full justify-center gap-2">
<ForwardedIconComponent name="Table" /> <ForwardedIconComponent name="Table" />
{CSVViewErrorTitle} {CSVViewErrorTitle}
@ -96,7 +96,7 @@ function CsvOutputComponent({
</div> </div>
)} )}
{status === "error" && ( {status === "error" && (
<div className=" align-center flex h-full w-full flex-col items-center justify-center gap-5"> <div className="align-center flex h-full w-full flex-col items-center justify-center gap-5">
<div className="align-center flex w-full justify-center gap-2"> <div className="align-center flex w-full justify-center gap-2">
<ForwardedIconComponent name="Table" /> <ForwardedIconComponent name="Table" />
{CSVViewErrorTitle} {CSVViewErrorTitle}
@ -125,7 +125,7 @@ function CsvOutputComponent({
</div> </div>
)} )}
{status === "loading" && ( {status === "loading" && (
<div className=" flex h-full w-full items-center justify-center align-middle"> <div className="flex h-full w-full items-center justify-center align-middle">
<Loading /> <Loading />
</div> </div>
)} )}

View file

@ -24,7 +24,7 @@ export default function DictComponent({
<div <div
className={classNames( className={classNames(
value.length > 1 && editNode ? "my-1" : "", value.length > 1 && editNode ? "my-1" : "",
"flex w-full flex-col gap-3" "flex w-full flex-col gap-3",
)} )}
> >
{ {

View file

@ -26,7 +26,7 @@ export default function DropdownButton({
id="new-project-btn" id="new-project-btn"
variant="primary" variant="primary"
className={ className={
"relative" + dropdownOptions ? " pl-[12px]" : " pl-[12px] pr-10" "relative" + dropdownOptions ? "pl-[12px]" : "pl-[12px] pr-10"
} }
onClick={(event) => { onClick={(event) => {
event.stopPropagation(); event.stopPropagation();

View file

@ -58,7 +58,7 @@ export default function Dropdown({
? "dropdown-component-outline" ? "dropdown-component-outline"
: "dropdown-component-false-outline", : "dropdown-component-false-outline",
"w-full justify-between font-normal", "w-full justify-between font-normal",
editNode ? "input-edit-node" : "py-2" editNode ? "input-edit-node" : "py-2",
)} )}
> >
<span data-testid={`value-dropdown-` + id}> <span data-testid={`value-dropdown-` + id}>
@ -106,7 +106,7 @@ export default function Dropdown({
name="Check" name="Check"
className={cn( className={cn(
"ml-auto h-4 w-4 text-primary", "ml-auto h-4 w-4 text-primary",
value === option ? "opacity-100" : "opacity-0" value === option ? "opacity-100" : "opacity-0",
)} )}
/> />
</CommandItem> </CommandItem>

View file

@ -78,7 +78,7 @@ export const EditFlowSettings: React.FC<InputProps> = ({
</Label> </Label>
<Label> <Label>
<div className="edit-flow-arrangement mt-3"> <div className="edit-flow-arrangement mt-3">
<span className="font-medium "> <span className="font-medium">
Description{setDescription ? " (optional)" : ":"} Description{setDescription ? " (optional)" : ":"}
</span> </span>
</div> </div>
@ -99,7 +99,7 @@ export const EditFlowSettings: React.FC<InputProps> = ({
<span <span
className={cn( className={cn(
"font-normal text-muted-foreground word-break-break-word", "font-normal text-muted-foreground word-break-break-word",
description === "" ? "font-light italic" : "" description === "" ? "font-light italic" : "",
)} )}
> >
{description === "" ? "No description" : description} {description === "" ? "No description" : description}

View file

@ -28,7 +28,7 @@ export default function CollectionCardComponent({
return ( return (
<Card <Card
className={cn( className={cn(
"group relative flex h-48 w-2/6 flex-col justify-between overflow-hidden transition-all hover:shadow-md" "group relative flex h-48 w-2/6 flex-col justify-between overflow-hidden transition-all hover:shadow-md",
)} )}
> >
<div> <div>
@ -84,7 +84,7 @@ export default function CollectionCardComponent({
tabIndex={-1} tabIndex={-1}
variant="outline" variant="outline"
size="sm" size="sm"
className="whitespace-nowrap " className="whitespace-nowrap"
> >
<IconComponent <IconComponent
name="ExternalLink" name="ExternalLink"

View file

@ -18,7 +18,7 @@ export const ForwardedIconComponent = memo(
strokeWidth, strokeWidth,
id = "", id = "",
}: IconComponentProps, }: IconComponentProps,
ref ref,
) => { ) => {
const [showFallback, setShowFallback] = useState(false); const [showFallback, setShowFallback] = useState(false);
@ -65,8 +65,8 @@ export const ForwardedIconComponent = memo(
/> />
</Suspense> </Suspense>
); );
} },
) ),
); );
export default ForwardedIconComponent; export default ForwardedIconComponent;

View file

@ -88,10 +88,7 @@ export const MenuBar = ({}: {}): JSX.Element => {
}} }}
className="cursor-pointer" className="cursor-pointer"
> >
<IconComponent <IconComponent name="Settings2" className="header-menu-options" />
name="Settings2"
className="header-menu-options "
/>
Settings Settings
</DropdownMenuItem> </DropdownMenuItem>
<DropdownMenuItem <DropdownMenuItem
@ -102,7 +99,7 @@ export const MenuBar = ({}: {}): JSX.Element => {
> >
<IconComponent <IconComponent
name="ScrollText" name="ScrollText"
className="header-menu-options " className="header-menu-options"
/> />
Logs Logs
</DropdownMenuItem> </DropdownMenuItem>
@ -115,11 +112,11 @@ export const MenuBar = ({}: {}): JSX.Element => {
title: UPLOAD_ERROR_ALERT, title: UPLOAD_ERROR_ALERT,
list: [error], list: [error],
}); });
} },
); );
}} }}
> >
<IconComponent name="FileUp" className="header-menu-options " /> <IconComponent name="FileUp" className="header-menu-options" />
Import Import
</DropdownMenuItem> </DropdownMenuItem>
<ExportModal> <ExportModal>
@ -137,7 +134,7 @@ export const MenuBar = ({}: {}): JSX.Element => {
}} }}
className="cursor-pointer" className="cursor-pointer"
> >
<IconComponent name="Undo" className="header-menu-options " /> <IconComponent name="Undo" className="header-menu-options" />
Undo Undo
{IS_MAC ? ( {IS_MAC ? (
<IconComponent <IconComponent
@ -159,7 +156,7 @@ export const MenuBar = ({}: {}): JSX.Element => {
}} }}
className="cursor-pointer" className="cursor-pointer"
> >
<IconComponent name="Redo" className="header-menu-options " /> <IconComponent name="Redo" className="header-menu-options" />
Redo Redo
{IS_MAC ? ( {IS_MAC ? (
<IconComponent <IconComponent
@ -201,7 +198,7 @@ export const MenuBar = ({}: {}): JSX.Element => {
name={isBuilding || saveLoading ? "Loader2" : "CheckCircle2"} name={isBuilding || saveLoading ? "Loader2" : "CheckCircle2"}
className={cn( className={cn(
"h-4 w-4", "h-4 w-4",
isBuilding || saveLoading ? "animate-spin" : "animate-wiggle" isBuilding || saveLoading ? "animate-spin" : "animate-wiggle",
)} )}
/> />
{printByBuildStatus()} {printByBuildStatus()}

View file

@ -59,7 +59,7 @@ export default function Header(): JSX.Element {
const lastFlowVisitedIndex = routeHistory const lastFlowVisitedIndex = routeHistory
.reverse() .reverse()
.findIndex( .findIndex(
(path) => path.includes("/flow/") && path !== location.pathname (path) => path.includes("/flow/") && path !== location.pathname,
); );
const lastFlowVisited = routeHistory[lastFlowVisitedIndex]; const lastFlowVisited = routeHistory[lastFlowVisitedIndex];
@ -201,7 +201,7 @@ export default function Header(): JSX.Element {
src={ src={
`${BACKEND_URL.slice( `${BACKEND_URL.slice(
0, 0,
BACKEND_URL.length - 1 BACKEND_URL.length - 1,
)}${BASE_URL_API}files/profile_pictures/${ )}${BASE_URL_API}files/profile_pictures/${
userData?.profile_image ?? "Space/046-rocket.svg" userData?.profile_image ?? "Space/046-rocket.svg"
}` ?? profileCircle }` ?? profileCircle
@ -219,12 +219,12 @@ export default function Header(): JSX.Element {
src={ src={
`${BACKEND_URL.slice( `${BACKEND_URL.slice(
0, 0,
BACKEND_URL.length - 1 BACKEND_URL.length - 1,
)}${BASE_URL_API}files/profile_pictures/${ )}${BASE_URL_API}files/profile_pictures/${
userData?.profile_image ?? "Space/046-rocket.svg" userData?.profile_image ?? "Space/046-rocket.svg"
}` ?? profileCircle }` ?? profileCircle
} }
className="h-5 w-5 focus-visible:outline-0 " className="h-5 w-5 focus-visible:outline-0"
/> />
{userData?.username ?? "User"} {userData?.username ?? "User"}

View file

@ -32,11 +32,11 @@ export default function HorizontalScrollFadeComponent({
fadeContainerRef.current.classList.toggle( fadeContainerRef.current.classList.toggle(
"fade-left", "fade-left",
isScrollable && !atStart isScrollable && !atStart,
); );
fadeContainerRef.current.classList.toggle( fadeContainerRef.current.classList.toggle(
"fade-right", "fade-right",
isScrollable && !atEnd isScrollable && !atEnd,
); );
}; };

View file

@ -93,9 +93,9 @@ const CustomInputPopover = ({
(!setSelectedOption || selectedOption === "") && (!setSelectedOption || selectedOption === "") &&
!pwdVisible && !pwdVisible &&
value !== "" value !== ""
? " text-clip password " ? "text-clip password"
: "", : "",
editNode ? " input-edit-node " : "", editNode ? "input-edit-node" : "",
password && (setSelectedOption || setSelectedOptions) password && (setSelectedOption || setSelectedOptions)
? "pr-[62.9px]" ? "pr-[62.9px]"
: "", : "",
@ -103,7 +103,7 @@ const CustomInputPopover = ({
(password && !(setSelectedOption || setSelectedOptions)) (password && !(setSelectedOption || setSelectedOptions))
? "pr-8" ? "pr-8"
: "", : "",
className! className!,
)} )}
placeholder={password && editNode ? "Key" : placeholder} placeholder={password && editNode ? "Key" : placeholder}
onChange={handleInputChange} onChange={handleInputChange}
@ -141,15 +141,15 @@ const CustomInputPopover = ({
onSelect={(currentValue) => { onSelect={(currentValue) => {
setSelectedOption && setSelectedOption &&
setSelectedOption( setSelectedOption(
currentValue === selectedOption ? "" : currentValue currentValue === selectedOption ? "" : currentValue,
); );
setSelectedOptions && setSelectedOptions &&
setSelectedOptions( setSelectedOptions(
selectedOptions?.includes(currentValue) selectedOptions?.includes(currentValue)
? selectedOptions.filter( ? selectedOptions.filter(
(item) => item !== currentValue (item) => item !== currentValue,
) )
: [...selectedOptions, currentValue] : [...selectedOptions, currentValue],
); );
!setSelectedOptions && setShowOptions(false); !setSelectedOptions && setShowOptions(false);
}} }}
@ -162,7 +162,7 @@ const CustomInputPopover = ({
selectedOption === option || selectedOption === option ||
selectedOptions?.includes(option) selectedOptions?.includes(option)
? "opacity-100" ? "opacity-100"
: "opacity-0" : "opacity-0",
)} )}
> >
<div className="absolute opacity-100 transition-all group-hover:opacity-0"> <div className="absolute opacity-100 transition-all group-hover:opacity-0">

View file

@ -64,7 +64,7 @@ const CustomInputPopoverObject = ({
? selectedOptions ? selectedOptions
.map( .map(
(optionId) => (optionId) =>
options.find((option) => option.id === optionId)?.name options.find((option) => option.id === optionId)?.name,
) )
.join(", ") .join(", ")
: value : value
@ -115,15 +115,15 @@ const CustomInputPopoverObject = ({
onSelect={(currentValue) => { onSelect={(currentValue) => {
setSelectedOption && setSelectedOption &&
setSelectedOption( setSelectedOption(
currentValue === selectedOption ? "" : currentValue currentValue === selectedOption ? "" : currentValue,
); );
setSelectedOptions && setSelectedOptions &&
setSelectedOptions( setSelectedOptions(
selectedOptions?.includes(currentValue) selectedOptions?.includes(currentValue)
? selectedOptions.filter( ? selectedOptions.filter(
(item) => item !== currentValue (item) => item !== currentValue,
) )
: [...selectedOptions, currentValue] : [...selectedOptions, currentValue],
); );
!setSelectedOptions && setShowOptions(false); !setSelectedOptions && setShowOptions(false);
}} }}
@ -136,7 +136,7 @@ const CustomInputPopoverObject = ({
selectedOption === option.id || selectedOption === option.id ||
selectedOptions?.includes(option.id) selectedOptions?.includes(option.id)
? "opacity-100" ? "opacity-100"
: "opacity-0" : "opacity-0",
)} )}
> >
<div className="absolute opacity-100 transition-all group-hover:opacity-0"> <div className="absolute opacity-100 transition-all group-hover:opacity-0">

View file

@ -67,12 +67,12 @@ export default function InputComponent({
required={required} required={required}
className={classNames( className={classNames(
password && !pwdVisible && value !== "" password && !pwdVisible && value !== ""
? " text-clip password " ? "text-clip password"
: "", : "",
editNode ? " input-edit-node " : "", editNode ? "input-edit-node" : "",
password && editNode ? "pr-8" : "", password && editNode ? "pr-8" : "",
password && !editNode ? "pr-10" : "", password && !editNode ? "pr-10" : "",
className! className!,
)} )}
placeholder={password && editNode ? "Key" : placeholder} placeholder={password && editNode ? "Key" : placeholder}
onChange={(e) => { onChange={(e) => {
@ -155,7 +155,7 @@ export default function InputComponent({
<span <span
className={cn( className={cn(
password && selectedOption === "" ? "right-8" : "right-0", password && selectedOption === "" ? "right-8" : "right-0",
"absolute inset-y-0 flex items-center pr-2.5" "absolute inset-y-0 flex items-center pr-2.5",
)} )}
> >
<button <button
@ -168,7 +168,7 @@ export default function InputComponent({
onChange && setSelectedOption && selectedOption !== "" onChange && setSelectedOption && selectedOption !== ""
? "text-medium-indigo" ? "text-medium-indigo"
: "text-muted-foreground", : "text-muted-foreground",
"hover:text-accent-foreground" "hover:text-accent-foreground",
)} )}
> >
<ForwardedIconComponent <ForwardedIconComponent
@ -188,7 +188,7 @@ export default function InputComponent({
"mb-px", "mb-px",
editNode editNode
? "input-component-true-button" ? "input-component-true-button"
: "input-component-false-button" : "input-component-false-button",
)} )}
onClick={(event) => { onClick={(event) => {
event.preventDefault(); event.preventDefault();
@ -205,7 +205,7 @@ export default function InputComponent({
className={classNames( className={classNames(
editNode editNode
? "input-component-true-svg" ? "input-component-true-svg"
: "input-component-false-svg" : "input-component-false-svg",
)} )}
> >
<path <path
@ -224,7 +224,7 @@ export default function InputComponent({
className={classNames( className={classNames(
editNode editNode
? "input-component-true-svg" ? "input-component-true-svg"
: "input-component-false-svg" : "input-component-false-svg",
)} )}
> >
<path <path

View file

@ -117,7 +117,7 @@ export default function InputFileComponent({
name="FileSearch2" name="FileSearch2"
className={ className={
"icons-parameters-comp" + "icons-parameters-comp" +
(disabled ? " text-ring " : " hover:text-accent-foreground") (disabled ? " text-ring" : " hover:text-accent-foreground")
} }
/> />
)} )}

View file

@ -19,15 +19,15 @@ export default function InputGlobalComponent({
editNode = false, editNode = false,
}: InputGlobalComponentType): JSX.Element { }: InputGlobalComponentType): JSX.Element {
const globalVariablesEntries = useGlobalVariablesStore( const globalVariablesEntries = useGlobalVariablesStore(
(state) => state.globalVariablesEntries (state) => state.globalVariablesEntries,
); );
const getVariableId = useGlobalVariablesStore((state) => state.getVariableId); const getVariableId = useGlobalVariablesStore((state) => state.getVariableId);
const unavaliableFields = useGlobalVariablesStore( const unavaliableFields = useGlobalVariablesStore(
(state) => state.unavaliableFields (state) => state.unavaliableFields,
); );
const removeGlobalVariable = useGlobalVariablesStore( const removeGlobalVariable = useGlobalVariablesStore(
(state) => state.removeGlobalVariable (state) => state.removeGlobalVariable,
); );
const setErrorData = useAlertStore((state) => state.setErrorData); const setErrorData = useAlertStore((state) => state.setErrorData);
@ -121,7 +121,7 @@ export default function InputGlobalComponent({
<ForwardedIconComponent <ForwardedIconComponent
name="Trash2" name="Trash2"
className={cn( className={cn(
"h-4 w-4 text-primary opacity-0 hover:text-status-red group-hover:opacity-100" "h-4 w-4 text-primary opacity-0 hover:text-status-red group-hover:opacity-100",
)} )}
aria-hidden="true" aria-hidden="true"
/> />

View file

@ -31,7 +31,7 @@ export default function InputListComponent({
<div <div
className={classNames( className={classNames(
value.length > 1 && editNode ? "my-1" : "", value.length > 1 && editNode ? "my-1" : "",
"flex flex-col gap-3" "flex flex-col gap-3",
)} )}
> >
{value.map((singleValue, idx) => { {value.map((singleValue, idx) => {

View file

@ -52,7 +52,7 @@ export default function KeypairListComponent({
<div <div
className={classNames( className={classNames(
ref.current?.length > 1 && editNode ? "mx-2 my-1" : "", ref.current?.length > 1 && editNode ? "mx-2 my-1" : "",
"flex h-full flex-col gap-3" "flex h-full flex-col gap-3",
)} )}
> >
{ref.current?.map((obj, index) => { {ref.current?.map((obj, index) => {
@ -68,7 +68,7 @@ export default function KeypairListComponent({
value={key.trim()} value={key.trim()}
className={classNames( className={classNames(
editNode ? "input-edit-node" : "", editNode ? "input-edit-node" : "",
duplicateKey ? "input-invalid" : "" duplicateKey ? "input-invalid" : "",
)} )}
placeholder="Type key..." placeholder="Type key..."
onChange={(event) => handleChangeKey(event, index)} onChange={(event) => handleChangeKey(event, index)}

View file

@ -20,7 +20,7 @@ export default function PaginatorComponent({
}: PaginatorComponentType) { }: PaginatorComponentType) {
const [size, setPageSize] = useState(pageSize); const [size, setPageSize] = useState(pageSize);
const [maxIndex, setMaxPageIndex] = useState( const [maxIndex, setMaxPageIndex] = useState(
Math.ceil(totalRowsCount / pageSize) Math.ceil(totalRowsCount / pageSize),
); );
useEffect(() => { useEffect(() => {
@ -34,8 +34,8 @@ export default function PaginatorComponent({
<div <div
className={ className={
storeComponent storeComponent
? "flex items-center lg:space-x-8 " ? "flex items-center lg:space-x-8"
: "flex items-center space-x-6 lg:space-x-8 " : "flex items-center space-x-6 lg:space-x-8"
} }
> >
<div className="flex items-center space-x-2"> <div className="flex items-center space-x-2">

View file

@ -110,7 +110,7 @@ export default function PdfViewer({ pdf }: { pdf: string }): JSX.Element {
"absolute z-50 pb-5 " + (showControl && numPages > 0 ? "" : " hidden") "absolute z-50 pb-5 " + (showControl && numPages > 0 ? "" : " hidden")
} }
> >
<div className=" flex w-min items-center justify-center gap-0.5 rounded-xl bg-secondary px-2 align-middle"> <div className="flex w-min items-center justify-center gap-0.5 rounded-xl bg-secondary px-2 align-middle">
<button <button
type="button" type="button"
disabled={pageNumber <= 1} disabled={pageNumber <= 1}

View file

@ -23,7 +23,7 @@ export default function PromptAreaComponent({
}, [disabled]); }, [disabled]);
return ( return (
<div className={disabled ? "pointer-events-none w-full " : " w-full"}> <div className={disabled ? "pointer-events-none w-full" : "w-full"}>
<GenericModal <GenericModal
id={id} id={id}
field_name={field_name} field_name={field_name}
@ -43,8 +43,8 @@ export default function PromptAreaComponent({
className={ className={
editNode editNode
? "input-edit-node input-dialog" ? "input-edit-node input-dialog"
: (disabled ? " input-disable text-ring " : "") + : (disabled ? "input-disable text-ring " : "") +
" primary-input text-muted-foreground " " primary-input text-muted-foreground"
} }
> >
{value !== "" ? value : "Type your prompt here..."} {value !== "" ? value : "Type your prompt here..."}

View file

@ -18,7 +18,7 @@ export default function RenderIcons({
) : ( ) : (
filteredShortcut[0] filteredShortcut[0]
)} )}
<ForwardedIconComponent name="ArrowBigUp" className=" h-4 w-4" /> <ForwardedIconComponent name="ArrowBigUp" className="h-4 w-4" />
{filteredShortcut.map((key, idx) => { {filteredShortcut.map((key, idx) => {
if (idx > 0) { if (idx > 0) {
return <span className=""> {key.toUpperCase()} </span>; return <span className=""> {key.toUpperCase()} </span>;

View file

@ -27,7 +27,7 @@ const SideBarButtonsComponent = ({
pathname === item.href pathname === item.href
? "border border-border bg-muted hover:bg-muted" ? "border border-border bg-muted hover:bg-muted"
: "border border-transparent hover:border-border hover:bg-transparent", : "border border-transparent hover:border-border hover:bg-transparent",
"flex w-full shrink-0 justify-start gap-4" "flex w-full shrink-0 justify-start gap-4",
)} )}
> >
{item.icon} {item.icon}

View file

@ -31,7 +31,7 @@ const SideBarFoldersButtonsComponent = ({
const [foldersNames, setFoldersNames] = useState({}); const [foldersNames, setFoldersNames] = useState({});
const takeSnapshot = useFlowsManagerStore((state) => state.takeSnapshot); const takeSnapshot = useFlowsManagerStore((state) => state.takeSnapshot);
const [editFolders, setEditFolderName] = useState( const [editFolders, setEditFolderName] = useState(
folders.map((obj) => ({ name: obj.name, edit: false })) folders.map((obj) => ({ name: obj.name, edit: false })),
); );
const uploadFolder = useFolderStore((state) => state.uploadFolder); const uploadFolder = useFolderStore((state) => state.uploadFolder);
const currentFolder = pathname.split("/"); const currentFolder = pathname.split("/");
@ -58,7 +58,7 @@ const SideBarFoldersButtonsComponent = ({
const { dragOver, dragEnter, dragLeave, onDrop } = useFileDrop( const { dragOver, dragEnter, dragLeave, onDrop } = useFileDrop(
folderId, folderId,
handleFolderChange handleFolderChange,
); );
const handleUploadFlowsToFolder = () => { const handleUploadFlowsToFolder = () => {
@ -86,7 +86,7 @@ const SideBarFoldersButtonsComponent = ({
addFolder({ name: "New Folder", parent_id: null, description: "" }).then( addFolder({ name: "New Folder", parent_id: null, description: "" }).then(
(res) => { (res) => {
refreshFolders(); refreshFolders();
} },
); );
} }
@ -132,7 +132,7 @@ const SideBarFoldersButtonsComponent = ({
<> <>
{folders.map((item, index) => { {folders.map((item, index) => {
const editFolderName = editFolders?.filter( const editFolderName = editFolders?.filter(
(folder) => folder.name === item.name (folder) => folder.name === item.name,
)[0]; )[0];
return ( return (
<div <div
@ -148,7 +148,7 @@ const SideBarFoldersButtonsComponent = ({
? "border border-border bg-muted hover:bg-muted" ? "border border-border bg-muted hover:bg-muted"
: "border hover:bg-transparent lg:border-transparent lg:hover:border-border", : "border hover:bg-transparent lg:border-transparent lg:hover:border-border",
"group flex w-full shrink-0 cursor-pointer gap-2 opacity-100 lg:min-w-full", "group flex w-full shrink-0 cursor-pointer gap-2 opacity-100 lg:min-w-full",
folderIdDragging === item.id! ? "bg-border" : "" folderIdDragging === item.id! ? "bg-border" : "",
)} )}
onClick={() => handleChangeFolder!(item.id!)} onClick={() => handleChangeFolder!(item.id!)}
> >
@ -218,7 +218,7 @@ const SideBarFoldersButtonsComponent = ({
folders.map((obj) => ({ folders.map((obj) => ({
name: obj.name, name: obj.name,
edit: false, edit: false,
})) })),
); );
} }
if (e.key === "Enter") { if (e.key === "Enter") {
@ -251,10 +251,10 @@ const SideBarFoldersButtonsComponent = ({
}; };
const updatedFolder = await updateFolder( const updatedFolder = await updateFolder(
body, body,
item.id! item.id!,
); );
const updateFolders = folders.filter( const updateFolders = folders.filter(
(f) => f.name !== item.name (f) => f.name !== item.name,
); );
setFolders([...updateFolders, updatedFolder]); setFolders([...updateFolders, updatedFolder]);
setFoldersNames({}); setFoldersNames({});
@ -262,7 +262,7 @@ const SideBarFoldersButtonsComponent = ({
folders.map((obj) => ({ folders.map((obj) => ({
name: obj.name, name: obj.name,
edit: false, edit: false,
})) })),
); );
} else { } else {
setFoldersNames((old) => ({ setFoldersNames((old) => ({
@ -293,7 +293,7 @@ const SideBarFoldersButtonsComponent = ({
> >
<IconComponent <IconComponent
name={"trash"} name={"trash"}
className=" w-4 stroke-[1.5]" className="w-4 stroke-[1.5]"
/> />
</Button> </Button>
)} )}
@ -309,7 +309,7 @@ const SideBarFoldersButtonsComponent = ({
> >
<IconComponent <IconComponent
name={"Download"} name={"Download"}
className=" w-4 stroke-[1.5] text-white " className="w-4 stroke-[1.5] text-white"
/> />
</Button> </Button>
</div> </div>

View file

@ -12,7 +12,7 @@ import { addVersionToDuplicates } from "../../../utils/reactflowUtils";
const useFileDrop = (folderId, folderChangeCallback) => { const useFileDrop = (folderId, folderChangeCallback) => {
const setFolderDragging = useFolderStore((state) => state.setFolderDragging); const setFolderDragging = useFolderStore((state) => state.setFolderDragging);
const setFolderIdDragging = useFolderStore( const setFolderIdDragging = useFolderStore(
(state) => state.setFolderIdDragging (state) => state.setFolderIdDragging,
); );
const setErrorData = useAlertStore((state) => state.setErrorData); const setErrorData = useAlertStore((state) => state.setErrorData);
@ -45,7 +45,7 @@ const useFileDrop = (folderId, folderChangeCallback) => {
| React.DragEvent<HTMLDivElement> | React.DragEvent<HTMLDivElement>
| React.DragEvent<HTMLButtonElement> | React.DragEvent<HTMLButtonElement>
| React.DragEvent<HTMLAnchorElement>, | React.DragEvent<HTMLAnchorElement>,
folderId: string folderId: string,
) => { ) => {
e.preventDefault(); e.preventDefault();
@ -60,7 +60,7 @@ const useFileDrop = (folderId, folderChangeCallback) => {
| React.DragEvent<HTMLDivElement> | React.DragEvent<HTMLDivElement>
| React.DragEvent<HTMLButtonElement> | React.DragEvent<HTMLButtonElement>
| React.DragEvent<HTMLAnchorElement>, | React.DragEvent<HTMLAnchorElement>,
folderId: string folderId: string,
) => { ) => {
if (e.dataTransfer.types.some((types) => types === "Files")) { if (e.dataTransfer.types.some((types) => types === "Files")) {
setFolderDragging(true); setFolderDragging(true);
@ -73,7 +73,7 @@ const useFileDrop = (folderId, folderChangeCallback) => {
e: e:
| React.DragEvent<HTMLDivElement> | React.DragEvent<HTMLDivElement>
| React.DragEvent<HTMLButtonElement> | React.DragEvent<HTMLButtonElement>
| React.DragEvent<HTMLAnchorElement> | React.DragEvent<HTMLAnchorElement>,
) => { ) => {
e.preventDefault(); e.preventDefault();
if (e.target === e.currentTarget) { if (e.target === e.currentTarget) {
@ -87,7 +87,7 @@ const useFileDrop = (folderId, folderChangeCallback) => {
| React.DragEvent<HTMLDivElement> | React.DragEvent<HTMLDivElement>
| React.DragEvent<HTMLButtonElement> | React.DragEvent<HTMLButtonElement>
| React.DragEvent<HTMLAnchorElement>, | React.DragEvent<HTMLAnchorElement>,
folderId: string folderId: string,
) => { ) => {
if (e?.dataTransfer?.getData("flow")) { if (e?.dataTransfer?.getData("flow")) {
const data = JSON.parse(e?.dataTransfer?.getData("flow")); const data = JSON.parse(e?.dataTransfer?.getData("flow"));

View file

@ -33,7 +33,7 @@ export default function TableOptions({
name="RotateCcw" name="RotateCcw"
strokeWidth={2} strokeWidth={2}
className={cn( className={cn(
"h-5 w-5 text-primary transition-all hover:text-accent-foreground" "h-5 w-5 text-primary transition-all hover:text-accent-foreground",
)} )}
/> />
</Button> </Button>
@ -85,7 +85,7 @@ export default function TableOptions({
name="Trash2" name="Trash2"
className={cn( className={cn(
"h-5 w-5 text-primary transition-all", "h-5 w-5 text-primary transition-all",
!hasSelection ? "" : "hover:text-status-red " !hasSelection ? "" : "hover:text-status-red",
)} )}
/> />
</Button> </Button>

View file

@ -2,7 +2,7 @@ import Loading from "../../../ui/loading";
export default function LoadingOverlay() { export default function LoadingOverlay() {
return ( return (
<div className=" flex h-full w-full items-center justify-center bg-background align-middle"> <div className="flex h-full w-full items-center justify-center bg-background align-middle">
<Loading /> <Loading />
</div> </div>
); );

View file

@ -72,8 +72,8 @@ export default function TableNodeCellRender({
...id, ...id,
proxy: templateData.proxy, proxy: templateData.proxy,
} }
: id : id,
) ),
) ?? false; ) ?? false;
function getCellType() { function getCellType() {
switch (templateData.type) { switch (templateData.type) {
@ -144,7 +144,7 @@ export default function TableNodeCellRender({
<div <div
className={classNames( className={classNames(
"max-h-48 w-full overflow-auto custom-scroll", "max-h-48 w-full overflow-auto custom-scroll",
templateValue?.length > 1 ? "my-3" : "" templateValue?.length > 1 ? "my-3" : "",
)} )}
> >
<KeypairListComponent <KeypairListComponent

View file

@ -33,7 +33,7 @@ export function TagsSelector({
className={ className={
disabled disabled
? "cursor-not-allowed" ? "cursor-not-allowed"
: " overflow-hidden whitespace-nowrap" : "overflow-hidden whitespace-nowrap"
} }
onClick={() => { onClick={() => {
updateTags(tag.name); updateTags(tag.name);
@ -48,7 +48,7 @@ export function TagsSelector({
className={cn( className={cn(
selectedTags.some((category) => category === tag.name) selectedTags.some((category) => category === tag.name)
? "min-w-min bg-beta-foreground text-background hover:bg-beta-foreground" ? "min-w-min bg-beta-foreground text-background hover:bg-beta-foreground"
: "" : "",
)} )}
> >
{tag.name} {tag.name}

View file

@ -28,7 +28,7 @@ export default function TextAreaComponent({
data-testid={id} data-testid={id}
value={value} value={value}
disabled={disabled} disabled={disabled}
className={editNode ? "input-edit-node w-full" : " w-full"} className={editNode ? "input-edit-node w-full" : "w-full"}
placeholder={"Type something..."} placeholder={"Type something..."}
onChange={(event) => { onChange={(event) => {
onChange(event.target.value); onChange(event.target.value);

View file

@ -15,7 +15,7 @@ const alertVariants = cva(
defaultVariants: { defaultVariants: {
variant: "default", variant: "default",
}, },
} },
); );
const Alert = React.forwardRef< const Alert = React.forwardRef<

View file

@ -27,7 +27,7 @@ const badgeVariants = cva(
defaultVariants: { defaultVariants: {
variant: "default", variant: "default",
}, },
} },
); );
export interface BadgeProps export interface BadgeProps

View file

@ -35,7 +35,7 @@ const buttonVariants = cva(
variant: "default", variant: "default",
size: "default", size: "default",
}, },
} },
); );
export interface ButtonProps export interface ButtonProps
@ -65,7 +65,7 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
children, children,
...props ...props
}, },
ref ref,
) => { ) => {
const Comp = asChild ? Slot : "button"; const Comp = asChild ? Slot : "button";
let newChildren = children; let newChildren = children;
@ -97,7 +97,7 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
</Comp> </Comp>
</> </>
); );
} },
); );
Button.displayName = "Button"; Button.displayName = "Button";

View file

@ -9,7 +9,7 @@ const Card = React.forwardRef<
ref={ref} ref={ref}
className={cn( className={cn(
"flex flex-col justify-between rounded-lg border bg-muted text-card-foreground shadow-sm transition-all", "flex flex-col justify-between rounded-lg border bg-muted text-card-foreground shadow-sm transition-all",
className className,
)} )}
{...props} {...props}
/> />
@ -36,7 +36,7 @@ const CardTitle = React.forwardRef<
ref={ref} ref={ref}
className={cn( className={cn(
"text-base font-semibold leading-tight tracking-tight", "text-base font-semibold leading-tight tracking-tight",
className className,
)} )}
{...props} {...props}
/> />
@ -69,7 +69,7 @@ const CardFooter = React.forwardRef<
>(({ className, ...props }, ref) => ( >(({ className, ...props }, ref) => (
<div <div
ref={ref} ref={ref}
className={cn(" flex items-center p-4 pt-0", className)} className={cn("flex items-center p-4 pt-0", className)}
{...props} {...props}
/> />
)); ));

View file

@ -13,7 +13,7 @@ const Checkbox = React.forwardRef<
ref={ref} ref={ref}
className={cn( className={cn(
"peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground", "peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
className className,
)} )}
{...props} {...props}
> >
@ -37,7 +37,7 @@ const CheckBoxDiv = ({
className={cn( className={cn(
className, className,
"peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50", "peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
checked ? "bg-primary text-primary-foreground" : "" checked ? "bg-primary text-primary-foreground" : "",
)} )}
> >
{checked && ( {checked && (

View file

@ -65,7 +65,7 @@ export function Combobox({
"mr-2 h-4 w-4", "mr-2 h-4 w-4",
value.includes(framework.value) value.includes(framework.value)
? "opacity-100" ? "opacity-100"
: "opacity-0" : "opacity-0",
)} )}
/> />
{framework.label} {framework.label}

View file

@ -16,7 +16,7 @@ const Command = React.forwardRef<
ref={ref} ref={ref}
className={cn( className={cn(
"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground", "flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
className className,
)} )}
{...props} {...props}
/> />
@ -47,7 +47,7 @@ const CommandInput = React.forwardRef<
ref={ref} ref={ref}
className={cn( className={cn(
"flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50", "flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
className className,
)} )}
{...props} {...props}
/> />
@ -90,7 +90,7 @@ const CommandGroup = React.forwardRef<
ref={ref} ref={ref}
className={cn( className={cn(
"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground", "overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
className className,
)} )}
{...props} {...props}
/> />
@ -118,7 +118,7 @@ const CommandItem = React.forwardRef<
ref={ref} ref={ref}
className={cn( className={cn(
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50", "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50",
className className,
)} )}
{...props} {...props}
/> />
@ -134,7 +134,7 @@ const CommandShortcut = ({
<span <span
className={cn( className={cn(
"ml-auto text-xs tracking-widest text-muted-foreground", "ml-auto text-xs tracking-widest text-muted-foreground",
className className,
)} )}
{...props} {...props}
/> />

View file

@ -23,8 +23,8 @@ const AccordionTrigger = React.forwardRef<
<AccordionPrimitive.Trigger asChild ref={ref} {...props}> <AccordionPrimitive.Trigger asChild ref={ref} {...props}>
<div <div
className={cn( className={cn(
" flex flex-1 cursor-pointer items-center justify-between border-[1px] py-2 text-sm font-medium data-[state=closed]:rounded-md data-[state=open]:rounded-t-md data-[state=open]:border-b-0 data-[state=open]:bg-muted [&[data-state=open]>svg]:rotate-180", "flex flex-1 cursor-pointer items-center justify-between border-[1px] py-2 text-sm font-medium data-[state=closed]:rounded-md data-[state=open]:rounded-t-md data-[state=open]:border-b-0 data-[state=open]:bg-muted [&[data-state=open]>svg]:rotate-180",
className className,
)} )}
> >
{children} {children}
@ -43,7 +43,7 @@ const AccordionContent = React.forwardRef<
ref={ref} ref={ref}
className={cn( className={cn(
"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden border-[1px] text-sm data-[state=open]:rounded-b-md data-[state=open]:border-t-0 data-[state=open]:bg-muted", "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden border-[1px] text-sm data-[state=open]:rounded-b-md data-[state=open]:border-t-0 data-[state=open]:bg-muted",
className className,
)} )}
{...props} {...props}
> >

View file

@ -26,7 +26,7 @@ const DialogOverlay = React.forwardRef<
ref={ref} ref={ref}
className={cn( className={cn(
"nopan nodelete nodrag noundo nocopy fixed inset-0 bottom-0 left-0 right-0 top-0 z-50 overflow-auto bg-blur-shared backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", "nopan nodelete nodrag noundo nocopy fixed inset-0 bottom-0 left-0 right-0 top-0 z-50 overflow-auto bg-blur-shared backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
className className,
)} )}
{...props} {...props}
/> />
@ -43,7 +43,7 @@ const DialogContent = React.forwardRef<
ref={ref} ref={ref}
className={cn( className={cn(
"fixed z-50 flex w-full max-w-lg flex-col gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] sm:rounded-lg md:w-full", "fixed z-50 flex w-full max-w-lg flex-col gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] sm:rounded-lg md:w-full",
className className,
)} )}
{...props} {...props}
> >
@ -60,7 +60,7 @@ const DialogHeader = ({
<div <div
className={cn( className={cn(
"flex flex-col space-y-1.5 text-center sm:text-left", "flex flex-col space-y-1.5 text-center sm:text-left",
className className,
)} )}
{...props} {...props}
/> />
@ -74,7 +74,7 @@ const DialogFooter = ({
<div <div
className={cn( className={cn(
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
className className,
)} )}
{...props} {...props}
/> />
@ -89,7 +89,7 @@ const DialogTitle = React.forwardRef<
ref={ref} ref={ref}
className={cn( className={cn(
"text-lg font-semibold leading-none tracking-tight", "text-lg font-semibold leading-none tracking-tight",
className className,
)} )}
{...props} {...props}
/> />

View file

@ -28,7 +28,7 @@ const DropdownMenuSubTrigger = React.forwardRef<
className={cn( className={cn(
"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent", "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",
inset && "pl-8", inset && "pl-8",
className className,
)} )}
{...props} {...props}
> >
@ -47,7 +47,7 @@ const DropdownMenuSubContent = React.forwardRef<
ref={ref} ref={ref}
className={cn( className={cn(
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1", "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1",
className className,
)} )}
{...props} {...props}
/> />
@ -65,7 +65,7 @@ const DropdownMenuContent = React.forwardRef<
sideOffset={sideOffset} sideOffset={sideOffset}
className={cn( className={cn(
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
className className,
)} )}
{...props} {...props}
/> />
@ -84,7 +84,7 @@ const DropdownMenuItem = React.forwardRef<
className={cn( className={cn(
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
inset && "pl-8", inset && "pl-8",
className className,
)} )}
{...props} {...props}
/> />
@ -99,7 +99,7 @@ const DropdownMenuCheckboxItem = React.forwardRef<
ref={ref} ref={ref}
className={cn( className={cn(
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
className className,
)} )}
checked={checked} checked={checked}
{...props} {...props}
@ -123,7 +123,7 @@ const DropdownMenuRadioItem = React.forwardRef<
ref={ref} ref={ref}
className={cn( className={cn(
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
className className,
)} )}
{...props} {...props}
> >
@ -148,7 +148,7 @@ const DropdownMenuLabel = React.forwardRef<
className={cn( className={cn(
"px-2 py-1.5 pl-2 text-sm font-semibold", "px-2 py-1.5 pl-2 text-sm font-semibold",
inset && "pl-8", inset && "pl-8",
className className,
)} )}
{...props} {...props}
/> />

View file

@ -16,18 +16,18 @@ const Form = FormProvider;
type FormFieldContextValue< type FormFieldContextValue<
TFieldValues extends FieldValues = FieldValues, TFieldValues extends FieldValues = FieldValues,
TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues> TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,
> = { > = {
name: TName; name: TName;
}; };
const FormFieldContext = React.createContext<FormFieldContextValue>( const FormFieldContext = React.createContext<FormFieldContextValue>(
{} as FormFieldContextValue {} as FormFieldContextValue,
); );
const FormField = < const FormField = <
TFieldValues extends FieldValues = FieldValues, TFieldValues extends FieldValues = FieldValues,
TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues> TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,
>({ >({
...props ...props
}: ControllerProps<TFieldValues, TName>) => { }: ControllerProps<TFieldValues, TName>) => {
@ -66,7 +66,7 @@ type FormItemContextValue = {
}; };
const FormItemContext = React.createContext<FormItemContextValue>( const FormItemContext = React.createContext<FormItemContextValue>(
{} as FormItemContextValue {} as FormItemContextValue,
); );
const FormItem = React.forwardRef< const FormItem = React.forwardRef<

View file

@ -12,13 +12,13 @@ const Input = React.forwardRef<HTMLInputElement, InputProps>(
type={type} type={type}
className={cn( className={cn(
"nopan nodelete nodrag noundo nocopy primary-input", "nopan nodelete nodrag noundo nocopy primary-input",
className className,
)} )}
ref={ref} ref={ref}
{...props} {...props}
/> />
); );
} },
); );
Input.displayName = "Input"; Input.displayName = "Input";

View file

@ -6,7 +6,7 @@ import * as React from "react";
import { cn } from "../../utils/utils"; import { cn } from "../../utils/utils";
const labelVariants = cva( const labelVariants = cva(
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
); );
const Label = React.forwardRef< const Label = React.forwardRef<

View file

@ -24,7 +24,7 @@ const Menubar = React.forwardRef<
ref={ref} ref={ref}
className={cn( className={cn(
"flex h-10 items-center space-x-1 rounded-md border bg-background p-1", "flex h-10 items-center space-x-1 rounded-md border bg-background p-1",
className className,
)} )}
{...props} {...props}
/> />
@ -39,7 +39,7 @@ const MenubarTrigger = React.forwardRef<
ref={ref} ref={ref}
className={cn( className={cn(
"flex cursor-default select-none items-center rounded-sm px-3 py-1.5 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground", "flex cursor-default select-none items-center rounded-sm px-3 py-1.5 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
className className,
)} )}
{...props} {...props}
/> />
@ -57,7 +57,7 @@ const MenubarSubTrigger = React.forwardRef<
className={cn( className={cn(
"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground", "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
inset && "pl-8", inset && "pl-8",
className className,
)} )}
{...props} {...props}
> >
@ -75,7 +75,7 @@ const MenubarSubContent = React.forwardRef<
ref={ref} ref={ref}
className={cn( className={cn(
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1", "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1",
className className,
)} )}
{...props} {...props}
/> />
@ -88,7 +88,7 @@ const MenubarContent = React.forwardRef<
>( >(
( (
{ className, align = "start", alignOffset = -4, sideOffset = 8, ...props }, { className, align = "start", alignOffset = -4, sideOffset = 8, ...props },
ref ref,
) => ( ) => (
<MenubarPrimitive.Portal> <MenubarPrimitive.Portal>
<MenubarPrimitive.Content <MenubarPrimitive.Content
@ -98,12 +98,12 @@ const MenubarContent = React.forwardRef<
sideOffset={sideOffset} sideOffset={sideOffset}
className={cn( className={cn(
"z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in slide-in-from-top-1", "z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in slide-in-from-top-1",
className className,
)} )}
{...props} {...props}
/> />
</MenubarPrimitive.Portal> </MenubarPrimitive.Portal>
) ),
); );
MenubarContent.displayName = MenubarPrimitive.Content.displayName; MenubarContent.displayName = MenubarPrimitive.Content.displayName;
@ -118,7 +118,7 @@ const MenubarItem = React.forwardRef<
className={cn( className={cn(
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
inset && "pl-8", inset && "pl-8",
className className,
)} )}
{...props} {...props}
/> />
@ -133,7 +133,7 @@ const MenubarCheckboxItem = React.forwardRef<
ref={ref} ref={ref}
className={cn( className={cn(
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
className className,
)} )}
checked={checked} checked={checked}
{...props} {...props}
@ -156,7 +156,7 @@ const MenubarRadioItem = React.forwardRef<
ref={ref} ref={ref}
className={cn( className={cn(
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
className className,
)} )}
{...props} {...props}
> >
@ -181,7 +181,7 @@ const MenubarLabel = React.forwardRef<
className={cn( className={cn(
"px-2 py-1.5 text-sm font-semibold", "px-2 py-1.5 text-sm font-semibold",
inset && "pl-8", inset && "pl-8",
className className,
)} )}
{...props} {...props}
/> />
@ -208,7 +208,7 @@ const MenubarShortcut = ({
<span <span
className={cn( className={cn(
"ml-auto text-xs tracking-widest text-muted-foreground", "ml-auto text-xs tracking-widest text-muted-foreground",
className className,
)} )}
{...props} {...props}
/> />

View file

@ -19,7 +19,7 @@ const PopoverContent = React.forwardRef<
sideOffset={sideOffset} sideOffset={sideOffset}
className={cn( className={cn(
"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", "z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
className className,
)} )}
{...props} {...props}
/> />
@ -37,7 +37,7 @@ const PopoverContentWithoutPortal = React.forwardRef<
sideOffset={sideOffset} sideOffset={sideOffset}
className={cn( className={cn(
"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", "z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
className className,
)} )}
{...props} {...props}
/> />

View file

@ -12,7 +12,7 @@ const Progress = React.forwardRef<
ref={ref} ref={ref}
className={cn( className={cn(
"relative h-4 w-full overflow-hidden rounded-full bg-secondary", "relative h-4 w-full overflow-hidden rounded-full bg-secondary",
className className,
)} )}
{...props} {...props}
> >

View file

@ -61,7 +61,7 @@ export default function RenameLabel(props) {
onInput={resizeInput} onInput={resizeInput}
className={cn( className={cn(
"nopan nodelete nodrag noundo nocopy rounded-md bg-transparent px-2 outline-ring hover:outline focus:border-none focus:outline active:outline", "nopan nodelete nodrag noundo nocopy rounded-md bg-transparent px-2 outline-ring hover:outline focus:border-none focus:outline active:outline",
props.className props.className,
)} )}
onBlur={() => { onBlur={() => {
setIsRename(false); setIsRename(false);

View file

@ -36,7 +36,7 @@ const SelectContent = React.forwardRef<
"relative z-50 min-w-[14rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", "relative z-50 min-w-[14rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
position === "popper" && position === "popper" &&
"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
className className,
)} )}
position={position} position={position}
{...props} {...props}
@ -45,7 +45,7 @@ const SelectContent = React.forwardRef<
className={cn( className={cn(
"p-1", "p-1",
position === "popper" && position === "popper" &&
"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]" "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]",
)} )}
> >
{children} {children}
@ -75,7 +75,7 @@ const SelectItem = React.forwardRef<
ref={ref} ref={ref}
className={cn( className={cn(
"relative flex w-full cursor-pointer select-none items-center rounded-sm py-1.5 pl-3 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", "relative flex w-full cursor-pointer select-none items-center rounded-sm py-1.5 pl-3 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
className className,
)} )}
{...props} {...props}
> >

View file

@ -19,7 +19,7 @@ const SelectTrigger = React.forwardRef<
ref={ref} ref={ref}
className={cn( className={cn(
"flex h-8 items-center justify-between rounded-md border border-ring/60 px-4 py-2 text-sm text-primary ring-offset-background placeholder:text-muted-foreground hover:bg-muted focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50", "flex h-8 items-center justify-between rounded-md border border-ring/60 px-4 py-2 text-sm text-primary ring-offset-background placeholder:text-muted-foreground hover:bg-muted focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
className className,
)} )}
{...props} {...props}
> >
@ -42,7 +42,7 @@ const SelectContent = React.forwardRef<
"relative z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", "relative z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
position === "popper" && position === "popper" &&
"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
className className,
)} )}
position={position} position={position}
{...props} {...props}
@ -51,7 +51,7 @@ const SelectContent = React.forwardRef<
className={cn( className={cn(
"p-1", "p-1",
position === "popper" && position === "popper" &&
"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]" "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]",
)} )}
> >
{children} {children}
@ -81,7 +81,7 @@ const SelectItem = React.forwardRef<
ref={ref} ref={ref}
className={cn( className={cn(
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", "relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
className className,
)} )}
{...props} {...props}
> >

View file

@ -10,7 +10,7 @@ const Separator = React.forwardRef<
>( >(
( (
{ className, orientation = "horizontal", decorative = true, ...props }, { className, orientation = "horizontal", decorative = true, ...props },
ref ref,
) => ( ) => (
<SeparatorPrimitive.Root <SeparatorPrimitive.Root
ref={ref} ref={ref}
@ -19,11 +19,11 @@ const Separator = React.forwardRef<
className={cn( className={cn(
"shrink-0 bg-ring/40", "shrink-0 bg-ring/40",
orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]", orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
className className,
)} )}
{...props} {...props}
/> />
) ),
); );
Separator.displayName = SeparatorPrimitive.Root.displayName; Separator.displayName = SeparatorPrimitive.Root.displayName;

View file

@ -11,7 +11,7 @@ const Switch = React.forwardRef<
<SwitchPrimitives.Root <SwitchPrimitives.Root
className={cn( className={cn(
"peer inline-flex h-[24px] w-[44px] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-ring", "peer inline-flex h-[24px] w-[44px] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-ring",
className className,
)} )}
{...props} {...props}
ref={ref} ref={ref}
@ -19,7 +19,7 @@ const Switch = React.forwardRef<
<SwitchPrimitives.Thumb <SwitchPrimitives.Thumb
aria-disabled={props.disabled} aria-disabled={props.disabled}
className={cn( className={cn(
"pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform aria-disabled:bg-muted/70 data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0" "pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform aria-disabled:bg-muted/70 data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0",
)} )}
/> />
</SwitchPrimitives.Root> </SwitchPrimitives.Root>

View file

@ -55,7 +55,7 @@ const TableRow = React.forwardRef<
ref={ref} ref={ref}
className={cn( className={cn(
"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted", "border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",
className className,
)} )}
{...props} {...props}
/> />
@ -70,7 +70,7 @@ const TableHead = React.forwardRef<
ref={ref} ref={ref}
className={cn( className={cn(
"h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0", "h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",
className className,
)} )}
{...props} {...props}
/> />

View file

@ -14,7 +14,7 @@ const TabsList = React.forwardRef<
ref={ref} ref={ref}
className={cn( className={cn(
"inline-flex h-10 items-center justify-center rounded-md p-1 text-muted-foreground", "inline-flex h-10 items-center justify-center rounded-md p-1 text-muted-foreground",
className className,
)} )}
{...props} {...props}
/> />
@ -29,7 +29,7 @@ const TabsTrigger = React.forwardRef<
ref={ref} ref={ref}
className={cn( className={cn(
"inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:border data-[state=inactive]:border data-[state=inactive]:border-muted data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm data-[state=inactive]:hover:bg-secondary/80", "inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:border data-[state=inactive]:border data-[state=inactive]:border-muted data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm data-[state=inactive]:hover:bg-secondary/80",
className className,
)} )}
{...props} {...props}
/> />
@ -44,7 +44,7 @@ const TabsContent = React.forwardRef<
ref={ref} ref={ref}
className={cn( className={cn(
"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2", "mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
className className,
)} )}
{...props} {...props}
/> />

View file

@ -10,13 +10,13 @@ const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(
<textarea <textarea
className={cn( className={cn(
"nopan nodelete nodrag noundo nocopy textarea-primary", "nopan nodelete nodrag noundo nocopy textarea-primary",
className className,
)} )}
ref={ref} ref={ref}
{...props} {...props}
/> />
); );
} },
); );
Textarea.displayName = "Textarea"; Textarea.displayName = "Textarea";

View file

@ -25,7 +25,7 @@ const toggleVariants = cva(
variant: "default", variant: "default",
size: "default", size: "default",
}, },
} },
); );
const Toggle = React.forwardRef< const Toggle = React.forwardRef<

View file

@ -20,7 +20,7 @@ const TooltipContent = React.forwardRef<
sideOffset={sideOffset} sideOffset={sideOffset}
className={cn( className={cn(
"z-45 overflow-y-auto rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-50 data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1", "z-45 overflow-y-auto rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-50 data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1",
className className,
)} )}
{...props} {...props}
/> />
@ -37,7 +37,7 @@ const TooltipContentWithoutPortal = React.forwardRef<
sideOffset={sideOffset} sideOffset={sideOffset}
className={cn( className={cn(
"z-45 overflow-y-auto rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-50 data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1", "z-45 overflow-y-auto rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-50 data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1",
className className,
)} )}
{...props} {...props}
/> />

View file

@ -31,17 +31,17 @@ export function AuthProvider({ children }): React.ReactElement {
const navigate = useNavigate(); const navigate = useNavigate();
const cookies = new Cookies(); const cookies = new Cookies();
const [accessToken, setAccessToken] = useState<string | null>( const [accessToken, setAccessToken] = useState<string | null>(
cookies.get("access_token_lf") ?? null cookies.get("access_token_lf") ?? null,
); );
const [isAuthenticated, setIsAuthenticated] = useState<boolean>( const [isAuthenticated, setIsAuthenticated] = useState<boolean>(
!!cookies.get("access_token_lf") !!cookies.get("access_token_lf"),
); );
const [isAdmin, setIsAdmin] = useState<boolean>(false); const [isAdmin, setIsAdmin] = useState<boolean>(false);
const [userData, setUserData] = useState<Users | null>(null); const [userData, setUserData] = useState<Users | null>(null);
const [autoLogin, setAutoLogin] = useState<boolean>(false); const [autoLogin, setAutoLogin] = useState<boolean>(false);
const setLoading = useAlertStore((state) => state.setLoading); const setLoading = useAlertStore((state) => state.setLoading);
const [apiKey, setApiKey] = useState<string | null>( const [apiKey, setApiKey] = useState<string | null>(
cookies.get("apikey_tkn_lflw") cookies.get("apikey_tkn_lflw"),
); );
const getFoldersApi = useFolderStore((state) => state.getFoldersApi); const getFoldersApi = useFolderStore((state) => state.getFoldersApi);

View file

@ -48,7 +48,7 @@ function ApiInterceptor() {
} }
await clearBuildVerticesState(error); await clearBuildVerticesState(error);
return Promise.reject(error); return Promise.reject(error);
} },
); );
const isAuthorizedURL = (url) => { const isAuthorizedURL = (url) => {
@ -65,10 +65,10 @@ function ApiInterceptor() {
const parsedURL = new URL(url); const parsedURL = new URL(url);
const isDomainAllowed = authorizedDomains.some( const isDomainAllowed = authorizedDomains.some(
(domain) => parsedURL.origin === new URL(domain).origin (domain) => parsedURL.origin === new URL(domain).origin,
); );
const isEndpointAllowed = authorizedEndpoints.some((endpoint) => const isEndpointAllowed = authorizedEndpoints.some((endpoint) =>
parsedURL.pathname.includes(endpoint) parsedURL.pathname.includes(endpoint),
); );
return isDomainAllowed || isEndpointAllowed; return isDomainAllowed || isEndpointAllowed;
@ -102,7 +102,7 @@ function ApiInterceptor() {
}, },
(error) => { (error) => {
return Promise.reject(error); return Promise.reject(error);
} },
); );
return () => { return () => {
@ -134,7 +134,7 @@ function ApiInterceptor() {
if (error?.config?.headers) { if (error?.config?.headers) {
delete error.config.headers["Authorization"]; delete error.config.headers["Authorization"];
error.config.headers["Authorization"] = `Bearer ${cookies.get( error.config.headers["Authorization"] = `Bearer ${cookies.get(
"access_token_lf" "access_token_lf",
)}`; )}`;
const response = await axios.request(error.config); const response = await axios.request(error.config);
return response; return response;

View file

@ -9,7 +9,7 @@ export function checkDuplicateRequestAndStoreRequest(config) {
const currentUrl = window.location.pathname; const currentUrl = window.location.pathname;
const currentTime = Date.now(); const currentTime = Date.now();
const isContained = AUTHORIZED_DUPLICATE_REQUESTS.some((request) => const isContained = AUTHORIZED_DUPLICATE_REQUESTS.some((request) =>
config?.url!.includes(request) config?.url!.includes(request),
); );
if ( if (

View file

@ -63,7 +63,7 @@ export async function sendAll(data: sendAllProps) {
} }
export async function postValidateCode( export async function postValidateCode(
code: string code: string,
): Promise<AxiosResponse<errorsTypeAPI>> { ): Promise<AxiosResponse<errorsTypeAPI>> {
return await api.post(`${BASE_URL_API}validate/code`, { code }); return await api.post(`${BASE_URL_API}validate/code`, { code });
} }
@ -78,7 +78,7 @@ export async function postValidateCode(
export async function postValidatePrompt( export async function postValidatePrompt(
name: string, name: string,
template: string, template: string,
frontend_node: APIClassType frontend_node: APIClassType,
): Promise<AxiosResponse<PromptTypeAPI>> { ): Promise<AxiosResponse<PromptTypeAPI>> {
return api.post(`${BASE_URL_API}validate/prompt`, { return api.post(`${BASE_URL_API}validate/prompt`, {
name, name,
@ -151,7 +151,7 @@ export async function saveFlowToDatabase(newFlow: {
* @throws Will throw an error if the update fails. * @throws Will throw an error if the update fails.
*/ */
export async function updateFlowInDatabase( export async function updateFlowInDatabase(
updatedFlow: FlowType updatedFlow: FlowType,
): Promise<FlowType> { ): Promise<FlowType> {
try { try {
const response = await api.patch(`${BASE_URL_API}flows/${updatedFlow.id}`, { const response = await api.patch(`${BASE_URL_API}flows/${updatedFlow.id}`, {
@ -329,7 +329,7 @@ export async function getHealth() {
* *
*/ */
export async function getBuildStatus( export async function getBuildStatus(
flowId: string flowId: string,
): Promise<AxiosResponse<BuildStatusTypeAPI>> { ): Promise<AxiosResponse<BuildStatusTypeAPI>> {
return await api.get(`${BASE_URL_API}build/${flowId}/status`); return await api.get(`${BASE_URL_API}build/${flowId}/status`);
} }
@ -342,7 +342,7 @@ export async function getBuildStatus(
* *
*/ */
export async function postBuildInit( export async function postBuildInit(
flow: FlowType flow: FlowType,
): Promise<AxiosResponse<InitTypeAPI>> { ): Promise<AxiosResponse<InitTypeAPI>> {
return await api.post(`${BASE_URL_API}build/init/${flow.id}`, flow); return await api.post(`${BASE_URL_API}build/init/${flow.id}`, flow);
} }
@ -358,7 +358,7 @@ export async function postBuildInit(
*/ */
export async function uploadFile( export async function uploadFile(
file: File, file: File,
id: string id: string,
): Promise<AxiosResponse<UploadFileTypeAPI>> { ): Promise<AxiosResponse<UploadFileTypeAPI>> {
const formData = new FormData(); const formData = new FormData();
formData.append("file", file); formData.append("file", file);
@ -380,7 +380,7 @@ export async function getProfilePictures(): Promise<ProfilePicturesTypeAPI | nul
export async function postCustomComponent( export async function postCustomComponent(
code: string, code: string,
apiClass: APIClassType apiClass: APIClassType,
): Promise<AxiosResponse<APIClassType>> { ): Promise<AxiosResponse<APIClassType>> {
// let template = apiClass.template; // let template = apiClass.template;
return await api.post(`${BASE_URL_API}custom_component`, { return await api.post(`${BASE_URL_API}custom_component`, {
@ -393,7 +393,7 @@ export async function postCustomComponentUpdate(
code: string, code: string,
template: APITemplateType, template: APITemplateType,
field: string, field: string,
field_value: any field_value: any,
): Promise<AxiosResponse<APIClassType>> { ): Promise<AxiosResponse<APIClassType>> {
return await api.post(`${BASE_URL_API}custom_component/update`, { return await api.post(`${BASE_URL_API}custom_component/update`, {
code, code,
@ -415,7 +415,7 @@ export async function onLogin(user: LoginType) {
headers: { headers: {
"Content-Type": "application/x-www-form-urlencoded", "Content-Type": "application/x-www-form-urlencoded",
}, },
} },
); );
if (response.status === 200) { if (response.status === 200) {
@ -477,11 +477,11 @@ export async function addUser(user: UserInputType): Promise<Array<Users>> {
export async function getUsersPage( export async function getUsersPage(
skip: number, skip: number,
limit: number limit: number,
): Promise<Array<Users>> { ): Promise<Array<Users>> {
try { try {
const res = await api.get( const res = await api.get(
`${BASE_URL_API}users/?skip=${skip}&limit=${limit}` `${BASE_URL_API}users/?skip=${skip}&limit=${limit}`,
); );
if (res.status === 200) { if (res.status === 200) {
return res.data; return res.data;
@ -518,7 +518,7 @@ export async function resetPassword(user_id: string, user: resetPasswordType) {
try { try {
const res = await api.patch( const res = await api.patch(
`${BASE_URL_API}users/${user_id}/reset-password`, `${BASE_URL_API}users/${user_id}/reset-password`,
user user,
); );
if (res.status === 200) { if (res.status === 200) {
return res.data; return res.data;
@ -592,7 +592,7 @@ export async function saveFlowStore(
last_tested_version?: string; last_tested_version?: string;
}, },
tags: string[], tags: string[],
publicFlow = false publicFlow = false,
): Promise<FlowType> { ): Promise<FlowType> {
try { try {
const response = await api.post(`${BASE_URL_API}store/components/`, { const response = await api.post(`${BASE_URL_API}store/components/`, {
@ -721,7 +721,7 @@ export async function postStoreComponents(component: Component) {
export async function getComponent(component_id: string) { export async function getComponent(component_id: string) {
try { try {
const res = await api.get( const res = await api.get(
`${BASE_URL_API}store/components/${component_id}` `${BASE_URL_API}store/components/${component_id}`,
); );
if (res.status === 200) { if (res.status === 200) {
return res.data; return res.data;
@ -736,7 +736,7 @@ export async function searchComponent(
page?: number | null, page?: number | null,
limit?: number | null, limit?: number | null,
status?: string | null, status?: string | null,
tags?: string[] tags?: string[],
): Promise<StoreComponentResponse | undefined> { ): Promise<StoreComponentResponse | undefined> {
try { try {
let url = `${BASE_URL_API}store/components/`; let url = `${BASE_URL_API}store/components/`;
@ -848,7 +848,7 @@ export async function updateFlowStore(
}, },
tags: string[], tags: string[],
publicFlow = false, publicFlow = false,
id: string id: string,
): Promise<FlowType> { ): Promise<FlowType> {
try { try {
const response = await api.patch(`${BASE_URL_API}store/components/${id}`, { const response = await api.patch(`${BASE_URL_API}store/components/${id}`, {
@ -932,7 +932,7 @@ export async function deleteGlobalVariable(id: string) {
export async function updateGlobalVariable( export async function updateGlobalVariable(
name: string, name: string,
value: string, value: string,
id: string id: string,
) { ) {
try { try {
const response = api.patch(`${BASE_URL_API}variables/${id}`, { const response = api.patch(`${BASE_URL_API}variables/${id}`, {
@ -951,7 +951,7 @@ export async function getVerticesOrder(
startNodeId?: string | null, startNodeId?: string | null,
stopNodeId?: string | null, stopNodeId?: string | null,
nodes?: Node[], nodes?: Node[],
Edges?: Edge[] Edges?: Edge[],
): Promise<AxiosResponse<VerticesOrderTypeAPI>> { ): Promise<AxiosResponse<VerticesOrderTypeAPI>> {
// nodeId is optional and is a query parameter // nodeId is optional and is a query parameter
// if nodeId is not provided, the API will return all vertices // if nodeId is not provided, the API will return all vertices
@ -971,7 +971,7 @@ export async function getVerticesOrder(
return await api.post( return await api.post(
`${BASE_URL_API}build/${flowId}/vertices`, `${BASE_URL_API}build/${flowId}/vertices`,
data, data,
config config,
); );
} }
@ -979,7 +979,7 @@ export async function postBuildVertex(
flowId: string, flowId: string,
vertexId: string, vertexId: string,
input_value: string, input_value: string,
files?: string[] files?: string[],
): Promise<AxiosResponse<VertexBuildTypeAPI>> { ): Promise<AxiosResponse<VertexBuildTypeAPI>> {
// input_value is optional and is a query parameter // input_value is optional and is a query parameter
let data = {}; let data = {};
@ -991,7 +991,7 @@ export async function postBuildVertex(
} }
return await api.post( return await api.post(
`${BASE_URL_API}build/${flowId}/vertices/${vertexId}`, `${BASE_URL_API}build/${flowId}/vertices/${vertexId}`,
data data,
); );
} }
@ -1015,7 +1015,7 @@ export async function getFlowPool({
} }
export async function deleteFlowPool( export async function deleteFlowPool(
flowId: string flowId: string,
): Promise<AxiosResponse<any>> { ): Promise<AxiosResponse<any>> {
const config = {}; const config = {};
config["params"] = { flow_id: flowId }; config["params"] = { flow_id: flowId };
@ -1029,7 +1029,7 @@ export async function deleteFlowPool(
* @returns A promise that resolves to an array of AxiosResponse objects representing the delete responses. * @returns A promise that resolves to an array of AxiosResponse objects representing the delete responses.
*/ */
export async function multipleDeleteFlowsComponents( export async function multipleDeleteFlowsComponents(
flowIds: string[] flowIds: string[],
): Promise<AxiosResponse<any>[]> { ): Promise<AxiosResponse<any>[]> {
const batches: string[][] = []; const batches: string[][] = [];
@ -1052,7 +1052,7 @@ export async function multipleDeleteFlowsComponents(
// Execute all delete requests // Execute all delete requests
const responses: Promise<AxiosResponse<any>>[] = batches.map((batch) => const responses: Promise<AxiosResponse<any>>[] = batches.map((batch) =>
deleteBatch(batch) deleteBatch(batch),
); );
// Return the responses after all requests are completed // Return the responses after all requests are completed
@ -1062,7 +1062,7 @@ export async function multipleDeleteFlowsComponents(
export async function getTransactionTable( export async function getTransactionTable(
id: string, id: string,
mode: "intersection" | "union", mode: "intersection" | "union",
params = {} params = {},
): Promise<{ rows: Array<object>; columns: Array<ColDef | ColGroupDef> }> { ): Promise<{ rows: Array<object>; columns: Array<ColDef | ColGroupDef> }> {
const config = {}; const config = {};
config["params"] = { flow_id: id }; config["params"] = { flow_id: id };
@ -1078,7 +1078,7 @@ export async function getMessagesTable(
mode: "intersection" | "union", mode: "intersection" | "union",
id?: string, id?: string,
excludedFields?: string[], excludedFields?: string[],
params = {} params = {},
): Promise<{ rows: Array<Message>; columns: Array<ColDef | ColGroupDef> }> { ): Promise<{ rows: Array<Message>; columns: Array<ColDef | ColGroupDef> }> {
const config = {}; const config = {};
if (id) { if (id) {

View file

@ -4,5 +4,5 @@ import SvgAWS from "./AWS";
export const AWSIcon = forwardRef<SVGSVGElement, React.PropsWithChildren<{}>>( export const AWSIcon = forwardRef<SVGSVGElement, React.PropsWithChildren<{}>>(
(props, ref) => { (props, ref) => {
return <SvgAWS ref={ref} {...props} />; return <SvgAWS ref={ref} {...props} />;
} },
); );

View file

@ -4,5 +4,5 @@ import SvgAzLogo from "./AzLogo";
export const AzIcon = forwardRef<SVGSVGElement, React.PropsWithChildren<{}>>( export const AzIcon = forwardRef<SVGSVGElement, React.PropsWithChildren<{}>>(
(props, ref) => { (props, ref) => {
return <SvgAzLogo ref={ref} {...props} />; return <SvgAzLogo ref={ref} {...props} />;
} },
); );

View file

@ -4,5 +4,5 @@ import SvgAzure from "./Azure";
export const AzureIcon = forwardRef<SVGSVGElement, React.PropsWithChildren<{}>>( export const AzureIcon = forwardRef<SVGSVGElement, React.PropsWithChildren<{}>>(
(props, ref) => { (props, ref) => {
return <SvgAzure ref={ref} {...props} />; return <SvgAzure ref={ref} {...props} />;
} },
); );

View file

@ -4,5 +4,5 @@ import SvgBing from "./Bing";
export const BingIcon = forwardRef<SVGSVGElement, React.PropsWithChildren<{}>>( export const BingIcon = forwardRef<SVGSVGElement, React.PropsWithChildren<{}>>(
(props, ref) => { (props, ref) => {
return <SvgBing ref={ref} {...props} />; return <SvgBing ref={ref} {...props} />;
} },
); );

View file

@ -4,5 +4,5 @@ import SvgFacebookMessengerLogo2020 from "./FacebookMessengerLogo2020";
export const FBIcon = forwardRef<SVGSVGElement, React.PropsWithChildren<{}>>( export const FBIcon = forwardRef<SVGSVGElement, React.PropsWithChildren<{}>>(
(props, ref) => { (props, ref) => {
return <SvgFacebookMessengerLogo2020 ref={ref} {...props} />; return <SvgFacebookMessengerLogo2020 ref={ref} {...props} />;
} },
); );

View file

@ -4,5 +4,5 @@ import SvgGroqLogo from "./GroqLogo";
export const GroqIcon = forwardRef<SVGSVGElement, React.PropsWithChildren<{}>>( export const GroqIcon = forwardRef<SVGSVGElement, React.PropsWithChildren<{}>>(
(props, ref) => { (props, ref) => {
return <SvgGroqLogo ref={ref} {...props} />; return <SvgGroqLogo ref={ref} {...props} />;
} },
); );

View file

@ -4,5 +4,5 @@ import SvgIfixitSeeklogocom from "./IfixitSeeklogoCom";
export const IFixIcon = forwardRef<SVGSVGElement, React.PropsWithChildren<{}>>( export const IFixIcon = forwardRef<SVGSVGElement, React.PropsWithChildren<{}>>(
(props, ref) => { (props, ref) => {
return <SvgIfixitSeeklogocom ref={ref} {...props} />; return <SvgIfixitSeeklogocom ref={ref} {...props} />;
} },
); );

View file

@ -4,5 +4,5 @@ import SvgMetaIcon from "./MetaIcon";
export const MetaIcon = forwardRef<SVGSVGElement, React.PropsWithChildren<{}>>( export const MetaIcon = forwardRef<SVGSVGElement, React.PropsWithChildren<{}>>(
(props, ref) => { (props, ref) => {
return <SvgMetaIcon ref={ref} {...props} />; return <SvgMetaIcon ref={ref} {...props} />;
} },
); );

View file

@ -4,5 +4,5 @@ import { SvgRedis } from "./Redis";
export const RedisIcon = forwardRef<SVGSVGElement, React.PropsWithChildren<{}>>( export const RedisIcon = forwardRef<SVGSVGElement, React.PropsWithChildren<{}>>(
(props, ref) => { (props, ref) => {
return <SvgRedis ref={ref} {...props} />; return <SvgRedis ref={ref} {...props} />;
} },
); );

View file

@ -4,5 +4,5 @@ import SvgSearxLogo from "./SearxLogo";
export const SearxIcon = forwardRef<SVGSVGElement, React.PropsWithChildren<{}>>( export const SearxIcon = forwardRef<SVGSVGElement, React.PropsWithChildren<{}>>(
(props, ref) => { (props, ref) => {
return <SvgSearxLogo ref={ref} {...props} />; return <SvgSearxLogo ref={ref} {...props} />;
} },
); );

View file

@ -4,5 +4,5 @@ import SvgShare from "./Share";
export const ShareIcon = forwardRef<SVGSVGElement, React.PropsWithChildren<{}>>( export const ShareIcon = forwardRef<SVGSVGElement, React.PropsWithChildren<{}>>(
(props, ref) => { (props, ref) => {
return <SvgShare ref={ref} {...props} />; return <SvgShare ref={ref} {...props} />;
} },
); );

Some files were not shown because too many files have changed in this diff Show more