// CSS Dependencies import { initializeIcons } from "@fluentui/react"; import "bootstrap/dist/css/bootstrap.css"; import React, { useState } from "react"; import ReactDOM from "react-dom"; import "../externals/jquery-ui.min.css"; import "../externals/jquery-ui.min.js"; import "../externals/jquery-ui.structure.min.css"; import "../externals/jquery-ui.theme.min.css"; import "../externals/jquery.dataTables.min.css"; import "../externals/jquery.typeahead.min.css"; import "../externals/jquery.typeahead.min.js"; // Image Dependencies import "../images/CosmosDB_rgb_ui_lighttheme.ico"; import "../images/favicon.ico"; import hdeConnectImage from "../images/HdeConnectCosmosDB.svg"; import arrowLeftImg from "../images/imgarrowlefticon.svg"; import refreshImg from "../images/refresh-cosmos.svg"; import "../less/documentDB.less"; import "../less/forms.less"; import "../less/infobox.less"; import "../less/menus.less"; import "../less/messagebox.less"; import "../less/resourceTree.less"; import "../less/TableStyles/CustomizeColumns.less"; import "../less/TableStyles/EntityEditor.less"; import "../less/TableStyles/fulldatatables.less"; import "../less/TableStyles/queryBuilder.less"; import "../less/tree.less"; import { AuthType } from "./AuthType"; import "./Explorer/Controls/Accordion/AccordionComponent.less"; import "./Explorer/Controls/CollapsiblePanel/CollapsiblePanelComponent.less"; import { Dialog, DialogProps } from "./Explorer/Controls/Dialog"; import "./Explorer/Controls/DynamicList/DynamicListComponent.less"; import "./Explorer/Controls/ErrorDisplayComponent/ErrorDisplayComponent.less"; import "./Explorer/Controls/JsonEditor/JsonEditorComponent.less"; import "./Explorer/Controls/Notebook/NotebookTerminalComponent.less"; import "./Explorer/Controls/TreeComponent/treeComponent.less"; import { ExplorerParams } from "./Explorer/Explorer"; import "./Explorer/Graph/GraphExplorerComponent/graphExplorer.less"; import "./Explorer/Menus/CommandBar/CommandBarComponent.less"; import "./Explorer/Menus/CommandBar/MemoryTrackerComponent.less"; import "./Explorer/Menus/NotificationConsole/NotificationConsole.less"; import { NotificationConsoleComponent } from "./Explorer/Menus/NotificationConsole/NotificationConsoleComponent"; import "./Explorer/Panes/PanelComponent.less"; import { PanelContainerComponent } from "./Explorer/Panes/PanelContainerComponent"; import { SplashScreen } from "./Explorer/SplashScreen/SplashScreen"; import "./Explorer/SplashScreen/SplashScreen.less"; import "./Explorer/Tabs/QueryTab.less"; import { Tabs } from "./Explorer/Tabs/Tabs"; import { useConfig } from "./hooks/useConfig"; import { useKnockoutExplorer } from "./hooks/useKnockoutExplorer"; import { useSidePanel } from "./hooks/useSidePanel"; import { useTabs } from "./hooks/useTabs"; import "./Libs/jquery"; import "./Shared/appInsights"; import { userContext } from "./UserContext"; initializeIcons(); const App: React.FunctionComponent = () => { const [isNotificationConsoleExpanded, setIsNotificationConsoleExpanded] = useState(false); const [notificationConsoleData, setNotificationConsoleData] = useState(undefined); //TODO: Refactor so we don't need to pass the id to remove a console data const [inProgressConsoleDataIdToBeDeleted, setInProgressConsoleDataIdToBeDeleted] = useState(""); const [dialogProps, setDialogProps] = useState(); const [showDialog, setShowDialog] = useState(false); const openDialog = (props: DialogProps) => { setDialogProps(props); setShowDialog(true); }; const closeDialog = () => { setShowDialog(false); }; const { isPanelOpen, panelContent, headerText, openSidePanel, closeSidePanel } = useSidePanel(); const { tabs, activeTab, tabsManager } = useTabs(); const explorerParams: ExplorerParams = { setIsNotificationConsoleExpanded, setNotificationConsoleData, setInProgressConsoleDataIdToBeDeleted, openSidePanel, closeSidePanel, openDialog, closeDialog, tabsManager, }; const config = useConfig(); const explorer = useKnockoutExplorer(config?.platform, explorerParams); if (!explorer) { return ; } return (
{/* Main Command Bar - Start */}
{/* Collections Tree and Tabs - Begin */}
{/* Collections Tree - Start */}
{/* Collections Tree Expanded - Start */}
{/* Collections Window - - Start */}
{/* Collections Window Title/Command Bar - Start */}
Hide
{userContext.authType === AuthType.ResourceToken ? (
) : (
)}
{/* Collections Window - End */}
{/* Collections Tree Expanded - End */} {/* Collections Tree Collapsed - Start */}
  • Expand
{/* Collections Tree Collapsed - End */}
{/* Splitter - Start */}
{/* Splitter - End */}
{/* Collections Tree - End */} {tabs.length === 0 && }
{/* Collections Tree and Tabs - End */}
{showDialog && }
); }; ReactDOM.render(, document.body); function LoadingExplorer(): JSX.Element { return (

Azure Cosmos DB

Welcome to Azure Cosmos DB

); }