Merge branch 'dev' into cz/mergeAll
This commit is contained in:
commit
1ecf3d5ddc
11 changed files with 31 additions and 33 deletions
1
Makefile
1
Makefile
|
|
@ -168,6 +168,7 @@ build_and_install:
|
||||||
|
|
||||||
build_frontend:
|
build_frontend:
|
||||||
cd src/frontend && CI='' npm run build
|
cd src/frontend && CI='' npm run build
|
||||||
|
rm -rf src/backend/base/langflow/frontend
|
||||||
cp -r src/frontend/build src/backend/base/langflow/frontend
|
cp -r src/frontend/build src/backend/base/langflow/frontend
|
||||||
|
|
||||||
build:
|
build:
|
||||||
|
|
|
||||||
16
src/frontend/package-lock.json
generated
16
src/frontend/package-lock.json
generated
|
|
@ -41,7 +41,6 @@
|
||||||
"class-variance-authority": "^0.6.1",
|
"class-variance-authority": "^0.6.1",
|
||||||
"clsx": "^1.2.1",
|
"clsx": "^1.2.1",
|
||||||
"cmdk": "^1.0.0",
|
"cmdk": "^1.0.0",
|
||||||
"debounce-promise": "^3.1.2",
|
|
||||||
"dompurify": "^3.0.5",
|
"dompurify": "^3.0.5",
|
||||||
"dotenv": "^16.4.5",
|
"dotenv": "^16.4.5",
|
||||||
"emoji-regex": "^10.3.0",
|
"emoji-regex": "^10.3.0",
|
||||||
|
|
@ -53,6 +52,7 @@
|
||||||
"million": "^3.0.6",
|
"million": "^3.0.6",
|
||||||
"moment": "^2.29.4",
|
"moment": "^2.29.4",
|
||||||
"openseadragon": "^4.1.1",
|
"openseadragon": "^4.1.1",
|
||||||
|
"p-debounce": "^4.0.0",
|
||||||
"playwright": "^1.42.0",
|
"playwright": "^1.42.0",
|
||||||
"react": "^18.2.21",
|
"react": "^18.2.21",
|
||||||
"react-ace": "^10.1.0",
|
"react-ace": "^10.1.0",
|
||||||
|
|
@ -5698,11 +5698,6 @@
|
||||||
"node": ">=12"
|
"node": ">=12"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/debounce-promise": {
|
|
||||||
"version": "3.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/debounce-promise/-/debounce-promise-3.1.2.tgz",
|
|
||||||
"integrity": "sha512-rZHcgBkbYavBeD9ej6sP56XfG53d51CD4dnaw989YX/nZ/ZJfgRx/9ePKmTNiUiyQvh4mtrMoS3OAWW+yoYtpg=="
|
|
||||||
},
|
|
||||||
"node_modules/debug": {
|
"node_modules/debug": {
|
||||||
"version": "4.3.4",
|
"version": "4.3.4",
|
||||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
|
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
|
||||||
|
|
@ -10051,6 +10046,15 @@
|
||||||
"node": ">=8"
|
"node": ">=8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/p-debounce": {
|
||||||
|
"version": "4.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/p-debounce/-/p-debounce-4.0.0.tgz",
|
||||||
|
"integrity": "sha512-4Ispi9I9qYGO4lueiLDhe4q4iK5ERK8reLsuzH6BPaXn53EGaua8H66PXIFGrW897hwjXp+pVLrm/DLxN0RF0A==",
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/p-finally": {
|
"node_modules/p-finally": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz",
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,6 @@
|
||||||
"class-variance-authority": "^0.6.1",
|
"class-variance-authority": "^0.6.1",
|
||||||
"clsx": "^1.2.1",
|
"clsx": "^1.2.1",
|
||||||
"cmdk": "^1.0.0",
|
"cmdk": "^1.0.0",
|
||||||
"debounce-promise": "^3.1.2",
|
|
||||||
"dompurify": "^3.0.5",
|
"dompurify": "^3.0.5",
|
||||||
"dotenv": "^16.4.5",
|
"dotenv": "^16.4.5",
|
||||||
"emoji-regex": "^10.3.0",
|
"emoji-regex": "^10.3.0",
|
||||||
|
|
@ -48,6 +47,7 @@
|
||||||
"million": "^3.0.6",
|
"million": "^3.0.6",
|
||||||
"moment": "^2.29.4",
|
"moment": "^2.29.4",
|
||||||
"openseadragon": "^4.1.1",
|
"openseadragon": "^4.1.1",
|
||||||
|
"p-debounce": "^4.0.0",
|
||||||
"playwright": "^1.42.0",
|
"playwright": "^1.42.0",
|
||||||
"react": "^18.2.21",
|
"react": "^18.2.21",
|
||||||
"react-ace": "^10.1.0",
|
"react-ace": "^10.1.0",
|
||||||
|
|
|
||||||
|
|
@ -81,14 +81,16 @@ export default function Header(): JSX.Element {
|
||||||
<span className="ml-4 text-2xl">⛓️</span>
|
<span className="ml-4 text-2xl">⛓️</span>
|
||||||
</Link>
|
</Link>
|
||||||
{showArrowReturnIcon && (
|
{showArrowReturnIcon && (
|
||||||
<button
|
<Button
|
||||||
|
variant="none"
|
||||||
|
size="none"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
checkForChanges();
|
checkForChanges();
|
||||||
redirectToLastLocation();
|
redirectToLastLocation();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<IconComponent name="ChevronLeft" className="w-4" />
|
<IconComponent name="ChevronLeft" className="w-4" />
|
||||||
</button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<MenuBar />
|
<MenuBar />
|
||||||
|
|
@ -186,7 +188,9 @@ export default function Header(): JSX.Element {
|
||||||
<Separator orientation="vertical" />
|
<Separator orientation="vertical" />
|
||||||
<DropdownMenu>
|
<DropdownMenu>
|
||||||
<DropdownMenuTrigger asChild>
|
<DropdownMenuTrigger asChild>
|
||||||
<button
|
<Button
|
||||||
|
variant="none"
|
||||||
|
size="none"
|
||||||
data-testid="user-profile-settings"
|
data-testid="user-profile-settings"
|
||||||
className={
|
className={
|
||||||
"h-7 w-7 rounded-full focus-visible:outline-0 " +
|
"h-7 w-7 rounded-full focus-visible:outline-0 " +
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@ type SidebarNavProps = {
|
||||||
title: string;
|
title: string;
|
||||||
icon: React.ReactNode;
|
icon: React.ReactNode;
|
||||||
}[];
|
}[];
|
||||||
handleOpenNewFolderModal?: () => void;
|
|
||||||
handleChangeFolder?: (id: string) => void;
|
handleChangeFolder?: (id: string) => void;
|
||||||
handleEditFolder?: (item: FolderType) => void;
|
handleEditFolder?: (item: FolderType) => void;
|
||||||
handleDeleteFolder?: (item: FolderType) => void;
|
handleDeleteFolder?: (item: FolderType) => void;
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,9 @@ const SvgBotMessageSquare = (props) => (
|
||||||
viewBox="0 0 24 24"
|
viewBox="0 0 24 24"
|
||||||
fill="none"
|
fill="none"
|
||||||
stroke="currentColor"
|
stroke="currentColor"
|
||||||
stroke-width="2"
|
strokeWidth="2"
|
||||||
stroke-linecap="round"
|
strokeLinecap="round"
|
||||||
stroke-linejoin="round"
|
strokeLinejoin="round"
|
||||||
className="lucide lucide-bot-message-square"
|
className="lucide lucide-bot-message-square"
|
||||||
{...props}
|
{...props}
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -34,19 +34,14 @@ const HeaderComponent = ({
|
||||||
<>
|
<>
|
||||||
<div className="flex w-full items-center justify-between gap-4">
|
<div className="flex w-full items-center justify-between gap-4">
|
||||||
<div className="flex items-center justify-self-start">
|
<div className="flex items-center justify-self-start">
|
||||||
<Button
|
<a onClick={handleClick} className="cursor-pointer text-sm">
|
||||||
variant="none"
|
|
||||||
size="none"
|
|
||||||
onClick={handleClick}
|
|
||||||
className="text-sm"
|
|
||||||
>
|
|
||||||
<div className="flex items-center space-x-2">
|
<div className="flex items-center space-x-2">
|
||||||
<Checkbox checked={!shouldSelectAll} id="terms" />
|
<Checkbox checked={!shouldSelectAll} id="terms" />
|
||||||
<span className="label text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70">
|
<span className="label text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70">
|
||||||
{shouldSelectAll ? "Select All" : "Unselect All"}
|
{shouldSelectAll ? "Select All" : "Unselect All"}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</Button>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<div>
|
<div>
|
||||||
|
|
|
||||||
|
|
@ -2,16 +2,15 @@ import ComponentsComponent from "../componentsComponent";
|
||||||
import HeaderTabsSearchComponent from "./components/headerTabsSearchComponent";
|
import HeaderTabsSearchComponent from "./components/headerTabsSearchComponent";
|
||||||
|
|
||||||
type MyCollectionComponentProps = {
|
type MyCollectionComponentProps = {
|
||||||
key: string;
|
|
||||||
type: string;
|
type: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
const MyCollectionComponent = ({ key, type }: MyCollectionComponentProps) => {
|
const MyCollectionComponent = ({ type }: MyCollectionComponentProps) => {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<HeaderTabsSearchComponent />
|
<HeaderTabsSearchComponent />
|
||||||
<div className="mt-5 flex h-full flex-col">
|
<div className="mt-5 flex h-full flex-col">
|
||||||
<ComponentsComponent key={key} type={type} />
|
<ComponentsComponent key={type} type={type} />
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ import useDropdownOptions from "../../hooks/use-dropdown-options";
|
||||||
export default function HomePage(): JSX.Element {
|
export default function HomePage(): JSX.Element {
|
||||||
const uploadFlow = useFlowsManagerStore((state) => state.uploadFlow);
|
const uploadFlow = useFlowsManagerStore((state) => state.uploadFlow);
|
||||||
const setCurrentFlowId = useFlowsManagerStore(
|
const setCurrentFlowId = useFlowsManagerStore(
|
||||||
(state) => state.setCurrentFlowId
|
(state) => state.setCurrentFlowId,
|
||||||
);
|
);
|
||||||
|
|
||||||
const location = useLocation();
|
const location = useLocation();
|
||||||
|
|
@ -67,10 +67,6 @@ export default function HomePage(): JSX.Element {
|
||||||
<div className="flex h-full w-full space-y-8 md:flex-col lg:flex-row lg:space-x-8 lg:space-y-0">
|
<div className="flex h-full w-full space-y-8 md:flex-col lg:flex-row lg:space-x-8 lg:space-y-0">
|
||||||
<aside className="flex h-fit w-fit flex-col space-y-6">
|
<aside className="flex h-fit w-fit flex-col space-y-6">
|
||||||
<SidebarNav
|
<SidebarNav
|
||||||
handleOpenNewFolderModal={() => {
|
|
||||||
setFolderToEdit(null);
|
|
||||||
setOpenFolderModal(true);
|
|
||||||
}}
|
|
||||||
items={[]}
|
items={[]}
|
||||||
handleChangeFolder={(id: string) => {
|
handleChangeFolder={(id: string) => {
|
||||||
navigate(`all/folder/${id}`, { state: { folderId: id } });
|
navigate(`all/folder/${id}`, { state: { folderId: id } });
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import * as debounce from "debounce-promise";
|
|
||||||
import { cloneDeep } from "lodash";
|
import { cloneDeep } from "lodash";
|
||||||
|
import pDebounce from "p-debounce";
|
||||||
import { Edge, Node, Viewport, XYPosition } from "reactflow";
|
import { Edge, Node, Viewport, XYPosition } from "reactflow";
|
||||||
import { create } from "zustand";
|
import { create } from "zustand";
|
||||||
import { SAVE_DEBOUNCE_TIME } from "../constants/constants";
|
import { SAVE_DEBOUNCE_TIME } from "../constants/constants";
|
||||||
|
|
@ -128,7 +128,7 @@ const useFlowsManagerStore = create<FlowsManagerStoreType>((set, get) => ({
|
||||||
set({ saveLoading: true }); // set saveLoading true immediately
|
set({ saveLoading: true }); // set saveLoading true immediately
|
||||||
return get().saveFlowDebounce(flow, silent); // call the debounced function directly
|
return get().saveFlowDebounce(flow, silent); // call the debounced function directly
|
||||||
},
|
},
|
||||||
saveFlowDebounce: debounce((flow: FlowType, silent?: boolean) => {
|
saveFlowDebounce: pDebounce((flow: FlowType, silent?: boolean) => {
|
||||||
set({ saveLoading: true });
|
set({ saveLoading: true });
|
||||||
return new Promise<void>((resolve, reject) => {
|
return new Promise<void>((resolve, reject) => {
|
||||||
updateFlowInDatabase(flow)
|
updateFlowInDatabase(flow)
|
||||||
|
|
|
||||||
|
|
@ -42,10 +42,10 @@ export const useFolderStore = create<FoldersStoreType>((set, get) => ({
|
||||||
get().setLoading(false);
|
get().setLoading(false);
|
||||||
resolve();
|
resolve();
|
||||||
},
|
},
|
||||||
() => {
|
(error) => {
|
||||||
set({ folders: [] });
|
set({ folders: [] });
|
||||||
get().setLoading(false);
|
get().setLoading(false);
|
||||||
reject();
|
reject(error);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue