= ({
className='flex items-center mb-2 text-ellipsis whitespace-nowrap max-w-[100%)] overflow-hidden'
>
- {label[Object.keys(label)[0]]['id'] as string ?? Object.keys(label)[0]}
+ {
+ //@ts-ignore
+ label[Object.keys(label)[0]].id ?? Object.keys(label)[0]
+ }
))
diff --git a/frontend/src/components/ChatBot/ChatModeToggle.tsx b/frontend/src/components/ChatBot/ChatModeToggle.tsx
index f5011091..a2becd6c 100644
--- a/frontend/src/components/ChatBot/ChatModeToggle.tsx
+++ b/frontend/src/components/ChatBot/ChatModeToggle.tsx
@@ -36,13 +36,15 @@ export default function ChatModeToggle({
setchatMode(m);
},
disabledCondition: false,
- description:
- {chatMode === m && (
- <>
- Selected
- >
- )}
- ,
+ description: (
+
+ {chatMode === m && (
+ <>
+ Selected
+ >
+ )}
+
+ ),
};
}),
[chatMode, chatModes]
diff --git a/frontend/src/components/ChatBot/Chatbot.tsx b/frontend/src/components/ChatBot/Chatbot.tsx
index 25b89e48..70c81135 100644
--- a/frontend/src/components/ChatBot/Chatbot.tsx
+++ b/frontend/src/components/ChatBot/Chatbot.tsx
@@ -47,9 +47,7 @@ const Chatbot: React.FC = (props) => {
});
let selectedFileNames: CustomFile[] = [];
selectedRows.forEach((id) => {
- console.log(id);
filesData.forEach((f) => {
- console.log(f.id, id);
if (f.id === id) {
selectedFileNames.push(f);
}
@@ -301,14 +299,16 @@ const Chatbot: React.FC = (props) => {
{chat.message}
diff --git a/frontend/src/components/Content.tsx b/frontend/src/components/Content.tsx
index eba399d3..da71cc9b 100644
--- a/frontend/src/components/Content.tsx
+++ b/frontend/src/components/Content.tsx
@@ -30,6 +30,9 @@ const Content: React.FC = ({
openTextSchema,
isSchema,
setIsSchema,
+ showEnhancementDialog,
+ setshowEnhancementDialog,
+ closeSettingModal
}) => {
const [init, setInit] = useState(false);
const [openConnection, setOpenConnection] = useState(false);
@@ -41,7 +44,6 @@ const Content: React.FC = ({
const [extractLoading, setextractLoading] = useState(false);
const [isLargeFile, setIsLargeFile] = useState(false);
const [showSettingnModal, setshowSettingModal] = useState(false);
- const [showEnhancementDialog, setshowEnhancementDialog] = useState(false);
const {
filesData,
@@ -286,8 +288,9 @@ const Content: React.FC = ({
const handleOpenGraphClick = () => {
const bloomUrl = process.env.BLOOM_URL;
const uriCoded = userCredentials?.uri.replace(/:\d+$/, '');
- const connectURL = `${uriCoded?.split('//')[0]}//${userCredentials?.userName}@${uriCoded?.split('//')[1]}:${userCredentials?.port ?? '7687'
- }`;
+ const connectURL = `${uriCoded?.split('//')[0]}//${userCredentials?.userName}@${uriCoded?.split('//')[1]}:${
+ userCredentials?.port ?? '7687'
+ }`;
const encodedURL = encodeURIComponent(connectURL);
const replacedUrl = bloomUrl?.replace('{CONNECT_URL}', encodedURL);
window.open(replacedUrl, '_blank');
@@ -297,10 +300,10 @@ const Content: React.FC = ({
isLeftExpanded && isRightExpanded
? 'contentWithExpansion'
: isRightExpanded
- ? 'contentWithChatBot'
- : !isLeftExpanded && !isRightExpanded
- ? 'w-[calc(100%-128px)]'
- : 'contentWithDropzoneExpansion';
+ ? 'contentWithChatBot'
+ : !isLeftExpanded && !isRightExpanded
+ ? 'w-[calc(100%-128px)]'
+ : 'contentWithDropzoneExpansion';
const handleGraphView = () => {
setOpenGraphView(true);
@@ -586,6 +589,7 @@ const Content: React.FC = ({
)}
@@ -615,10 +619,10 @@ const Content: React.FC = ({
)}
{isSchema ? (
- Empty Graph Schema configured{' '}
+ {(!selectedNodes.length || !selectedNodes.length) && 'Empty'} Graph Schema configured
{selectedNodes.length || selectedRels.length
- ? `${selectedNodes.length} Labels + ${selectedRels.length} Rel Types`
- : ''}{' '}
+ ? `(${selectedNodes.length} Labels + ${selectedRels.length} Rel Types)`
+ : ''}
) : (
No Graph Schema configured
@@ -653,8 +657,9 @@ const Content: React.FC = ({
ref={childRef}
>
diff --git a/frontend/src/components/DataSources/Local/DropZone.tsx b/frontend/src/components/DataSources/Local/DropZone.tsx
index e1c245c0..b775e423 100644
--- a/frontend/src/components/DataSources/Local/DropZone.tsx
+++ b/frontend/src/components/DataSources/Local/DropZone.tsx
@@ -278,4 +278,4 @@ const DropZone: FunctionComponent = () => {
);
};
-export default DropZone;
\ No newline at end of file
+export default DropZone;
diff --git a/frontend/src/components/FileTable.tsx b/frontend/src/components/FileTable.tsx
index 302c2ce9..20277718 100644
--- a/frontend/src/components/FileTable.tsx
+++ b/frontend/src/components/FileTable.tsx
@@ -728,6 +728,6 @@ function IndeterminateCheckbox({
}, [ref, indeterminate]);
return (
-
+
);
}
diff --git a/frontend/src/components/Layout/PageLayout.tsx b/frontend/src/components/Layout/PageLayout.tsx
index a57e7bfc..53b101ca 100644
--- a/frontend/src/components/Layout/PageLayout.tsx
+++ b/frontend/src/components/Layout/PageLayout.tsx
@@ -28,6 +28,7 @@ export default function PageLayoutNew({
const [showChatBot, setShowChatBot] = useState(false);
const [showDrawerChatbot, setShowDrawerChatbot] = useState(true);
const [clearHistoryData, setClearHistoryData] = useState(false);
+ const [showEnhancementDialog, setshowEnhancementDialog] = useState(false);
const { userCredentials } = useCredentials();
const toggleLeftDrawer = () => setIsLeftExpanded(!isLeftExpanded);
const toggleRightDrawer = () => setIsRightExpanded(!isRightExpanded);
@@ -86,16 +87,26 @@ export default function PageLayoutNew({
{
- setShowTextFromSchemaDialog(false);
+ setShowTextFromSchemaDialog({ triggeredFrom: '', show: false });
+ switch (showTextFromSchemaDialog.triggeredFrom) {
+ case 'enhancementtab':
+ setshowEnhancementDialog(true);
+ break;
+ case 'schemadialog':
+ openSettingsDialog();
+ break;
+ default:
+ break;
+ }
}}
showAlert={showAlert}
>
{
- setShowTextFromSchemaDialog(true);
+ setShowTextFromSchemaDialog({ triggeredFrom: 'schemadialog', show: true });
}}
open={isSettingPanelExpanded}
onClose={closeSettingModal}
@@ -109,10 +120,14 @@ export default function PageLayoutNew({
isRightExpanded={isRightExpanded}
showChatBot={showChatBot}
openTextSchema={() => {
- setShowTextFromSchemaDialog(true);
+ setShowTextFromSchemaDialog({ triggeredFrom: 'schemadialog', show: true });
}}
isSchema={isSchema}
setIsSchema={setIsSchema}
+ showEnhancementDialog={showEnhancementDialog}
+ setshowEnhancementDialog={setshowEnhancementDialog}
+ closeSettingModal={closeSettingModal}
+
/>
{showDrawerChatbot && (
diff --git a/frontend/src/components/Popups/GraphEnhancementDialog/DeleteTabForOrphanNodes/index.tsx b/frontend/src/components/Popups/GraphEnhancementDialog/DeleteTabForOrphanNodes/index.tsx
index 3701a483..7a6fa98b 100644
--- a/frontend/src/components/Popups/GraphEnhancementDialog/DeleteTabForOrphanNodes/index.tsx
+++ b/frontend/src/components/Popups/GraphEnhancementDialog/DeleteTabForOrphanNodes/index.tsx
@@ -134,14 +134,12 @@ export default function DeletePopUpForOrphanNodes({
},
header: () => Related Documents ,
footer: (info) => info.column.id,
- maxSize: 280,
}),
columnHelper.accessor((row) => row.chunkConnections, {
id: 'Connected Chunks',
cell: (info) => {info?.getValue()},
header: () => Connected Chunks,
footer: (info) => info.column.id,
- minSize: 280,
}),
],
[]
@@ -226,6 +224,9 @@ export default function DeletePopUpForOrphanNodes({
zebraStriping: true,
headerStyle: 'clean',
}}
+ rootProps={{
+ className: 'max-h-[355px] !overflow-y-auto',
+ }}
isLoading={isLoading}
components={{
Body: (props) => ,
diff --git a/frontend/src/components/Popups/GraphEnhancementDialog/index.tsx b/frontend/src/components/Popups/GraphEnhancementDialog/index.tsx
index eb848726..e85ca660 100644
--- a/frontend/src/components/Popups/GraphEnhancementDialog/index.tsx
+++ b/frontend/src/components/Popups/GraphEnhancementDialog/index.tsx
@@ -1,6 +1,6 @@
import { Dialog, Tabs, Box, Typography, Flex } from '@neo4j-ndl/react';
import graphenhancement from '../../../assets/images/graph-enhancements.svg';
-import { useState } from 'react';
+import { useEffect, useState } from 'react';
import DeletePopUpForOrphanNodes from './DeleteTabForOrphanNodes';
import deleteOrphanAPI from '../../../services/DeleteOrphanNodes';
import { UserCredentials } from '../../../types';
@@ -13,6 +13,7 @@ import { useFileContext } from '../../../context/UsersFiles';
export default function GraphEnhancementDialog({
open,
onClose,
+ closeSettingModal
}: {
open: boolean;
onClose: () => void;
@@ -20,6 +21,7 @@ export default function GraphEnhancementDialog({
alertmsg: string,
alerttype: OverridableStringUnion | undefined
) => void;
+ closeSettingModal:()=>void
}) {
const [orphanDeleteAPIloading, setorphanDeleteAPIloading] = useState(false);
const { setShowTextFromSchemaDialog } = useFileContext();
@@ -35,6 +37,10 @@ export default function GraphEnhancementDialog({
console.log(error);
}
};
+ useEffect(() => {
+ closeSettingModal()
+ }, [])
+
const [activeTab, setactiveTab] = useState(0);
return (