├── .nvmrc ├── .yarnrc ├── now.json ├── src ├── browser │ ├── components │ │ ├── headers │ │ │ ├── style.css │ │ │ ├── index.js │ │ │ └── Headers.test.js │ │ ├── icons │ │ │ └── fonts │ │ │ │ ├── neo-font.eot │ │ │ │ ├── neo-font.ttf │ │ │ │ ├── neo-font.woff │ │ │ │ ├── streamline.eot │ │ │ │ ├── streamline.ttf │ │ │ │ ├── neo4j-world.eot │ │ │ │ ├── neo4j-world.ttf │ │ │ │ ├── neo4j-world.woff │ │ │ │ └── streamline.woff │ │ ├── buttons │ │ │ ├── style.css │ │ │ ├── index.test.js │ │ │ └── __snapshots__ │ │ │ │ └── ConfirmationButton.test.js.snap │ │ ├── Accordion │ │ │ └── styled.jsx │ │ ├── InputEnterStepping │ │ │ ├── __snapshots__ │ │ │ │ └── InputEnterStepping.test.js.snap │ │ │ └── InputEnterStepping.jsx │ │ ├── desktop-api │ │ │ └── desktop-api.handlers.js │ │ ├── Render │ │ │ └── index.jsx │ │ ├── Centered.jsx │ │ ├── __snapshots__ │ │ │ └── Display.test.js.snap │ │ ├── Ellipsis.jsx │ │ ├── Text.jsx │ │ ├── drawer │ │ │ └── index.js │ │ └── EditionView.jsx │ ├── modules │ │ ├── Sidebar │ │ │ ├── DragItemTypes.js │ │ │ └── __snapshots__ │ │ │ │ └── Settings.test.js.snap │ │ ├── Stream │ │ │ ├── __snapshots__ │ │ │ │ └── HistoryRow.test.js.snap │ │ │ ├── Extras │ │ │ │ ├── SnakeFrame │ │ │ │ │ ├── Score.jsx │ │ │ │ │ └── Snake.test.js │ │ │ │ └── index.js │ │ │ ├── Errors │ │ │ │ └── IESecurityErrors.jsx │ │ │ ├── CypherScriptFrame │ │ │ │ └── styled.jsx │ │ │ ├── Queries │ │ │ │ └── toggleStyles.css │ │ │ ├── AutoRefresh │ │ │ │ └── toggleStyles.css │ │ │ ├── CypherFrame │ │ │ │ ├── __snapshots__ │ │ │ │ │ └── AsciiView.test.js.snap │ │ │ │ ├── PlanView.styled.jsx │ │ │ │ └── relatable-view.styled.js │ │ │ ├── stream.utils.js │ │ │ ├── HistoryRow.jsx │ │ │ ├── PreFrame.jsx │ │ │ └── errorMessageFormater.js │ │ ├── DBMSInfo │ │ │ └── style_meta.css │ │ ├── FeatureToggle │ │ │ ├── FeatureToggle.jsx │ │ │ └── FeatureToggleProvider.jsx │ │ ├── ClickToCode │ │ │ ├── __snapshots__ │ │ │ │ └── index.test.js.snap │ │ │ └── styled.jsx │ │ ├── D3Visualization │ │ │ ├── lib │ │ │ │ └── visualization │ │ │ │ │ ├── index.js │ │ │ │ │ ├── utils │ │ │ │ │ └── arrays.js │ │ │ │ │ ├── components │ │ │ │ │ └── renderer.js │ │ │ │ │ └── d3-appendSvg.js │ │ │ ├── index.js │ │ │ └── components │ │ │ │ └── index.js │ │ ├── DocTitle │ │ │ └── index.jsx │ │ └── Frame │ │ │ ├── FrameSuccess.jsx │ │ │ └── FrameSidebar.jsx │ ├── images │ │ ├── books.png │ │ ├── one_node.png │ │ ├── community.jpg │ │ ├── more_nodes.png │ │ ├── ongdb-world.png │ │ ├── rel-props.png │ │ ├── labeled_node.png │ │ ├── relationships.png │ │ ├── screen_editor.png │ │ ├── screen_stream.png │ │ ├── screen_sidebar.png │ │ ├── screen_code_frame.png │ │ ├── screen_cypher_warn.png │ │ ├── device-icons │ │ │ ├── favicon.ico │ │ │ ├── apple-icon.png │ │ │ ├── favicon-16x16.png │ │ │ ├── favicon-32x32.png │ │ │ ├── favicon-96x96.png │ │ │ ├── ms-icon-70x70.png │ │ │ ├── ms-icon-144x144.png │ │ │ ├── ms-icon-150x150.png │ │ │ ├── ms-icon-310x310.png │ │ │ ├── android-icon-36x36.png │ │ │ ├── android-icon-48x48.png │ │ │ ├── android-icon-72x72.png │ │ │ ├── android-icon-96x96.png │ │ │ ├── apple-icon-114x114.png │ │ │ ├── apple-icon-120x120.png │ │ │ ├── apple-icon-144x144.png │ │ │ ├── apple-icon-152x152.png │ │ │ ├── apple-icon-180x180.png │ │ │ ├── apple-icon-57x57.png │ │ │ ├── apple-icon-60x60.png │ │ │ ├── apple-icon-72x72.png │ │ │ ├── apple-icon-76x76.png │ │ │ ├── android-icon-144x144.png │ │ │ ├── android-icon-192x192.png │ │ │ ├── apple-icon-precomposed.png │ │ │ ├── browserconfig.xml │ │ │ └── manifest.json │ │ └── northwind │ │ │ ├── order-graph.png │ │ │ ├── product-graph.png │ │ │ ├── customer-orders.png │ │ │ └── product-category-supplier.png │ ├── styles │ │ ├── fonts │ │ │ ├── neo-font.eot │ │ │ ├── neo-font.ttf │ │ │ ├── neo-font.woff │ │ │ ├── streamline.eot │ │ │ ├── streamline.ttf │ │ │ ├── FontAwesome.otf │ │ │ ├── neo4j-world.eot │ │ │ ├── neo4j-world.ttf │ │ │ ├── neo4j-world.woff │ │ │ ├── streamline.woff │ │ │ ├── OpenSans-Bold.ttf │ │ │ ├── OpenSans-Italic.ttf │ │ │ ├── OpenSans-Light.ttf │ │ │ ├── Inconsolata-Bold.ttf │ │ │ ├── OpenSans-Regular.ttf │ │ │ ├── OpenSans-Semibold.ttf │ │ │ ├── Inconsolata-Regular.ttf │ │ │ ├── OpenSans-BoldItalic.ttf │ │ │ ├── OpenSans-ExtraBold.ttf │ │ │ ├── OpenSans-LightItalic.ttf │ │ │ ├── fontawesome-webfont.eot │ │ │ ├── fontawesome-webfont.ttf │ │ │ ├── fontawesome-webfont.woff │ │ │ ├── fontawesome-webfont.woff2 │ │ │ ├── OpenSans-ExtraBoldItalic.ttf │ │ │ ├── OpenSans-SemiboldItalic.ttf │ │ │ └── FiraCode │ │ │ │ ├── eot │ │ │ │ ├── FiraCode-Bold.eot │ │ │ │ ├── FiraCode-Light.eot │ │ │ │ ├── FiraCode-Medium.eot │ │ │ │ └── FiraCode-Regular.eot │ │ │ │ ├── otf │ │ │ │ ├── FiraCode-Bold.otf │ │ │ │ ├── FiraCode-Light.otf │ │ │ │ ├── FiraCode-Medium.otf │ │ │ │ ├── FiraCode-Regular.otf │ │ │ │ └── FiraCode-Retina.otf │ │ │ │ ├── ttf │ │ │ │ ├── FiraCode-Bold.ttf │ │ │ │ ├── FiraCode-Light.ttf │ │ │ │ ├── FiraCode-Medium.ttf │ │ │ │ ├── FiraCode-Regular.ttf │ │ │ │ └── FiraCode-Retina.ttf │ │ │ │ ├── woff │ │ │ │ ├── FiraCode-Bold.woff │ │ │ │ ├── FiraCode-Light.woff │ │ │ │ ├── FiraCode-Medium.woff │ │ │ │ └── FiraCode-Regular.woff │ │ │ │ └── woff2 │ │ │ │ ├── FiraCode-Bold.woff2 │ │ │ │ ├── FiraCode-Light.woff2 │ │ │ │ ├── FiraCode-Medium.woff2 │ │ │ │ └── FiraCode-Regular.woff2 │ │ ├── utils.js │ │ ├── inconsolata.css │ │ ├── animations.js │ │ ├── fira-code.css │ │ └── constants.js │ ├── hooks │ │ ├── testUtils.js │ │ ├── useDetectColorScheme.js │ │ └── useTimer.js │ ├── icons │ │ ├── arrow-down-1.svg │ │ ├── arrow-up-1.svg │ │ ├── arrow-left-1.svg │ │ ├── arrow-right-1.svg │ │ ├── close.svg │ │ ├── controls-play.svg │ │ ├── button-refresh-arrow.svg │ │ ├── lock-unlock.svg │ │ ├── cloud-check.svg │ │ ├── download-bottom.svg │ │ ├── shrink.svg │ │ ├── pencil.svg │ │ ├── cloud-remove.svg │ │ ├── rating-star.svg │ │ ├── app-window-code.svg │ │ ├── book-search.svg │ │ ├── pin.svg │ │ ├── expand-01.svg │ │ ├── eraser-2.svg │ │ ├── hierarchy-8.svg │ │ ├── task-list-download.svg │ │ ├── camera-studio.svg │ │ ├── cloud-sync.svg │ │ ├── Text2-01.svg │ │ ├── skip-prev.svg │ │ ├── layers-hide.svg │ │ ├── database-check.svg │ │ ├── monitor-heart-beat.svg │ │ ├── table-01.svg │ │ ├── shop-1.svg │ │ ├── hierarchy-9.svg │ │ └── cog.svg │ ├── manifest-base.json │ ├── index.jsx │ ├── index.test.js │ └── documentation │ │ └── help │ │ ├── partials │ │ ├── params-on-systemdb.jsx │ │ └── admin-on-systemdb.jsx │ │ └── queries.jsx └── shared │ ├── services │ ├── cypherErrorsHelper.js │ ├── bolt │ │ ├── updateStatisticsFields.js │ │ ├── cypherTypesFormatting.js │ │ └── driverFactory.js │ ├── export-favorites │ │ ├── export-favorites.constants.js │ │ └── index.js │ ├── intercom.js │ ├── duckUtils.js │ └── santize.utils.js │ ├── modules │ ├── settings │ │ └── __snapshots__ │ │ │ └── settingsDuck.test.js.snap │ ├── stream │ │ ├── __snapshots__ │ │ │ └── streamDuck.test.js.snap │ │ └── frameViewTypes.js │ ├── cypher │ │ ├── procedureFactory.js │ │ └── queriesProcedureHelper.js │ ├── userInteraction │ │ └── userInteractionDuck.js │ ├── dbMeta │ │ └── __snapshots__ │ │ │ └── dbMetaDuck.test.js.snap │ ├── udc │ │ └── udcHelpers.js │ ├── features │ │ └── featureDuck.utils.js │ ├── experimentalFeatures │ │ └── experimentalFeaturesDuck.js │ └── commands │ │ └── helpers │ │ └── grass.js │ └── utils │ ├── array-has-items.js │ └── number-to-US-locale.js ├── .eslintignore ├── .github ├── ongdb-browser-screenshot.png ├── PULL_REQUEST_TEMPLATE.md └── ISSUE_TEMPLATE.md ├── .npmrc ├── e2e_tests ├── files │ └── import.csv ├── support │ ├── index.js │ ├── defaults.js │ └── utils.js └── plugins │ └── index.js ├── scripts ├── static_data │ ├── LICENSES_HEADER.txt │ ├── external_dependencies.js │ ├── NOTICE_XML_HEADER.txt │ └── NOTICE_HEADER.txt └── generate_licenses.sh ├── .prettierrc ├── Dockerfile ├── .gitignore ├── .npmignore ├── jsconfig.json ├── auth_server ├── keys │ ├── cert.csr │ ├── certificate.pem │ └── private.key ├── server.js └── public │ └── silentAuthNewBrowser.html ├── babel.config.js ├── cypress.json ├── .eslintrc.json ├── jest.config.js ├── test_utils ├── __mocks__ │ ├── styleMock.js │ ├── workerLoaderMock.js │ └── fileMock.js └── setupTests.js └── postcss.config.js /.nvmrc: -------------------------------------------------------------------------------- 1 | 12 2 | -------------------------------------------------------------------------------- /.yarnrc: -------------------------------------------------------------------------------- 1 | registry "https://neo.jfrog.io/neo/api/npm/npm//" 2 | -------------------------------------------------------------------------------- /now.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "neo4j-browser", 3 | "type": "static" 4 | } 5 | -------------------------------------------------------------------------------- /src/browser/components/headers/style.css: -------------------------------------------------------------------------------- 1 | .h1, 2 | .h2, 3 | .h3, 4 | .h4 { 5 | } 6 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | build 3 | dist 4 | mvn 5 | cypress 6 | yarn-cache 7 | coverage/ 8 | -------------------------------------------------------------------------------- /src/browser/modules/Sidebar/DragItemTypes.js: -------------------------------------------------------------------------------- 1 | export default { 2 | FAVORITE: 'favorite' 3 | } 4 | -------------------------------------------------------------------------------- /src/browser/images/books.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/images/books.png -------------------------------------------------------------------------------- /src/browser/images/one_node.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/images/one_node.png -------------------------------------------------------------------------------- /src/browser/images/community.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/images/community.jpg -------------------------------------------------------------------------------- /src/browser/images/more_nodes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/images/more_nodes.png -------------------------------------------------------------------------------- /src/browser/images/ongdb-world.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/images/ongdb-world.png -------------------------------------------------------------------------------- /src/browser/images/rel-props.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/images/rel-props.png -------------------------------------------------------------------------------- /.github/ongdb-browser-screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/.github/ongdb-browser-screenshot.png -------------------------------------------------------------------------------- /src/browser/images/labeled_node.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/images/labeled_node.png -------------------------------------------------------------------------------- /src/browser/images/relationships.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/images/relationships.png -------------------------------------------------------------------------------- /src/browser/images/screen_editor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/images/screen_editor.png -------------------------------------------------------------------------------- /src/browser/images/screen_stream.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/images/screen_stream.png -------------------------------------------------------------------------------- /src/browser/images/screen_sidebar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/images/screen_sidebar.png -------------------------------------------------------------------------------- /src/browser/styles/fonts/neo-font.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/styles/fonts/neo-font.eot -------------------------------------------------------------------------------- /src/browser/styles/fonts/neo-font.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/styles/fonts/neo-font.ttf -------------------------------------------------------------------------------- /src/browser/styles/fonts/neo-font.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/styles/fonts/neo-font.woff -------------------------------------------------------------------------------- /src/browser/styles/fonts/streamline.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/styles/fonts/streamline.eot -------------------------------------------------------------------------------- /src/browser/styles/fonts/streamline.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/styles/fonts/streamline.ttf -------------------------------------------------------------------------------- /src/browser/images/screen_code_frame.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/images/screen_code_frame.png -------------------------------------------------------------------------------- /src/browser/images/screen_cypher_warn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/images/screen_cypher_warn.png -------------------------------------------------------------------------------- /src/browser/styles/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/styles/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /src/browser/styles/fonts/neo4j-world.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/styles/fonts/neo4j-world.eot -------------------------------------------------------------------------------- /src/browser/styles/fonts/neo4j-world.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/styles/fonts/neo4j-world.ttf -------------------------------------------------------------------------------- /src/browser/styles/fonts/neo4j-world.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/styles/fonts/neo4j-world.woff -------------------------------------------------------------------------------- /src/browser/styles/fonts/streamline.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/styles/fonts/streamline.woff -------------------------------------------------------------------------------- /src/browser/hooks/testUtils.js: -------------------------------------------------------------------------------- 1 | export function createMediaListenerMatch(media) { 2 | return { 3 | matches: true, 4 | media 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /src/browser/images/device-icons/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/images/device-icons/favicon.ico -------------------------------------------------------------------------------- /src/browser/images/northwind/order-graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/images/northwind/order-graph.png -------------------------------------------------------------------------------- /src/browser/styles/fonts/OpenSans-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/styles/fonts/OpenSans-Bold.ttf -------------------------------------------------------------------------------- /src/browser/styles/fonts/OpenSans-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/styles/fonts/OpenSans-Italic.ttf -------------------------------------------------------------------------------- /src/browser/styles/fonts/OpenSans-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/styles/fonts/OpenSans-Light.ttf -------------------------------------------------------------------------------- /src/browser/images/device-icons/apple-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/images/device-icons/apple-icon.png -------------------------------------------------------------------------------- /src/browser/images/northwind/product-graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/images/northwind/product-graph.png -------------------------------------------------------------------------------- /src/browser/styles/fonts/Inconsolata-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/styles/fonts/Inconsolata-Bold.ttf -------------------------------------------------------------------------------- /src/browser/styles/fonts/OpenSans-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/styles/fonts/OpenSans-Regular.ttf -------------------------------------------------------------------------------- /src/browser/styles/fonts/OpenSans-Semibold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/styles/fonts/OpenSans-Semibold.ttf -------------------------------------------------------------------------------- /src/browser/components/icons/fonts/neo-font.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/components/icons/fonts/neo-font.eot -------------------------------------------------------------------------------- /src/browser/components/icons/fonts/neo-font.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/components/icons/fonts/neo-font.ttf -------------------------------------------------------------------------------- /src/browser/components/icons/fonts/neo-font.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/components/icons/fonts/neo-font.woff -------------------------------------------------------------------------------- /src/browser/components/icons/fonts/streamline.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/components/icons/fonts/streamline.eot -------------------------------------------------------------------------------- /src/browser/components/icons/fonts/streamline.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/components/icons/fonts/streamline.ttf -------------------------------------------------------------------------------- /src/browser/images/device-icons/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/images/device-icons/favicon-16x16.png -------------------------------------------------------------------------------- /src/browser/images/device-icons/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/images/device-icons/favicon-32x32.png -------------------------------------------------------------------------------- /src/browser/images/device-icons/favicon-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/images/device-icons/favicon-96x96.png -------------------------------------------------------------------------------- /src/browser/images/device-icons/ms-icon-70x70.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/images/device-icons/ms-icon-70x70.png -------------------------------------------------------------------------------- /src/browser/images/northwind/customer-orders.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/images/northwind/customer-orders.png -------------------------------------------------------------------------------- /src/browser/styles/fonts/Inconsolata-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/styles/fonts/Inconsolata-Regular.ttf -------------------------------------------------------------------------------- /src/browser/styles/fonts/OpenSans-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/styles/fonts/OpenSans-BoldItalic.ttf -------------------------------------------------------------------------------- /src/browser/styles/fonts/OpenSans-ExtraBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/styles/fonts/OpenSans-ExtraBold.ttf -------------------------------------------------------------------------------- /src/browser/styles/fonts/OpenSans-LightItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/styles/fonts/OpenSans-LightItalic.ttf -------------------------------------------------------------------------------- /src/browser/styles/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/styles/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /src/browser/styles/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/styles/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /src/browser/styles/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/styles/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | registry=https://neo.jfrog.io/neo/api/npm/npm/ 2 | @neo4j:registry=https://registry.npmjs.org/ 3 | tag-version-prefix="" 4 | scripts-prepend-node-path=true 5 | -------------------------------------------------------------------------------- /src/browser/components/icons/fonts/neo4j-world.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/components/icons/fonts/neo4j-world.eot -------------------------------------------------------------------------------- /src/browser/components/icons/fonts/neo4j-world.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/components/icons/fonts/neo4j-world.ttf -------------------------------------------------------------------------------- /src/browser/components/icons/fonts/neo4j-world.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/components/icons/fonts/neo4j-world.woff -------------------------------------------------------------------------------- /src/browser/components/icons/fonts/streamline.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/components/icons/fonts/streamline.woff -------------------------------------------------------------------------------- /src/browser/images/device-icons/ms-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/images/device-icons/ms-icon-144x144.png -------------------------------------------------------------------------------- /src/browser/images/device-icons/ms-icon-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/images/device-icons/ms-icon-150x150.png -------------------------------------------------------------------------------- /src/browser/images/device-icons/ms-icon-310x310.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/images/device-icons/ms-icon-310x310.png -------------------------------------------------------------------------------- /src/browser/styles/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/styles/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /src/browser/images/device-icons/android-icon-36x36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/images/device-icons/android-icon-36x36.png -------------------------------------------------------------------------------- /src/browser/images/device-icons/android-icon-48x48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/images/device-icons/android-icon-48x48.png -------------------------------------------------------------------------------- /src/browser/images/device-icons/android-icon-72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/images/device-icons/android-icon-72x72.png -------------------------------------------------------------------------------- /src/browser/images/device-icons/android-icon-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/images/device-icons/android-icon-96x96.png -------------------------------------------------------------------------------- /src/browser/images/device-icons/apple-icon-114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/images/device-icons/apple-icon-114x114.png -------------------------------------------------------------------------------- /src/browser/images/device-icons/apple-icon-120x120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/images/device-icons/apple-icon-120x120.png -------------------------------------------------------------------------------- /src/browser/images/device-icons/apple-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/images/device-icons/apple-icon-144x144.png -------------------------------------------------------------------------------- /src/browser/images/device-icons/apple-icon-152x152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/images/device-icons/apple-icon-152x152.png -------------------------------------------------------------------------------- /src/browser/images/device-icons/apple-icon-180x180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/images/device-icons/apple-icon-180x180.png -------------------------------------------------------------------------------- /src/browser/images/device-icons/apple-icon-57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/images/device-icons/apple-icon-57x57.png -------------------------------------------------------------------------------- /src/browser/images/device-icons/apple-icon-60x60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/images/device-icons/apple-icon-60x60.png -------------------------------------------------------------------------------- /src/browser/images/device-icons/apple-icon-72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/images/device-icons/apple-icon-72x72.png -------------------------------------------------------------------------------- /src/browser/images/device-icons/apple-icon-76x76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/images/device-icons/apple-icon-76x76.png -------------------------------------------------------------------------------- /src/browser/styles/fonts/OpenSans-ExtraBoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/styles/fonts/OpenSans-ExtraBoldItalic.ttf -------------------------------------------------------------------------------- /src/browser/styles/fonts/OpenSans-SemiboldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/styles/fonts/OpenSans-SemiboldItalic.ttf -------------------------------------------------------------------------------- /src/browser/images/device-icons/android-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/images/device-icons/android-icon-144x144.png -------------------------------------------------------------------------------- /src/browser/images/device-icons/android-icon-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/images/device-icons/android-icon-192x192.png -------------------------------------------------------------------------------- /src/browser/styles/fonts/FiraCode/eot/FiraCode-Bold.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/styles/fonts/FiraCode/eot/FiraCode-Bold.eot -------------------------------------------------------------------------------- /src/browser/styles/fonts/FiraCode/eot/FiraCode-Light.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/styles/fonts/FiraCode/eot/FiraCode-Light.eot -------------------------------------------------------------------------------- /src/browser/styles/fonts/FiraCode/otf/FiraCode-Bold.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/styles/fonts/FiraCode/otf/FiraCode-Bold.otf -------------------------------------------------------------------------------- /src/browser/styles/fonts/FiraCode/otf/FiraCode-Light.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/styles/fonts/FiraCode/otf/FiraCode-Light.otf -------------------------------------------------------------------------------- /src/browser/styles/fonts/FiraCode/ttf/FiraCode-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/styles/fonts/FiraCode/ttf/FiraCode-Bold.ttf -------------------------------------------------------------------------------- /src/browser/styles/fonts/FiraCode/ttf/FiraCode-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/styles/fonts/FiraCode/ttf/FiraCode-Light.ttf -------------------------------------------------------------------------------- /src/browser/images/device-icons/apple-icon-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/images/device-icons/apple-icon-precomposed.png -------------------------------------------------------------------------------- /src/browser/images/northwind/product-category-supplier.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/images/northwind/product-category-supplier.png -------------------------------------------------------------------------------- /src/browser/styles/fonts/FiraCode/eot/FiraCode-Medium.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/styles/fonts/FiraCode/eot/FiraCode-Medium.eot -------------------------------------------------------------------------------- /src/browser/styles/fonts/FiraCode/eot/FiraCode-Regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/styles/fonts/FiraCode/eot/FiraCode-Regular.eot -------------------------------------------------------------------------------- /src/browser/styles/fonts/FiraCode/otf/FiraCode-Medium.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/styles/fonts/FiraCode/otf/FiraCode-Medium.otf -------------------------------------------------------------------------------- /src/browser/styles/fonts/FiraCode/otf/FiraCode-Regular.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/styles/fonts/FiraCode/otf/FiraCode-Regular.otf -------------------------------------------------------------------------------- /src/browser/styles/fonts/FiraCode/otf/FiraCode-Retina.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/styles/fonts/FiraCode/otf/FiraCode-Retina.otf -------------------------------------------------------------------------------- /src/browser/styles/fonts/FiraCode/ttf/FiraCode-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/styles/fonts/FiraCode/ttf/FiraCode-Medium.ttf -------------------------------------------------------------------------------- /src/browser/styles/fonts/FiraCode/ttf/FiraCode-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/styles/fonts/FiraCode/ttf/FiraCode-Regular.ttf -------------------------------------------------------------------------------- /src/browser/styles/fonts/FiraCode/ttf/FiraCode-Retina.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/styles/fonts/FiraCode/ttf/FiraCode-Retina.ttf -------------------------------------------------------------------------------- /src/browser/styles/fonts/FiraCode/woff/FiraCode-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/styles/fonts/FiraCode/woff/FiraCode-Bold.woff -------------------------------------------------------------------------------- /src/browser/styles/fonts/FiraCode/woff/FiraCode-Light.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/styles/fonts/FiraCode/woff/FiraCode-Light.woff -------------------------------------------------------------------------------- /src/browser/styles/fonts/FiraCode/woff/FiraCode-Medium.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/styles/fonts/FiraCode/woff/FiraCode-Medium.woff -------------------------------------------------------------------------------- /src/browser/styles/fonts/FiraCode/woff2/FiraCode-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/styles/fonts/FiraCode/woff2/FiraCode-Bold.woff2 -------------------------------------------------------------------------------- /e2e_tests/files/import.csv: -------------------------------------------------------------------------------- 1 | name,born,city,comment 2 | Molly Hane,2015,Borås,Food please 3 | Stella Hane,2012,Borås,"I like unicorns, and ""flying unicorns""" 4 | Oskar Hane,1980,Borås, 5 | -------------------------------------------------------------------------------- /src/browser/styles/fonts/FiraCode/woff/FiraCode-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/styles/fonts/FiraCode/woff/FiraCode-Regular.woff -------------------------------------------------------------------------------- /src/browser/styles/fonts/FiraCode/woff2/FiraCode-Light.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/styles/fonts/FiraCode/woff2/FiraCode-Light.woff2 -------------------------------------------------------------------------------- /src/browser/styles/fonts/FiraCode/woff2/FiraCode-Medium.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/styles/fonts/FiraCode/woff2/FiraCode-Medium.woff2 -------------------------------------------------------------------------------- /src/browser/styles/fonts/FiraCode/woff2/FiraCode-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphfoundation/ongdb-browser/HEAD/src/browser/styles/fonts/FiraCode/woff2/FiraCode-Regular.woff2 -------------------------------------------------------------------------------- /scripts/static_data/LICENSES_HEADER.txt: -------------------------------------------------------------------------------- 1 | This file contains the full license text of the included third party 2 | libraries. For an overview of the licenses see the NOTICE.txt file. 3 | 4 | 5 | ----- -------------------------------------------------------------------------------- /e2e_tests/support/index.js: -------------------------------------------------------------------------------- 1 | import './commands' 2 | import './defaults' 3 | 4 | /* global Cypress */ 5 | 6 | afterEach(function() { 7 | if (this.currentTest.state === 'failed') { 8 | Cypress.runner.stop() 9 | } 10 | }) 11 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "bracketSpacing": true, 3 | "singleQuote": true, 4 | "tabWidth": 2, 5 | "printWidth": 80, 6 | "semi": false, 7 | "trailingComma": "none", 8 | "jsxBracketSameLine": false, 9 | "arrowParens": "avoid", 10 | "jsxSingleQuote": false 11 | } 12 | -------------------------------------------------------------------------------- /src/browser/components/buttons/style.css: -------------------------------------------------------------------------------- 1 | .tooltip { 2 | position: absolute; 3 | background-color: grey; 4 | } 5 | .action { 6 | padding: 0px !important; 7 | font-size: 0.8em !important; 8 | min-width: 50px !important; 9 | } 10 | .remove { 11 | color: #bcc0c9 !important; 12 | } 13 | -------------------------------------------------------------------------------- /src/browser/icons/arrow-down-1.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/browser/icons/arrow-up-1.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/browser/icons/arrow-left-1.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/browser/icons/arrow-right-1.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:10-jessie 2 | 3 | WORKDIR /usr/src 4 | 5 | # Install dependencies 6 | COPY package.json yarn.lock ./ 7 | RUN yarn 8 | 9 | # Copy the relevant files to the working directory 10 | COPY . . 11 | 12 | # Build and export the app 13 | RUN yarn build 14 | RUN cp -R dist /public 15 | -------------------------------------------------------------------------------- /src/browser/modules/Stream/__snapshots__/HistoryRow.test.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`HistoryRow triggers function on click 1`] = ` 4 |
5 |
  • 8 | :clear 9 |
  • 10 |
    11 | `; 12 | -------------------------------------------------------------------------------- /src/browser/images/device-icons/browserconfig.xml: -------------------------------------------------------------------------------- 1 | 2 | #ffffff -------------------------------------------------------------------------------- /src/browser/manifest-base.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ONgDB Browser", 3 | "short_name": "ONgDB Browser", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#fff", 7 | "icons": [ 8 | { 9 | "src": "./assets/images/device-icons/ongdb-desktop.svg", 10 | "type": "svg" 11 | } 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /src/browser/icons/close.svg: -------------------------------------------------------------------------------- 1 | close -------------------------------------------------------------------------------- /scripts/static_data/external_dependencies.js: -------------------------------------------------------------------------------- 1 | module.exports = [ 2 | ['font-awesome', 'Font Awesome', 'SIL OFL 1.1'], 3 | ['font-awesome-css', 'Font Awesome CSS', 'MIT'], 4 | ['bootstrap', 'bootstrap', 'MIT'], 5 | // ['inconsolata', 'Inconsolata Font', 'SIL OFL 1.1'], 6 | ['fira-code', 'Fira Code', 'SIL OFL 1.1'], 7 | ['open-sans', 'Open Sans Font', 'SIL OFL 1.1'] 8 | ] 9 | -------------------------------------------------------------------------------- /src/browser/modules/Stream/Extras/SnakeFrame/Score.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | const Score = ({ score, initialLoad, playing }) => { 4 | if (initialLoad) { 5 | return null 6 | } 7 | return ( 8 |

    9 | {playing ? 'Current' : 'Final'} score: {score} 10 |

    11 | ) 12 | } 13 | 14 | export default Score 15 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | npm-debug.log 3 | coverage/ 4 | test-report.json 5 | .DS_Store 6 | .vscode 7 | /yarn-error.log 8 | .idea/ 9 | *.iml 10 | /build 11 | /bundle-report.html 12 | /target 13 | /e2e_tests/screenshots/ 14 | /e2e_tests/videos/ 15 | mvn/ 16 | dist/ 17 | NOTICE.xml 18 | *.tgz 19 | *.tar.gz 20 | release-notes.md 21 | /stats.json 22 | signature.pem 23 | HEAD 24 | -------------------------------------------------------------------------------- /src/browser/icons/controls-play.svg: -------------------------------------------------------------------------------- 1 | controls-play -------------------------------------------------------------------------------- /src/browser/icons/button-refresh-arrow.svg: -------------------------------------------------------------------------------- 1 | button-refresh-arrow -------------------------------------------------------------------------------- /src/browser/icons/lock-unlock.svg: -------------------------------------------------------------------------------- 1 | lock-unlock -------------------------------------------------------------------------------- /src/browser/icons/cloud-check.svg: -------------------------------------------------------------------------------- 1 | cloud-check -------------------------------------------------------------------------------- /src/browser/icons/download-bottom.svg: -------------------------------------------------------------------------------- 1 | download-bottom -------------------------------------------------------------------------------- /src/browser/icons/shrink.svg: -------------------------------------------------------------------------------- 1 | shrink-2 -------------------------------------------------------------------------------- /src/browser/icons/pencil.svg: -------------------------------------------------------------------------------- 1 | pencil -------------------------------------------------------------------------------- /src/browser/styles/utils.js: -------------------------------------------------------------------------------- 1 | export const hexToRgba = (hex, opacity = 1) => { 2 | const localHex = hex.replace( 3 | /^#?([a-f\d])([a-f\d])([a-f\d])$/i, 4 | (m, r, g, b) => r + r + g + g + b + b 5 | ) 6 | const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(localHex) 7 | return result 8 | ? `rgba(${parseInt(result[1], 16)}, ${parseInt(result[2], 16)}, ${parseInt( 9 | result[3], 10 | 16 11 | )}, ${opacity})` 12 | : '' 13 | } 14 | -------------------------------------------------------------------------------- /src/browser/icons/cloud-remove.svg: -------------------------------------------------------------------------------- 1 | cloud-remove -------------------------------------------------------------------------------- /src/browser/icons/rating-star.svg: -------------------------------------------------------------------------------- 1 | rating-star -------------------------------------------------------------------------------- /src/browser/icons/app-window-code.svg: -------------------------------------------------------------------------------- 1 | app-window-code -------------------------------------------------------------------------------- /src/browser/icons/book-search.svg: -------------------------------------------------------------------------------- 1 | book-search -------------------------------------------------------------------------------- /src/browser/icons/pin.svg: -------------------------------------------------------------------------------- 1 | pin -------------------------------------------------------------------------------- /src/browser/styles/inconsolata.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'Inconsolata'; 3 | font-style: normal; 4 | font-weight: 400; 5 | src: local('Inconsolata Regular'), local('Inconsolata-Regular'), 6 | url('fonts/Inconsolata-Regular.ttf') format('truetype'); 7 | } 8 | 9 | @font-face { 10 | font-family: 'Inconsolata'; 11 | font-style: normal; 12 | font-weight: 700; 13 | src: local('Inconsolata Bold'), local('Inconsolata-Bold'), 14 | url('fonts/Inconsolata-Bold.ttf') format('truetype'); 15 | } 16 | -------------------------------------------------------------------------------- /src/shared/services/cypherErrorsHelper.js: -------------------------------------------------------------------------------- 1 | export const isUnknownProcedureError = ({ code }) => 2 | code === 'Neo.ClientError.Procedure.ProcedureNotFound' 3 | 4 | export const isNoDbAccessError = ({ code, message }) => 5 | code === 'Neo.ClientError.Security.Forbidden' && 6 | /Database access is not allowed/i.test(message) 7 | 8 | export const isPeriodicCommitError = ({ code, message }) => 9 | code === 'Neo.ClientError.Statement.SemanticError' && 10 | /in an open transaction is not possible/i.test(message) 11 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | __mocks__/ 2 | .github/ 3 | auth_server/ 4 | browser/ 5 | e2e_tests/ 6 | mvn/ 7 | scripts/ 8 | src/ 9 | target/ 10 | cypress/ 11 | coverage/ 12 | test_utils/ 13 | build_scripts/ 14 | .babelrc 15 | .eslintignore 16 | .eslintrc.json 17 | .yarnrc 18 | cypress.json 19 | jsconfig.json 20 | pom.xml 21 | postcss.config.js 22 | yarn.lock 23 | README.md 24 | bundle-report.html 25 | now.json 26 | yarn-error.log 27 | *.tgz 28 | jest.config.js 29 | .babelrc.js 30 | .vscode 31 | Dockerfile 32 | NOTICE.xml 33 | HEAD 34 | babel.config.js 35 | -------------------------------------------------------------------------------- /src/browser/icons/expand-01.svg: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | expand 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/browser/icons/eraser-2.svg: -------------------------------------------------------------------------------- 1 | eraser-2 -------------------------------------------------------------------------------- /src/browser/icons/hierarchy-8.svg: -------------------------------------------------------------------------------- 1 | hierarchy-8 -------------------------------------------------------------------------------- /src/browser/modules/Stream/Errors/IESecurityErrors.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | export const IESecurityError18 = ( 3 | 4 | Unable to connect to local intranet. This is a known error when using 5 | Internet Explorer. For more help resolving this issue{' '} 6 | 11 | click here 12 | 13 | 14 | ) 15 | -------------------------------------------------------------------------------- /src/browser/icons/task-list-download.svg: -------------------------------------------------------------------------------- 1 | task-list-download -------------------------------------------------------------------------------- /src/browser/icons/camera-studio.svg: -------------------------------------------------------------------------------- 1 | camera-studio -------------------------------------------------------------------------------- /src/browser/icons/cloud-sync.svg: -------------------------------------------------------------------------------- 1 | cloud-sync -------------------------------------------------------------------------------- /src/browser/components/Accordion/styled.jsx: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components' 2 | 3 | export const BorderedWrapper = styled.div` 4 | border-left: 1px solid rgba(34, 36, 38, 0.15); 5 | border-right: 1px solid rgba(34, 36, 38, 0.15); 6 | border-bottom: 1px solid rgba(34, 36, 38, 0.15); 7 | ` 8 | 9 | export const TitleBar = styled.div` 10 | border-top: 1px solid rgba(34, 36, 38, 0.15); 11 | height: 39px; 12 | display: flex; 13 | cursor: pointer; 14 | ` 15 | 16 | export const ContentArea = styled.div` 17 | background-color: white; 18 | min-height: 50px; 19 | ` 20 | -------------------------------------------------------------------------------- /src/browser/icons/Text2-01.svg: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | Text2 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/browser/icons/skip-prev.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "include": ["src/**/*"], 3 | "compilerOptions": { 4 | "target": "ES6", 5 | "allowSyntheticDefaultImports": true, 6 | "baseUrl": "src/", 7 | "checkJs": false, 8 | "jsx": "react", 9 | "paths": { 10 | "services/*": ["shared/services/*"], 11 | "browser-services/*": ["browser/services/*"], 12 | "shared/*": ["shared/*"], 13 | "browser-components/*": ["browser/components/*"], 14 | "browser-hooks/*": ["browser/hooks/*"], 15 | "browser/*": ["browser/*"], 16 | "browser-styles/*": ["browser/styles/*"] 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/browser/icons/layers-hide.svg: -------------------------------------------------------------------------------- 1 | layers-hide -------------------------------------------------------------------------------- /auth_server/keys/cert.csr: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE REQUEST----- 2 | MIIBhDCB7gIBADBFMQswCQYDVQQGEwJTRTETMBEGA1UECBMKU29tZS1TdGF0ZTEh 3 | MB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIGfMA0GCSqGSIb3DQEB 4 | AQUAA4GNADCBiQKBgQCaVADtpr4KlR0nDQAT5zdDu77iMJcvAJnAeJFK7HixPkRL 5 | sFHpZwi9BnffnGnF3vKtRn+K5KS02kZrCiOxCK9Q9uu4iPL1WBUx/MHOq1CSxzHK 6 | Eja4JDwexYx+pQ747bAguAtFbo0eoXJgrM/31wJQPyj+FCw15A9CsyKPfp2QKQID 7 | AQABoAAwDQYJKoZIhvcNAQEFBQADgYEADR6NbutYai6VXkvFh5UHjJSvOji3+RwC 8 | ttu4sPlY3+qR4e13JYItTvuRqyrY8U2Amg1Zk8lUdufkNl7vMB/rdHbMzLgVzCU9 9 | HdJ9c/svCqTh9Ek6U1Ur3YXww6O3t624y8uCI1A0p6x25GSFMrnwO2Y6h6RfIRh9 10 | BGcZR+izRY0= 11 | -----END CERTIFICATE REQUEST----- 12 | -------------------------------------------------------------------------------- /src/browser/components/InputEnterStepping/__snapshots__/InputEnterStepping.test.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`focuses correctly and submits on enter in last input 1`] = ` 4 |
    5 | 8 | 11 |
    12 | `; 13 | 14 | exports[`renders the render prop 1`] = ` 15 |
    16 |
    17 | hello 18 |
    19 |
    20 | `; 21 | 22 | exports[`submits on button click 1`] = ` 23 |
    24 | 27 | 30 | 33 |
    34 | `; 35 | -------------------------------------------------------------------------------- /auth_server/server.js: -------------------------------------------------------------------------------- 1 | var express = require('express') 2 | var https = require('https') 3 | var fs = require('fs') 4 | const path = require('path') 5 | var app = express() 6 | 7 | app.use(express.static(path.join(__dirname, './public'))) 8 | 9 | var options = { 10 | key: fs.readFileSync(path.join(__dirname, './keys/private.key')), 11 | cert: fs.readFileSync(path.join(__dirname, './keys/certificate.pem')) 12 | } 13 | var secureServer = https.createServer(options, app).listen(9001, function () { 14 | var host = secureServer.address().address 15 | var port = secureServer.address().port 16 | 17 | console.log('Sync server listening at https://%s:%s', host, port) 18 | }) 19 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | const isTest = String(process.env.NODE_ENV) === 'test' // Jest sets this 2 | 3 | const toExport = { 4 | plugins: [ 5 | 'react-hot-loader/babel', 6 | 'styled-components', 7 | '@babel/plugin-proposal-class-properties', 8 | 'babel-plugin-dynamic-import-node' 9 | ], 10 | presets: [ 11 | '@babel/preset-react', 12 | [ 13 | '@babel/preset-env', 14 | { 15 | useBuiltIns: 'entry', 16 | corejs: 3, 17 | modules: isTest ? 'commonjs' : false, 18 | targets: { 19 | browsers: ['last 1 version', 'ie >= 11'] 20 | } 21 | } 22 | ] 23 | ] 24 | } 25 | 26 | module.exports = toExport 27 | -------------------------------------------------------------------------------- /src/browser/icons/database-check.svg: -------------------------------------------------------------------------------- 1 | database-check -------------------------------------------------------------------------------- /src/browser/icons/monitor-heart-beat.svg: -------------------------------------------------------------------------------- 1 | monitor-heart-beat -------------------------------------------------------------------------------- /src/browser/icons/table-01.svg: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | table 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /e2e_tests/plugins/index.js: -------------------------------------------------------------------------------- 1 | // *********************************************************** 2 | // This example plugins/index.js can be used to load plugins 3 | // 4 | // You can change the location of this file or turn off loading 5 | // the plugins file with the 'pluginsFile' configuration option. 6 | // 7 | // You can read more here: 8 | // https://on.cypress.io/plugins-guide 9 | // *********************************************************** 10 | 11 | // This function is called when a project is opened or re-opened (e.g. due to 12 | // the project's config changing) 13 | 14 | module.exports = (on, config) => { 15 | // `on` is used to hook into various events Cypress emits 16 | // `config` is the resolved Cypress config 17 | } 18 | -------------------------------------------------------------------------------- /src/browser/icons/shop-1.svg: -------------------------------------------------------------------------------- 1 | shop-1 -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 12 | 13 | -------------------------------------------------------------------------------- /src/browser/modules/DBMSInfo/style_meta.css: -------------------------------------------------------------------------------- 1 | .section { 2 | padding: 10px 0 !important; 3 | color: white !important; 4 | } 5 | 6 | .wrapper { 7 | display: flex; 8 | flex-wrap: wrap; 9 | } 10 | 11 | .label-wrapper { 12 | .chip { 13 | border-radius: 20px !important; 14 | } 15 | } 16 | 17 | .relationship-wrapper { 18 | .chip { 19 | border-radius: 3px !important; 20 | } 21 | } 22 | 23 | .property-key-wrapper { 24 | .chip { 25 | border-radius: 2px !important; 26 | background-color: transparent !important; 27 | border: 1px solid #ccc !important; 28 | span { 29 | color: #ccc !important; 30 | } 31 | } 32 | } 33 | 34 | .chip { 35 | margin: 4px !important; 36 | padding: 0 !important; 37 | span { 38 | line-height: normal !important; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/browser/styles/animations.js: -------------------------------------------------------------------------------- 1 | import { keyframes } from 'styled-components' 2 | 3 | export const fadeInLeft = keyframes` 4 | from { 5 | opacity: 0; 6 | transform: translate3d(-50%, 0, 0); 7 | } 8 | 9 | to { 10 | opacity: 1; 11 | transform: translate3d(0, 0, 0); 12 | } 13 | ` 14 | 15 | export const pulse = keyframes` 16 | 0%, 90% { 17 | transform: scale3d(1, 1, 1); 18 | } 19 | 20 | 95% { 21 | transform: scale3d(1.05, 1.05, 1.05); 22 | } 23 | 24 | 100% { 25 | transform: scale3d(1, 1, 1); 26 | } 27 | ` 28 | 29 | export const bounceRight = keyframes` 30 | 0%, 90% { 31 | transform: translate3d(0, 0, 0); 32 | } 33 | 34 | 95% { 35 | transform: translate3d(5px, 0, 0); 36 | } 37 | 38 | 100% { 39 | transform: translate3d(0, 0, 0); 40 | } 41 | ` 42 | -------------------------------------------------------------------------------- /src/browser/icons/hierarchy-9.svg: -------------------------------------------------------------------------------- 1 | hierarchy-9 -------------------------------------------------------------------------------- /auth_server/keys/certificate.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICATCCAWoCCQCTS5Hk7nWnBDANBgkqhkiG9w0BAQUFADBFMQswCQYDVQQGEwJT 3 | RTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0 4 | cyBQdHkgTHRkMB4XDTE1MTIwNzEzMjkzMFoXDTE2MDEwNjEzMjkzMFowRTELMAkG 5 | A1UEBhMCU0UxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNVBAoTGEludGVybmV0 6 | IFdpZGdpdHMgUHR5IEx0ZDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAmlQA 7 | 7aa+CpUdJw0AE+c3Q7u+4jCXLwCZwHiRSux4sT5ES7BR6WcIvQZ335xpxd7yrUZ/ 8 | iuSktNpGawojsQivUPbruIjy9VgVMfzBzqtQkscxyhI2uCQ8HsWMfqUO+O2wILgL 9 | RW6NHqFyYKzP99cCUD8o/hQsNeQPQrMij36dkCkCAwEAATANBgkqhkiG9w0BAQUF 10 | AAOBgQBF/uW6LdQ8Iwq1VmV41ngiv4dQgeSjoN+3sFA8xScADdBF3RSLXuULNzeU 11 | aUkdqWltGY3ehA800sYf+dttvGFXCCQ8o8TuZwoxUv3RO7SRlQqS+YO8rNuyrFcj 12 | eYr+XLXXkMiLNS2c8A26mZUSXvqDBowK4USykyCub9uoWNvYKw== 13 | -----END CERTIFICATE----- 14 | -------------------------------------------------------------------------------- /scripts/generate_licenses.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | NOTICE_FILE="./NOTICE.txt" 4 | NOTICE_FILE_XML="./NOTICE.xml" 5 | LICENSES_FILE="./LICENSES.txt" 6 | 7 | # Generate NOTICE.txt with list of dependencies and their license 8 | # Limit to runtime dependencies 9 | cat ./scripts/static_data/NOTICE_HEADER.txt > $NOTICE_FILE && yarn licenses list --production >> $NOTICE_FILE; 10 | cat ./scripts/static_data/NOTICE_XML_HEADER.txt > $NOTICE_FILE_XML && yarn licenses list --production --json --no-progress | node ./scripts/generate_licenses_xml.js >> $NOTICE_FILE_XML; 11 | 12 | # Generate LICENSES.txt with list of full text version of the licenses that dependecies use 13 | # Limit to runtime licenses 14 | cat ./scripts/static_data/LICENSES_HEADER.txt > $LICENSES_FILE && yarn licenses generate-disclaimer --production >> $LICENSES_FILE; 15 | 16 | exit 0; -------------------------------------------------------------------------------- /src/shared/modules/settings/__snapshots__/settingsDuck.test.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`settings reducer handles REPLACE 1`] = ` 4 | Object { 5 | "autoComplete": true, 6 | "browserSyncDebugServer": null, 7 | "cmdchar": ":", 8 | "codeFontLigatures": true, 9 | "connectionTimeout": 30000, 10 | "editorAutocomplete": true, 11 | "editorLint": false, 12 | "enableMultiStatementMode": true, 13 | "initCmd": ":play start", 14 | "initialNodeDisplay": 300, 15 | "maxFieldItems": 500, 16 | "maxFrames": 30, 17 | "maxHistory": 30, 18 | "maxNeighbours": 100, 19 | "maxRows": 1000, 20 | "new": "conf", 21 | "playImplicitInitCommands": true, 22 | "scrollToTop": true, 23 | "shouldReportUdc": true, 24 | "showSampleScripts": true, 25 | "theme": "auto", 26 | "useCypherThread": true, 27 | } 28 | `; 29 | -------------------------------------------------------------------------------- /src/browser/modules/FeatureToggle/FeatureToggle.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { Consumer } from './FeatureToggleProvider' 3 | 4 | const FeatureToggle = ({ name, on, off }) => { 5 | return ( 6 | 7 | {showFeature => { 8 | if (!name) { 9 | throw new Error( 10 | 'No "name" property provided to FeatureToggle component.' 11 | ) 12 | } 13 | const shouldShow = showFeature(name) 14 | if (!shouldShow && !off) { 15 | return null 16 | } 17 | if (shouldShow && !on) { 18 | throw new Error( 19 | `No "on" property available for this enabled feature: ${name} for FeatureToggle component.` 20 | ) 21 | } 22 | return shouldShow ? on : off 23 | }} 24 | 25 | ) 26 | } 27 | 28 | export default FeatureToggle 29 | -------------------------------------------------------------------------------- /src/browser/icons/cog.svg: -------------------------------------------------------------------------------- 1 | cog -------------------------------------------------------------------------------- /src/shared/modules/stream/__snapshots__/streamDuck.test.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`streamDuck cuts the number of frames when config is set 1`] = ` 4 | Array [ 5 | 1, 6 | ] 7 | `; 8 | 9 | exports[`streamDuck cuts the number of frames when config is set 2`] = ` 10 | Object { 11 | "1": Object { 12 | "stack": Array [ 13 | Object { 14 | "id": 1, 15 | }, 16 | ], 17 | }, 18 | } 19 | `; 20 | 21 | exports[`streamDuck dont remove pinned frames when cutting frames 1`] = ` 22 | Array [ 23 | 1, 24 | 2, 25 | ] 26 | `; 27 | 28 | exports[`streamDuck dont remove pinned frames when cutting frames 2`] = ` 29 | Object { 30 | "1": Object { 31 | "isPinned": 1, 32 | "stack": Array [ 33 | Object {}, 34 | ], 35 | }, 36 | "2": Object { 37 | "isPinned": 1, 38 | "stack": Array [ 39 | Object {}, 40 | ], 41 | }, 42 | } 43 | `; 44 | -------------------------------------------------------------------------------- /scripts/static_data/NOTICE_XML_HEADER.txt: -------------------------------------------------------------------------------- 1 | 2 | 23 | -------------------------------------------------------------------------------- /auth_server/keys/private.key: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIICXAIBAAKBgQCaVADtpr4KlR0nDQAT5zdDu77iMJcvAJnAeJFK7HixPkRLsFHp 3 | Zwi9BnffnGnF3vKtRn+K5KS02kZrCiOxCK9Q9uu4iPL1WBUx/MHOq1CSxzHKEja4 4 | JDwexYx+pQ747bAguAtFbo0eoXJgrM/31wJQPyj+FCw15A9CsyKPfp2QKQIDAQAB 5 | AoGAY/xgzZfmMD0DsjU+A6cdqwiMV0db69vbwVNb7sreNxc8cD1AFJPomW8DYyCX 6 | dtdHKvQt1fLkszdnwBnFngEec7iXjAGK8Rw5eRHmduC68nPyCoghR8dfCbbAM2Yc 7 | QqQBvCqfZEMUB+JRfJwF/0MXAoYX63oPzYW5NKVLOuSG6gECQQDNGBkyOZEwPIqf 8 | y/WomiixIIMm/YBK4KpXpsPaYsh3BydBY+9POu+LbUqeVVF5sWsjGBEPA9aArnPz 9 | rqDDNtSZAkEAwKIt6Sr3JxVGj9+t/bWZbybrQwiyF+AK4iD+7o98W4bAbNEQswK5 10 | q9NEbJE0EYDOKvrNIDJujGiVQy3+HrpCEQJBALiZdDRMtG3iUDO8dQSonO+w/9tc 11 | WNkMlsYGCErMlvrrqV2mAYQi2/F3Ea6pxIfwNSqFQvVs0ulIHH29NF4BQCECQA5u 12 | mB31+BpXf7fbvD9b0akAM3QMPLuJL4eNjUv2OAzrZZNBfozK0XpME75Giq4dBlU2 13 | ARQ+cwXV+AjWc0l+DuECQAXNhoMmLh4mcGM7x6+JIVBuSjge8oXyqluBYmDIaf9q 14 | 86qcuguze9ZTS4C5rgqCOP5jeilZGtRemLpoT6xZ1/Y= 15 | -----END RSA PRIVATE KEY----- 16 | -------------------------------------------------------------------------------- /cypress.json: -------------------------------------------------------------------------------- 1 | { 2 | "animationDistanceThreshold": 5, 3 | "baseUrl": "http://localhost:8080", 4 | "chromeWebSecurity": false, 5 | "defaultCommandTimeout": 4000, 6 | "environmentVariables": {}, 7 | "execTimeout": 60000, 8 | "fileServerFolder": "", 9 | "fixturesFolder": "e2e_tests/fixtures", 10 | "hosts": null, 11 | "integrationFolder": "e2e_tests/integration", 12 | "numTestsKeptInMemory": 50, 13 | "pageLoadTimeout": 60000, 14 | "pluginsFile": "e2e_tests/plugins/index.js", 15 | "port": null, 16 | "reporter": "spec", 17 | "reporterOptions": null, 18 | "requestTimeout": 5000, 19 | "responseTimeout": 30000, 20 | "screenshotsFolder": "e2e_tests/screenshots", 21 | "supportFile": "e2e_tests/support", 22 | "trashAssetsBeforeRuns": true, 23 | "videoCompression": 32, 24 | "video": true, 25 | "videosFolder": "e2e_tests/videos", 26 | "viewportHeight": 720, 27 | "viewportWidth": 1280, 28 | "waitForAnimations": true, 29 | "watchForFileChanges": true 30 | } 31 | -------------------------------------------------------------------------------- /src/browser/modules/ClickToCode/__snapshots__/index.test.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`ClickToCode does not render if no children 1`] = `
    `; 4 | 5 | exports[`ClickToCode renders all children 1`] = ` 6 |
    7 | 10 |
    11 | 12 | hello 13 | 14 | hi! 15 |
    16 |
    17 |
    18 | `; 19 | 20 | exports[`ClickToCode renders children as code if no code is provided 1`] = ` 21 |
    22 | 25 | hellohi! 26 | 27 |
    28 | `; 29 | 30 | exports[`ClickToCode renders code as the code when code is available 1`] = ` 31 |
    32 | 35 | hello 36 | 37 |
    38 | `; 39 | 40 | exports[`ClickToCode renders if no CodeComponent is provided 1`] = `
    `; 41 | -------------------------------------------------------------------------------- /src/browser/modules/Stream/CypherScriptFrame/styled.jsx: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components' 2 | import { StyledFrameCommand } from 'browser/modules/Frame/styled' 3 | import { StyledStatsBar } from 'browser/modules/Stream/styled' 4 | 5 | export const WrapperCenter = styled.div` 6 | display: flex; 7 | width: 90%; 8 | margin: 35px auto; 9 | ` 10 | 11 | export const ContentSizer = styled.div` 12 | flex: 1; 13 | min-width: 0; 14 | ` 15 | 16 | export const MessageArea = styled.pre` 17 | padding-left: 10px; 18 | background-color: ${props => props.theme.preBackground}; 19 | white-space: pre-wrap; 20 | ` 21 | 22 | export const PaddedStatsBar = styled(StyledStatsBar)` 23 | padding: 0 15px 15px 24px; 24 | ` 25 | 26 | export const PointerFrameCommand = styled(StyledFrameCommand)` 27 | cursor: pointer; 28 | ` 29 | 30 | export const WarningSpan = styled.span` 31 | color: ${props => props.theme.warning}; 32 | ` 33 | export const ErrorSpan = styled.span` 34 | color: ${props => props.theme.error}; 35 | ` 36 | export const SuccessSpan = styled.span` 37 | color: ${props => props.theme.success}; 38 | ` 39 | -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "parser": "babel-eslint", 3 | "extends": ["plugin:react/recommended", "prettier"], 4 | "parserOptions": { 5 | "sourceType": "module" 6 | }, 7 | "rules": { 8 | "no-case-declarations": "off", 9 | "no-prototype-builtins": "off", 10 | "prefer-const": "off", 11 | "no-async-promise-executor": "off", 12 | "react/jsx-handler-names": "off", 13 | "react/jsx-fragments": "off", 14 | "react/prop-types": "off", 15 | "react/jsx-no-target-blank": "off", 16 | "react/jsx-indent": "off", 17 | "react/no-deprecated": "warn", 18 | "react/display-name": "warn", 19 | "react/no-unescaped-entities": "off", 20 | "import/no-webpack-loader-syntax": "off" 21 | }, 22 | "globals": { 23 | "it": true, 24 | "describe": true, 25 | "test": true, 26 | "jest": true, 27 | "expect": true, 28 | "beforeAll": true, 29 | "afterAll": true, 30 | "beforeEach": true, 31 | "afterEach": true, 32 | "neo": true, 33 | "FileReader": true, 34 | "Blob": true, 35 | "fetch": true 36 | }, 37 | "settings": { 38 | "react": { 39 | "version": "16.9.0" 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /scripts/static_data/NOTICE_HEADER.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2002-2020 "Neo4j," 2 | Neo4j Sweden AB [http://neo4j.com] 3 | 4 | This product includes software ("Software") developed by Neo Technology. 5 | 6 | The copyright in the bundled Neo4j graph database (including the 7 | Software) is owned by Neo Technology. The Software developed and owned 8 | by Neo Technology is licensed under the GNU GENERAL PUBLIC LICENSE 9 | Version 3 (http://www.fsf.org/licensing/licenses/gpl-3.0.html) ("GPL") 10 | to all third parties and that license, as required by the GPL, is 11 | included in the LICENSE.txt file. 12 | 13 | However, if you have executed an End User Software License and Services 14 | Agreement or an OEM Software License and Support Services Agreement, or 15 | another commercial license agreement with Neo Technology or one of its 16 | affiliates (each, a "Commercial Agreement"), the terms of the license in 17 | such Commercial Agreement will supersede the GPL and you may use the 18 | software solely pursuant to the terms of the relevant Commercial 19 | Agreement. 20 | 21 | Full license texts are found in LICENSES.txt. 22 | 23 | Third-party licenses 24 | -------------------- 25 | -------------------------------------------------------------------------------- /src/browser/images/device-icons/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ONgDB Browser", 3 | "icons": [ 4 | { 5 | "src": "/images/device-icons/android-chrome-36x36.png", 6 | "sizes": "36x36", 7 | "type": "image/png", 8 | "density": "0.75" 9 | }, 10 | { 11 | "src": "/images/device-icons/android-chrome-48x48.png", 12 | "sizes": "48x48", 13 | "type": "image/png", 14 | "density": "1.0" 15 | }, 16 | { 17 | "src": "/images/device-icons/android-chrome-72x72.png", 18 | "sizes": "72x72", 19 | "type": "image/png", 20 | "density": "1.5" 21 | }, 22 | { 23 | "src": "/images/device-icons/android-chrome-96x96.png", 24 | "sizes": "96x96", 25 | "type": "image/png", 26 | "density": "2.0" 27 | }, 28 | { 29 | "src": "/images/device-icons/android-chrome-144x144.png", 30 | "sizes": "144x144", 31 | "type": "image/png", 32 | "density": "3.0" 33 | }, 34 | { 35 | "src": "/images/device-icons/android-chrome-192x192.png", 36 | "sizes": "192x192", 37 | "type": "image/png", 38 | "density": "4.0" 39 | } 40 | ] 41 | } 42 | -------------------------------------------------------------------------------- /src/browser/modules/FeatureToggle/FeatureToggleProvider.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { connect } from 'react-redux' 3 | import { getExperimentalFeatures } from 'shared/modules/experimentalFeatures/experimentalFeaturesDuck' 4 | 5 | const FeatureToggleContext = new React.createContext(() => true) // eslint-disable-line new-cap 6 | 7 | class FeatureToggleProvider extends React.Component { 8 | showFeature = featureName => { 9 | if ( 10 | !this.props.features || 11 | !this.props.features.hasOwnProperty(featureName) 12 | ) { 13 | return true 14 | } 15 | return !!this.props.features[featureName].on 16 | } 17 | 18 | render() { 19 | return ( 20 | 21 | {this.props.children} 22 | 23 | ) 24 | } 25 | } 26 | 27 | const mapStateToProps = state => { 28 | const features = getExperimentalFeatures(state) 29 | return { 30 | features 31 | } 32 | } 33 | 34 | const Consumer = FeatureToggleContext.Consumer 35 | 36 | export default connect(mapStateToProps)(FeatureToggleProvider) 37 | export { Consumer, FeatureToggleProvider } 38 | -------------------------------------------------------------------------------- /auth_server/public/silentAuthNewBrowser.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /src/browser/modules/Stream/Queries/toggleStyles.css: -------------------------------------------------------------------------------- 1 | .toggle-check-input { 2 | width: 1px; 3 | height: 1px; 4 | position: absolute; 5 | display: none; 6 | } 7 | 8 | .toggle-check-text { 9 | display: inline-block; 10 | position: relative; 11 | text-transform: uppercase; 12 | background: #ccc; 13 | padding: 0.25em 0.5em 0.25em 1.75em; 14 | border-radius: 1em; 15 | width: 50px; 16 | height: 21px; 17 | color: #fff; 18 | cursor: pointer; 19 | transition: background-color 0.15s; 20 | line-height: initial; 21 | } 22 | .toggle-check-text:after { 23 | content: ' '; 24 | display: block; 25 | background: #fff; 26 | width: 1.1em; 27 | height: 1.1em; 28 | border-radius: 1em; 29 | position: absolute; 30 | left: 0.3em; 31 | top: 0.25em; 32 | transition: left 0.15s, margin-left 0.15s; 33 | } 34 | .toggle-check-text:before { 35 | font-size: 90%; 36 | content: 'OFF'; 37 | } 38 | .toggle-check-input:checked ~ .toggle-check-text { 39 | color: #319113; 40 | padding-left: 0.5em; 41 | padding-right: 2em; 42 | } 43 | .toggle-check-input:checked ~ .toggle-check-text:before { 44 | font-size: 90%; 45 | content: 'ON'; 46 | } 47 | 48 | .toggle-check-input:checked ~ .toggle-check-text:after { 49 | left: 100%; 50 | margin-left: -1.4em; 51 | } 52 | -------------------------------------------------------------------------------- /src/browser/modules/Stream/AutoRefresh/toggleStyles.css: -------------------------------------------------------------------------------- 1 | .toggle-check-input { 2 | width: 1px; 3 | height: 1px; 4 | position: absolute; 5 | display: none; 6 | } 7 | 8 | .toggle-check-text { 9 | display: inline-block; 10 | position: relative; 11 | text-transform: uppercase; 12 | background: #ccc; 13 | padding: 0.25em 0.5em 0.25em 1.75em; 14 | border-radius: 1em; 15 | width: 50px; 16 | height: 21px; 17 | color: #fff; 18 | cursor: pointer; 19 | transition: background-color 0.15s; 20 | line-height: initial; 21 | } 22 | .toggle-check-text:after { 23 | content: ' '; 24 | display: block; 25 | background: #fff; 26 | width: 1.1em; 27 | height: 1.1em; 28 | border-radius: 1em; 29 | position: absolute; 30 | left: 0.3em; 31 | top: 0.25em; 32 | transition: left 0.15s, margin-left 0.15s; 33 | } 34 | .toggle-check-text:before { 35 | font-size: 90%; 36 | content: 'OFF'; 37 | } 38 | .toggle-check-input:checked ~ .toggle-check-text { 39 | color: #319113; 40 | padding-left: 0.5em; 41 | padding-right: 2em; 42 | } 43 | .toggle-check-input:checked ~ .toggle-check-text:before { 44 | font-size: 90%; 45 | content: 'ON'; 46 | } 47 | 48 | .toggle-check-input:checked ~ .toggle-check-text:after { 49 | left: 100%; 50 | margin-left: -1.4em; 51 | } 52 | -------------------------------------------------------------------------------- /e2e_tests/support/defaults.js: -------------------------------------------------------------------------------- 1 | /* global Cypress */ 2 | 3 | Cypress.config('serverVersion', parseFloat(Cypress.env('server')) || 3.4) 4 | Cypress.config('serverEdition', Cypress.env('edition') || 'enterprise') 5 | 6 | Cypress.config( 7 | 'includeImportTests', 8 | Cypress.env('include-import-tests') || false 9 | ) 10 | 11 | // Don't set initial pw on local or aura 12 | Cypress.config( 13 | 'setInitialPassword', 14 | !['local', 'aura'].includes(Cypress.env('E2E_TEST_ENV')) 15 | ) 16 | 17 | Cypress.config('url', '/') 18 | Cypress.config('password', Cypress.env('browser-password') || 'newpassword') 19 | Cypress.config( 20 | 'boltHost', 21 | Cypress.env('bolt-url') 22 | ? removeUriScheme(Cypress.env('bolt-url')).split(':')[0] 23 | : 'localhost' 24 | ) 25 | Cypress.config( 26 | 'boltPort', 27 | Cypress.env('bolt-url') 28 | ? removeUriScheme(Cypress.env('bolt-url')).split(':')[1] 29 | : 7687 30 | ) 31 | Cypress.config( 32 | 'boltUrl', 33 | Cypress.env('bolt-url') 34 | ? Cypress.env('bolt-url') 35 | : 'bolt://' + Cypress.config('boltHost') + ':' + Cypress.config('boltPort') 36 | ) 37 | 38 | function removeUriScheme(uri = '') { 39 | const SEPARATOR = '://' 40 | const [_skip, ...rest] = uri.includes(SEPARATOR) 41 | ? uri.split(SEPARATOR) 42 | : [, uri] 43 | return rest.join(SEPARATOR) 44 | } 45 | -------------------------------------------------------------------------------- /src/browser/hooks/useDetectColorScheme.js: -------------------------------------------------------------------------------- 1 | import { useState, useEffect } from 'react' 2 | 3 | // Define available themes 4 | export const colorSchemes = { 5 | DARK: '(prefers-color-scheme: dark)', 6 | LIGHT: '(prefers-color-scheme: light)' 7 | } 8 | 9 | export default function useDetectColorScheme() { 10 | const [scheme, setScheme] = useState(null) 11 | 12 | useEffect(() => { 13 | if (!window.matchMedia) { 14 | return 15 | } 16 | 17 | // The listener 18 | const listener = e => { 19 | if (!e || !e.matches) { 20 | return 21 | } 22 | const schemeNames = Object.keys(colorSchemes) 23 | for (let i = 0; i < schemeNames.length; i++) { 24 | const schemeName = schemeNames[i] 25 | if (e.media === colorSchemes[schemeName]) { 26 | setScheme(schemeName.toLowerCase()) 27 | break 28 | } 29 | } 30 | } 31 | 32 | // Add listener for all themes 33 | let activeMatches = [] 34 | Object.keys(colorSchemes).forEach(schemeName => { 35 | const mq = window.matchMedia(colorSchemes[schemeName]) 36 | mq.addListener(listener) 37 | activeMatches.push(mq) 38 | listener(mq) 39 | }) 40 | 41 | // Remove listeners, no memory leaks 42 | return () => { 43 | activeMatches.forEach(mq => mq.removeListener(listener)) 44 | activeMatches = [] 45 | } 46 | }, []) 47 | 48 | return scheme 49 | } 50 | -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | testEnvironment: 'jest-environment-jsdom', 3 | setupFiles: [ 4 | 'raf/polyfill.js', 5 | 'jest-canvas-mock', 6 | '/node_modules/regenerator-runtime/runtime' 7 | ], 8 | setupFilesAfterEnv: [require.resolve('./test_utils/setupTests.js')], 9 | testPathIgnorePatterns: [ 10 | '/e2e_tests/', 11 | '/coverage/', 12 | '/dist/', 13 | '/node_modules/' 14 | ], 15 | transformIgnorePatterns: [ 16 | '/node_modules/(?!lodash-es|@neo4j/browser-lambda-parser|react-dnd|dnd-core)' 17 | ], 18 | moduleNameMapper: { 19 | '\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga|html)$': 20 | '/test_utils/__mocks__/fileMock.js', 21 | '\\.(css|less)$': '/test_utils/__mocks__/styleMock.js', 22 | '^browser-styles(.*)$': '/src/browser/styles$1', 23 | '^browser-components(.*)$': '/src/browser/components$1', 24 | '^browser-hooks(.*)$': '/src/browser/hooks$1', 25 | 'worker-loader': '/test_utils/__mocks__/workerLoaderMock.js', 26 | 'project-root(.*)$': '$1' 27 | }, 28 | modulePaths: ['/src', '/src/shared'], 29 | collectCoverageFrom: ['**/src/**/*.js', '**/src/**/*.jsx'], 30 | coverageThreshold: { 31 | global: { 32 | statements: 45, 33 | branches: 35, 34 | functions: 35, 35 | lines: 45 36 | } 37 | }, 38 | testResultsProcessor: 'jest-bamboo-reporter' 39 | } 40 | -------------------------------------------------------------------------------- /src/browser/modules/Sidebar/__snapshots__/Settings.test.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`Settings renders with strange characters in display name 1`] = ` 4 |
    5 |
    9 |

    12 | Browser Settings 13 |

    14 |
    17 |
    20 |
    23 |
    26 | Test åäö settings 27 |
    28 |
    31 |
    35 | åäö üüü 36 |
    37 | 42 |
    43 |
    44 |
    47 |
    48 |
    49 |
    50 |
    51 | `; 52 | -------------------------------------------------------------------------------- /src/shared/services/bolt/updateStatisticsFields.js: -------------------------------------------------------------------------------- 1 | export default [ 2 | { 3 | plural: 'constraints', 4 | singular: 'constraint', 5 | verb: 'added', 6 | field: 'constraintsAdded' 7 | }, 8 | { 9 | plural: 'constraints', 10 | singular: 'constraint', 11 | verb: 'removed', 12 | field: 'constraintsRemoved' 13 | }, 14 | { 15 | plural: 'indexes', 16 | singular: 'index', 17 | verb: 'added', 18 | field: 'indexesAdded' 19 | }, 20 | { 21 | plural: 'indexes', 22 | singular: 'index', 23 | verb: 'removed', 24 | field: 'indexesRemoved' 25 | }, 26 | { plural: 'labels', singular: 'label', verb: 'added', field: 'labelsAdded' }, 27 | { 28 | plural: 'labels', 29 | singular: 'label', 30 | verb: 'removed', 31 | field: 'labelsRemoved' 32 | }, 33 | { plural: 'nodes', singular: 'node', verb: 'created', field: 'nodesCreated' }, 34 | { plural: 'nodes', singular: 'node', verb: 'deleted', field: 'nodesDeleted' }, 35 | { 36 | plural: 'properties', 37 | singular: 'property', 38 | verb: 'set', 39 | field: 'propertiesSet' 40 | }, 41 | { 42 | plural: 'relationships', 43 | singular: 'relationship', 44 | verb: 'deleted', 45 | field: 'relationshipDeleted' 46 | }, 47 | { 48 | plural: 'relationships', 49 | singular: 'relationship', 50 | verb: 'deleted', 51 | field: 'relationshipsDeleted' 52 | }, 53 | { 54 | plural: 'relationships', 55 | singular: 'relationship', 56 | verb: 'created', 57 | field: 'relationshipsCreated' 58 | } 59 | ] 60 | -------------------------------------------------------------------------------- /e2e_tests/support/utils.js: -------------------------------------------------------------------------------- 1 | /* global Cypress */ 2 | 3 | export const isEnterpriseEdition = () => 4 | Cypress.config('serverEdition') === 'enterprise' 5 | 6 | export const isAura = () => Cypress.config('serverEdition') === 'aura' 7 | 8 | export const getDesktopContext = ( 9 | config, 10 | connectionCredsType = 'host', 11 | status = 'ACTIVE' 12 | ) => ({ 13 | projects: [ 14 | { 15 | graphs: [ 16 | { 17 | status, 18 | connection: { 19 | type: 'REMOTE', 20 | configuration: { 21 | protocols: { 22 | bolt: getBoltConfig(config, connectionCredsType), 23 | http: { 24 | enabled: true, 25 | username: 'ongdb', 26 | password: config('password'), 27 | host: 'localhost', 28 | port: '7474' 29 | } 30 | } 31 | } 32 | } 33 | } 34 | ] 35 | } 36 | ] 37 | }) 38 | 39 | const getBoltConfig = (config, type) => { 40 | const obj = { 41 | enabled: true, 42 | username: 'ongdb', 43 | password: config('password'), 44 | tlsLevel: config('baseUrl').startsWith('https') ? 'REQUIRED' : 'OPTIONAL' 45 | } 46 | if (type === 'url') { 47 | obj.url = config('boltUrl') 48 | } else { 49 | obj.host = config('boltHost') 50 | obj.port = config('boltPort') 51 | } 52 | return obj 53 | } 54 | 55 | export const stripScheme = url => { 56 | const [_scheme, ...rest] = (url || '').split('://') 57 | if (!rest || !rest.length) { 58 | return _scheme 59 | } 60 | return rest.join('://') 61 | } 62 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 4 | 5 | ### Description 6 | 7 | 8 | ### Reproduce Steps 9 | 10 | 11 | ### Expected Behavior 12 | 13 | 14 | 15 | ### Current Behavior 16 | 18 | 19 | ### Can you propose a solution? 20 | 21 | What needs to be done to address this issue? Ideally, provide a pull request with a fix. 22 | 23 | ### Your Environment 24 | 25 | 26 | | software name | version 27 | | ---------------|---------- 28 | | | 29 | | OS | 30 | | Web browser | 31 | | node.js | 32 | | npm | 33 | | yarn | 34 | | ONgDB Browser | 35 | | ONgDB | 36 | 37 | ### Additional Information 38 | 39 | Any additional information, configuration or data that might be necessary to reproduce the issue. 40 | 41 | For enhancements or other issues, please describe in as much detail as possible how the app should be changed and how this would benefit users/developers. 42 | -------------------------------------------------------------------------------- /src/browser/modules/Stream/CypherFrame/__snapshots__/AsciiView.test.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`AsciiViews AsciiStatusbar displays statusBarMessage if no rows 1`] = ` 4 |
    5 |
    8 |
    11 | Completed after 10 ms. 12 |
    13 |
    14 |
    15 | `; 16 | 17 | exports[`AsciiViews AsciiStatusbar displays statusBarMessage if no rows 2`] = ` 18 |
    19 |
    22 |
    25 |
    28 | Max column width: 29 | 36 |
    37 |
    38 |
    39 |
    40 | `; 41 | 42 | exports[`AsciiViews AsciiView displays bodyMessage if no rows 1`] = ` 43 |
    44 |
    47 |
    50 | (no changes, no records) 51 |
    52 |
    53 |
    54 | `; 55 | 56 | exports[`AsciiViews AsciiView does not display bodyMessage if rows 1`] = ` 57 |
    58 |
    61 |
    62 |       ╒═══╕
    63 | │"x"│
    64 | ╞═══╡
    65 | │"y"│
    66 | └───┘
    67 |     
    68 |
    69 |
    70 | `; 71 | -------------------------------------------------------------------------------- /test_utils/__mocks__/styleMock.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018-2020 "Graph Foundation" 3 | * Graph Foundation, Inc. [https://graphfoundation.org] 4 | * 5 | * This file is part of ONgDB. 6 | * 7 | * ONgDB is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /* 21 | * Copyright (c) 2002-2020 "Neo4j," 22 | * Neo4j Sweden AB [http://neo4j.com] 23 | * 24 | * This file is part of Neo4j. 25 | * 26 | * Neo4j is free software: you can redistribute it and/or modify 27 | * it under the terms of the GNU General Public License as published by 28 | * the Free Software Foundation, either version 3 of the License, or 29 | * (at your option) any later version. 30 | * 31 | * This program is distributed in the hope that it will be useful, 32 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 33 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 34 | * GNU General Public License for more details. 35 | * 36 | * You should have received a copy of the GNU General Public License 37 | * along with this program. If not, see . 38 | */ 39 | 40 | module.exports = {} 41 | -------------------------------------------------------------------------------- /test_utils/__mocks__/workerLoaderMock.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018-2020 "Graph Foundation" 3 | * Graph Foundation, Inc. [https://graphfoundation.org] 4 | * 5 | * This file is part of ONgDB. 6 | * 7 | * ONgDB is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /* 21 | * Copyright (c) 2002-2020 "Neo4j," 22 | * Neo4j Sweden AB [http://neo4j.com] 23 | * 24 | * This file is part of Neo4j. 25 | * 26 | * Neo4j is free software: you can redistribute it and/or modify 27 | * it under the terms of the GNU General Public License as published by 28 | * the Free Software Foundation, either version 3 of the License, or 29 | * (at your option) any later version. 30 | * 31 | * This program is distributed in the hope that it will be useful, 32 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 33 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 34 | * GNU General Public License for more details. 35 | * 36 | * You should have received a copy of the GNU General Public License 37 | * along with this program. If not, see . 38 | */ 39 | 40 | module.exports = {} 41 | -------------------------------------------------------------------------------- /src/browser/components/InputEnterStepping/InputEnterStepping.jsx: -------------------------------------------------------------------------------- 1 | import { Component } from 'react' 2 | 3 | export default class InputEnterStepping extends Component { 4 | state = { 5 | initial: true 6 | } 7 | 8 | steps = [] 9 | getSubmitProps = () => { 10 | return { 11 | onClick: this.props.submitAction 12 | } 13 | } 14 | 15 | getInputPropsForIndex = (i, props = {}) => { 16 | this.steps[i] = this.steps[i] || {} 17 | const { initialFocus, ...cleanProps } = props 18 | const out = { 19 | ...cleanProps, 20 | onKeyDown: e => { 21 | // merge with users onKeyDown 22 | this.onKeyDown(e, i) 23 | props.onKeyDown && props.onKeyDown(e) 24 | } 25 | } 26 | if (initialFocus) { 27 | this.steps[i].focusOnRef = true 28 | } 29 | return out 30 | } 31 | 32 | onKeyDown = (e, i) => { 33 | if (e.keyCode === 13) { 34 | e.preventDefault() 35 | if (i !== this.steps.length - 1) { 36 | this.steps[i + 1].focusFn && this.steps[i + 1].focusFn() 37 | } else { 38 | this.props.submitAction && this.props.submitAction(e) 39 | } 40 | } 41 | } 42 | 43 | setRefForIndex = (i, ref) => { 44 | this.steps[i] = this.steps[i] || {} 45 | this.steps[i].focusFn = () => ref.focus() 46 | if (this.state.initial && this.steps[i].focusOnRef) { 47 | delete this.steps[i].focusOnRef 48 | this.setState({ initial: false }, () => { 49 | setTimeout(this.steps[i].focusFn, 0) 50 | }) 51 | } 52 | } 53 | 54 | render() { 55 | return this.props.render({ 56 | getInputPropsForIndex: this.getInputPropsForIndex, 57 | getSubmitProps: this.getSubmitProps, 58 | setRefForIndex: this.setRefForIndex 59 | }) 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/browser/modules/D3Visualization/lib/visualization/index.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018-2020 "Graph Foundation" 3 | * Graph Foundation, Inc. [https://graphfoundation.org] 4 | * 5 | * This file is part of ONgDB. 6 | * 7 | * ONgDB is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /* 21 | * Copyright (c) 2002-2020 "Neo4j," 22 | * Neo4j Sweden AB [http://neo4j.com] 23 | * 24 | * This file is part of Neo4j. 25 | * 26 | * Neo4j is free software: you can redistribute it and/or modify 27 | * it under the terms of the GNU General Public License as published by 28 | * the Free Software Foundation, either version 3 of the License, or 29 | * (at your option) any later version. 30 | * 31 | * This program is distributed in the hope that it will be useful, 32 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 33 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 34 | * GNU General Public License for more details. 35 | * 36 | * You should have received a copy of the GNU General Public License 37 | * along with this program. If not, see . 38 | */ 39 | 40 | import './d3-appendSvg.js' 41 | -------------------------------------------------------------------------------- /src/browser/modules/Stream/Extras/index.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018-2020 "Graph Foundation" 3 | * Graph Foundation, Inc. [https://graphfoundation.org] 4 | * 5 | * This file is part of ONgDB. 6 | * 7 | * ONgDB is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /* 21 | * Copyright (c) 2002-2020 "Neo4j," 22 | * Neo4j Sweden AB [http://neo4j.com] 23 | * 24 | * This file is part of Neo4j. 25 | * 26 | * Neo4j is free software: you can redistribute it and/or modify 27 | * it under the terms of the GNU General Public License as published by 28 | * the Free Software Foundation, either version 3 of the License, or 29 | * (at your option) any later version. 30 | * 31 | * This program is distributed in the hope that it will be useful, 32 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 33 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 34 | * GNU General Public License for more details. 35 | * 36 | * You should have received a copy of the GNU General Public License 37 | * along with this program. If not, see . 38 | */ 39 | 40 | export { default as SnakeFrame } from './SnakeFrame' 41 | -------------------------------------------------------------------------------- /src/shared/modules/cypher/procedureFactory.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018-2020 "Graph Foundation" 3 | * Graph Foundation, Inc. [https://graphfoundation.org] 4 | * 5 | * This file is part of ONgDB. 6 | * 7 | * ONgDB is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /* 21 | * Copyright (c) 2002-2020 "Neo4j," 22 | * Neo4j Sweden AB [http://neo4j.com] 23 | * 24 | * This file is part of Neo4j. 25 | * 26 | * Neo4j is free software: you can redistribute it and/or modify 27 | * it under the terms of the GNU General Public License as published by 28 | * the Free Software Foundation, either version 3 of the License, or 29 | * (at your option) any later version. 30 | * 31 | * This program is distributed in the hope that it will be useful, 32 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 33 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 34 | * GNU General Public License for more details. 35 | * 36 | * You should have received a copy of the GNU General Public License 37 | * along with this program. If not, see . 38 | */ 39 | 40 | export const listAvailableProcedures = 'CALL dbms.procedures()' 41 | -------------------------------------------------------------------------------- /test_utils/__mocks__/fileMock.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018-2020 "Graph Foundation" 3 | * Graph Foundation, Inc. [https://graphfoundation.org] 4 | * 5 | * This file is part of ONgDB. 6 | * 7 | * ONgDB is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /* 21 | * Copyright (c) 2002-2020 "Neo4j," 22 | * Neo4j Sweden AB [http://neo4j.com] 23 | * 24 | * This file is part of Neo4j. 25 | * 26 | * Neo4j is free software: you can redistribute it and/or modify 27 | * it under the terms of the GNU General Public License as published by 28 | * the Free Software Foundation, either version 3 of the License, or 29 | * (at your option) any later version. 30 | * 31 | * This program is distributed in the hope that it will be useful, 32 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 33 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 34 | * GNU General Public License for more details. 35 | * 36 | * You should have received a copy of the GNU General Public License 37 | * along with this program. If not, see . 38 | */ 39 | 40 | module.exports = '' // To have the component not throwing 41 | -------------------------------------------------------------------------------- /src/browser/modules/D3Visualization/index.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018-2020 "Graph Foundation" 3 | * Graph Foundation, Inc. [https://graphfoundation.org] 4 | * 5 | * This file is part of ONgDB. 6 | * 7 | * ONgDB is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /* 21 | * Copyright (c) 2002-2020 "Neo4j," 22 | * Neo4j Sweden AB [http://neo4j.com] 23 | * 24 | * This file is part of Neo4j. 25 | * 26 | * Neo4j is free software: you can redistribute it and/or modify 27 | * it under the terms of the GNU General Public License as published by 28 | * the Free Software Foundation, either version 3 of the License, or 29 | * (at your option) any later version. 30 | * 31 | * This program is distributed in the hope that it will be useful, 32 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 33 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 34 | * GNU General Public License for more details. 35 | * 36 | * You should have received a copy of the GNU General Public License 37 | * along with this program. If not, see . 38 | */ 39 | 40 | import components from './components' 41 | 42 | export default { components } 43 | -------------------------------------------------------------------------------- /src/browser/components/headers/index.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018-2020 "Graph Foundation" 3 | * Graph Foundation, Inc. [https://graphfoundation.org] 4 | * 5 | * This file is part of ONgDB. 6 | * 7 | * ONgDB is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /* 21 | * Copyright (c) 2002-2020 "Neo4j," 22 | * Neo4j Sweden AB [http://neo4j.com] 23 | * 24 | * This file is part of Neo4j. 25 | * 26 | * Neo4j is free software: you can redistribute it and/or modify 27 | * it under the terms of the GNU General Public License as published by 28 | * the Free Software Foundation, either version 3 of the License, or 29 | * (at your option) any later version. 30 | * 31 | * This program is distributed in the hope that it will be useful, 32 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 33 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 34 | * GNU General Public License for more details. 35 | * 36 | * You should have received a copy of the GNU General Public License 37 | * along with this program. If not, see . 38 | */ 39 | 40 | import { H1, H2, H3, H4, H5 } from './Headers' 41 | 42 | export { H1, H2, H3, H4, H5 } 43 | -------------------------------------------------------------------------------- /src/browser/modules/D3Visualization/components/index.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018-2020 "Graph Foundation" 3 | * Graph Foundation, Inc. [https://graphfoundation.org] 4 | * 5 | * This file is part of ONgDB. 6 | * 7 | * ONgDB is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /* 21 | * Copyright (c) 2002-2020 "Neo4j," 22 | * Neo4j Sweden AB [http://neo4j.com] 23 | * 24 | * This file is part of Neo4j. 25 | * 26 | * Neo4j is free software: you can redistribute it and/or modify 27 | * it under the terms of the GNU General Public License as published by 28 | * the Free Software Foundation, either version 3 of the License, or 29 | * (at your option) any later version. 30 | * 31 | * This program is distributed in the hope that it will be useful, 32 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 33 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 34 | * GNU General Public License for more details. 35 | * 36 | * You should have received a copy of the GNU General Public License 37 | * along with this program. If not, see . 38 | */ 39 | 40 | import { Explorer } from './Explorer' 41 | 42 | export default { Explorer } 43 | -------------------------------------------------------------------------------- /src/shared/utils/array-has-items.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018-2020 "Graph Foundation" 3 | * Graph Foundation, Inc. [https://graphfoundation.org] 4 | * 5 | * This file is part of ONgDB. 6 | * 7 | * ONgDB is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /* 21 | * Copyright (c) 2002-2020 "Neo4j," 22 | * Neo4j Sweden AB [http://neo4j.com] 23 | * 24 | * This file is part of Neo4j. 25 | * 26 | * Neo4j is free software: you can redistribute it and/or modify 27 | * it under the terms of the GNU General Public License as published by 28 | * the Free Software Foundation, either version 3 of the License, or 29 | * (at your option) any later version. 30 | * 31 | * This program is distributed in the hope that it will be useful, 32 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 33 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 34 | * GNU General Public License for more details. 35 | * 36 | * You should have received a copy of the GNU General Public License 37 | * along with this program. If not, see . 38 | */ 39 | 40 | export default function arrayHasItems(arr) { 41 | return Array.isArray(arr) && arr.length > 0 42 | } 43 | -------------------------------------------------------------------------------- /src/browser/components/desktop-api/desktop-api.handlers.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2002-2019 "Neo4j," 3 | * Neo4j Sweden AB [http://neo4j.com] 4 | * 5 | * This file is part of Neo4j. 6 | * 7 | * Neo4j is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | 21 | import { 22 | getActiveGraph, 23 | createConnectionCredentialsObject 24 | } from './desktop-api.utils' 25 | 26 | export const buildConnectionCreds = async ( 27 | _event, 28 | context, 29 | _oldContext, 30 | getKerberosTicket, 31 | extra = {} 32 | ) => { 33 | const activeGraph = getActiveGraph(context) || {} 34 | const connectionsCredentialsObject = await createConnectionCredentialsObject( 35 | activeGraph, 36 | extra.defaultConnectionData, 37 | getKerberosTicket 38 | ) 39 | // No connection. Probably no graph active. 40 | if (!connectionsCredentialsObject) { 41 | throw new Error('No connection creds found') 42 | } 43 | return connectionsCredentialsObject 44 | } 45 | 46 | export const getDesktopTheme = (_, newContext) => { 47 | if (newContext.global.prefersColorScheme) { 48 | return Promise.resolve(newContext.global.prefersColorScheme) 49 | } 50 | return Promise.reject(new Error('No theme detected')) 51 | } 52 | -------------------------------------------------------------------------------- /src/browser/components/Render/index.jsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018-2020 "Graph Foundation" 3 | * Graph Foundation, Inc. [https://graphfoundation.org] 4 | * 5 | * This file is part of ONgDB. 6 | * 7 | * ONgDB is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /* 21 | * Copyright (c) 2002-2020 "Neo4j," 22 | * Neo4j Sweden AB [http://neo4j.com] 23 | * 24 | * This file is part of Neo4j. 25 | * 26 | * Neo4j is free software: you can redistribute it and/or modify 27 | * it under the terms of the GNU General Public License as published by 28 | * the Free Software Foundation, either version 3 of the License, or 29 | * (at your option) any later version. 30 | * 31 | * This program is distributed in the hope that it will be useful, 32 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 33 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 34 | * GNU General Public License for more details. 35 | * 36 | * You should have received a copy of the GNU General Public License 37 | * along with this program. If not, see . 38 | */ 39 | 40 | const Render = ({ if: cond, children }) => { 41 | return cond ? children : null 42 | } 43 | export default Render 44 | -------------------------------------------------------------------------------- /src/shared/utils/number-to-US-locale.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018-2020 "Graph Foundation" 3 | * Graph Foundation, Inc. [https://graphfoundation.org] 4 | * 5 | * This file is part of ONgDB. 6 | * 7 | * ONgDB is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /* 21 | * Copyright (c) 2002-2020 "Neo4j," 22 | * Neo4j Sweden AB [http://neo4j.com] 23 | * 24 | * This file is part of Neo4j. 25 | * 26 | * Neo4j is free software: you can redistribute it and/or modify 27 | * it under the terms of the GNU General Public License as published by 28 | * the Free Software Foundation, either version 3 of the License, or 29 | * (at your option) any later version. 30 | * 31 | * This program is distributed in the hope that it will be useful, 32 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 33 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 34 | * GNU General Public License for more details. 35 | * 36 | * You should have received a copy of the GNU General Public License 37 | * along with this program. If not, see . 38 | */ 39 | 40 | export default value => 41 | (parseInt(value, 10) >= 0 && parseInt(value, 10).toLocaleString('en-US')) || 42 | value 43 | -------------------------------------------------------------------------------- /src/browser/modules/Stream/CypherFrame/PlanView.styled.jsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018-2020 "Graph Foundation" 3 | * Graph Foundation, Inc. [https://graphfoundation.org] 4 | * 5 | * This file is part of ONgDB. 6 | * 7 | * ONgDB is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /* 21 | * Copyright (c) 2002-2020 "Neo4j," 22 | * Neo4j Sweden AB [http://neo4j.com] 23 | * 24 | * This file is part of Neo4j. 25 | * 26 | * Neo4j is free software: you can redistribute it and/or modify 27 | * it under the terms of the GNU General Public License as published by 28 | * the Free Software Foundation, either version 3 of the License, or 29 | * (at your option) any later version. 30 | * 31 | * This program is distributed in the hope that it will be useful, 32 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 33 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 34 | * GNU General Public License for more details. 35 | * 36 | * You should have received a copy of the GNU General Public License 37 | * along with this program. If not, see . 38 | */ 39 | 40 | import styled from 'styled-components' 41 | 42 | export const PlanSVG = styled.svg` 43 | width: 100%; 44 | ` 45 | -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018-2020 "Graph Foundation" 3 | * Graph Foundation, Inc. [https://graphfoundation.org] 4 | * 5 | * This file is part of ONgDB. 6 | * 7 | * ONgDB is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /* 21 | * Copyright (c) 2002-2020 "Neo4j," 22 | * Neo4j Sweden AB [http://neo4j.com] 23 | * 24 | * This file is part of Neo4j. 25 | * 26 | * Neo4j is free software: you can redistribute it and/or modify 27 | * it under the terms of the GNU General Public License as published by 28 | * the Free Software Foundation, either version 3 of the License, or 29 | * (at your option) any later version. 30 | * 31 | * This program is distributed in the hope that it will be useful, 32 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 33 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 34 | * GNU General Public License for more details. 35 | * 36 | * You should have received a copy of the GNU General Public License 37 | * along with this program. If not, see . 38 | */ 39 | 40 | module.exports = { 41 | plugins: { 42 | precss: {}, 43 | autoprefixer: { 44 | browsers: ['last 3 version', 'ie >= 10'] 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/browser/modules/DocTitle/index.jsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018-2020 "Graph Foundation" 3 | * Graph Foundation, Inc. [https://graphfoundation.org] 4 | * 5 | * This file is part of ONgDB. 6 | * 7 | * ONgDB is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /* 21 | * Copyright (c) 2002-2020 "Neo4j," 22 | * Neo4j Sweden AB [http://neo4j.com] 23 | * 24 | * This file is part of Neo4j. 25 | * 26 | * Neo4j is free software: you can redistribute it and/or modify 27 | * it under the terms of the GNU General Public License as published by 28 | * the Free Software Foundation, either version 3 of the License, or 29 | * (at your option) any later version. 30 | * 31 | * This program is distributed in the hope that it will be useful, 32 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 33 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 34 | * GNU General Public License for more details. 35 | * 36 | * You should have received a copy of the GNU General Public License 37 | * along with this program. If not, see . 38 | */ 39 | 40 | const DocTitle = ({ titleString }) => { 41 | document.title = titleString 42 | return null 43 | } 44 | 45 | export default DocTitle 46 | -------------------------------------------------------------------------------- /src/shared/modules/userInteraction/userInteractionDuck.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018-2020 "Graph Foundation" 3 | * Graph Foundation, Inc. [https://graphfoundation.org] 4 | * 5 | * This file is part of ONgDB. 6 | * 7 | * ONgDB is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /* 21 | * Copyright (c) 2002-2020 "Neo4j," 22 | * Neo4j Sweden AB [http://neo4j.com] 23 | * 24 | * This file is part of Neo4j. 25 | * 26 | * Neo4j is free software: you can redistribute it and/or modify 27 | * it under the terms of the GNU General Public License as published by 28 | * the Free Software Foundation, either version 3 of the License, or 29 | * (at your option) any later version. 30 | * 31 | * This program is distributed in the hope that it will be useful, 32 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 33 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 34 | * GNU General Public License for more details. 35 | * 36 | * You should have received a copy of the GNU General Public License 37 | * along with this program. If not, see . 38 | */ 39 | 40 | // Constants 41 | export const NAME = 'userInteraction' 42 | export const USER_INTERACTION = `${NAME}/USER_INTERACTION` 43 | -------------------------------------------------------------------------------- /src/shared/services/bolt/cypherTypesFormatting.js: -------------------------------------------------------------------------------- 1 | import neo4j from 'neo4j-driver' 2 | 3 | export const csvFormat = anything => { 4 | if (typeof anything === 'number') { 5 | return numberFormat(anything) 6 | } 7 | if (neo4j.isInt(anything)) { 8 | return anything.toString() 9 | } 10 | if (anything instanceof neo4j.types.Point) { 11 | return spacialFormat(anything) 12 | } 13 | if (isTemporalType(anything)) { 14 | return `"${anything.toString()}"` 15 | } 16 | if (typeof anything === 'string') { 17 | return anything 18 | } 19 | return undefined 20 | } 21 | 22 | export const stringModifier = anything => { 23 | if (typeof anything === 'number') { 24 | return numberFormat(anything) 25 | } 26 | if (neo4j.isInt(anything)) { 27 | return anything.toString() 28 | } 29 | if (anything instanceof neo4j.types.Point) { 30 | return spacialFormat(anything) 31 | } 32 | if (isTemporalType(anything)) { 33 | return `"${anything.toString()}"` 34 | } 35 | return undefined 36 | } 37 | 38 | const numberFormat = anything => { 39 | // Exclude false positives and return early 40 | if ([Infinity, -Infinity, NaN].includes(anything)) { 41 | return `${anything}` 42 | } 43 | if (Math.floor(anything) === anything) { 44 | return `${anything}.0` 45 | } 46 | return undefined 47 | } 48 | const spacialFormat = anything => { 49 | const zString = anything.z ? `, z:${anything.z}` : '' 50 | return `point({srid:${anything.srid}, x:${anything.x}, y:${anything.y}${zString}})` 51 | } 52 | 53 | const isTemporalType = anything => 54 | anything instanceof neo4j.types.Date || 55 | anything instanceof neo4j.types.DateTime || 56 | anything instanceof neo4j.types.Duration || 57 | anything instanceof neo4j.types.LocalDateTime || 58 | anything instanceof neo4j.types.LocalTime || 59 | anything instanceof neo4j.types.Time 60 | -------------------------------------------------------------------------------- /src/browser/modules/Stream/stream.utils.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018-2020 "Graph Foundation" 3 | * Graph Foundation, Inc. [https://graphfoundation.org] 4 | * 5 | * This file is part of ONgDB. 6 | * 7 | * ONgDB is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /* 21 | * Copyright (c) 2002-2020 "Neo4j," 22 | * Neo4j Sweden AB [http://neo4j.com] 23 | * 24 | * This file is part of Neo4j. 25 | * 26 | * Neo4j is free software: you can redistribute it and/or modify 27 | * it under the terms of the GNU General Public License as published by 28 | * the Free Software Foundation, either version 3 of the License, or 29 | * (at your option) any later version. 30 | * 31 | * This program is distributed in the hope that it will be useful, 32 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 33 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 34 | * GNU General Public License for more details. 35 | * 36 | * You should have received a copy of the GNU General Public License 37 | * along with this program. If not, see . 38 | */ 39 | 40 | export function getLatestFromFrameStack(frameObj) { 41 | if (!frameObj.stack) { 42 | return null 43 | } 44 | return frameObj.stack[0] 45 | } 46 | -------------------------------------------------------------------------------- /src/browser/components/Centered.jsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018-2020 "Graph Foundation" 3 | * Graph Foundation, Inc. [https://graphfoundation.org] 4 | * 5 | * This file is part of ONgDB. 6 | * 7 | * ONgDB is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /* 21 | * Copyright (c) 2002-2020 "Neo4j," 22 | * Neo4j Sweden AB [http://neo4j.com] 23 | * 24 | * This file is part of Neo4j. 25 | * 26 | * Neo4j is free software: you can redistribute it and/or modify 27 | * it under the terms of the GNU General Public License as published by 28 | * the Free Software Foundation, either version 3 of the License, or 29 | * (at your option) any later version. 30 | * 31 | * This program is distributed in the hope that it will be useful, 32 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 33 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 34 | * GNU General Public License for more details. 35 | * 36 | * You should have received a copy of the GNU General Public License 37 | * along with this program. If not, see . 38 | */ 39 | 40 | import styled from 'styled-components' 41 | 42 | const Centered = styled.div` 43 | width: 100%; 44 | text-align: center; 45 | ` 46 | export default Centered 47 | -------------------------------------------------------------------------------- /src/browser/index.jsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018-2020 "Graph Foundation" 3 | * Graph Foundation, Inc. [https://graphfoundation.org] 4 | * 5 | * This file is part of ONgDB. 6 | * 7 | * ONgDB is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /* 21 | * Copyright (c) 2002-2020 "Neo4j," 22 | * Neo4j Sweden AB [http://neo4j.com] 23 | * 24 | * This file is part of Neo4j. 25 | * 26 | * Neo4j is free software: you can redistribute it and/or modify 27 | * it under the terms of the GNU General Public License as published by 28 | * the Free Software Foundation, either version 3 of the License, or 29 | * (at your option) any later version. 30 | * 31 | * This program is distributed in the hope that it will be useful, 32 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 33 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 34 | * GNU General Public License for more details. 35 | * 36 | * You should have received a copy of the GNU General Public License 37 | * along with this program. If not, see . 38 | */ 39 | import './init.js' 40 | import React from 'react' 41 | import ReactDOM from 'react-dom' 42 | import AppInit from './AppInit.jsx' 43 | 44 | ReactDOM.render(, document.getElementById('mount')) 45 | -------------------------------------------------------------------------------- /src/shared/services/export-favorites/export-favorites.constants.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018-2020 "Graph Foundation" 3 | * Graph Foundation, Inc. [https://graphfoundation.org] 4 | * 5 | * This file is part of ONgDB. 6 | * 7 | * ONgDB is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /* 21 | * Copyright (c) 2002-2020 "Neo4j," 22 | * Neo4j Sweden AB [http://neo4j.com] 23 | * 24 | * This file is part of Neo4j. 25 | * 26 | * Neo4j is free software: you can redistribute it and/or modify 27 | * it under the terms of the GNU General Public License as published by 28 | * the Free Software Foundation, either version 3 of the License, or 29 | * (at your option) any later version. 30 | * 31 | * This program is distributed in the hope that it will be useful, 32 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 33 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 34 | * GNU General Public License for more details. 35 | * 36 | * You should have received a copy of the GNU General Public License 37 | * along with this program. If not, see . 38 | */ 39 | 40 | export const SLASH = '/' 41 | export const NEW_LINE = '\n' 42 | export const COMMENT_PREFIX = '//' 43 | export const CYPHER_FILE_EXTENSION = '.cypher' 44 | -------------------------------------------------------------------------------- /src/browser/components/__snapshots__/Display.test.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[` can lazy load if condition changes from false to true and has the lazy prop 1`] = `
    `; 4 | 5 | exports[` can lazy load if condition changes from false to true and has the lazy prop 2`] = ` 6 |
    7 |
    10 | 11 | Hello 12 | 13 |
    14 |
    15 | `; 16 | 17 | exports[` does display if condition is true 1`] = ` 18 |
    19 |
    22 | 23 | Hello 24 | 25 |
    26 |
    27 | `; 28 | 29 | exports[` hides if condition changes from true to false 1`] = ` 30 |
    31 |
    34 | 35 | Hello 36 | 37 |
    38 |
    39 | `; 40 | 41 | exports[` hides if condition changes from true to false 2`] = ` 42 |
    43 |
    46 | 47 | Hello 48 | 49 |
    50 |
    51 | `; 52 | 53 | exports[` hides if condition is false 1`] = ` 54 |
    55 |
    58 | 59 | Hello 60 | 61 |
    62 |
    63 | `; 64 | 65 | exports[` shows if condition changes from false to true 1`] = ` 66 |
    67 |
    70 | 71 | Hello 72 | 73 |
    74 |
    75 | `; 76 | 77 | exports[` shows if condition changes from false to true 2`] = ` 78 |
    79 |
    82 | 83 | Hello 84 | 85 |
    86 |
    87 | `; 88 | -------------------------------------------------------------------------------- /src/browser/styles/fira-code.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'Fira Code'; 3 | src: url('fonts/FiraCode/eot/FiraCode-Light.eot'); 4 | src: url('fonts/FiraCode/eot/FiraCode-Light.eot') format('embedded-opentype'), 5 | url('fonts/FiraCode/woff2/FiraCode-Light.woff2') format('woff2'), 6 | url('fonts/FiraCode/woff/FiraCode-Light.woff') format('woff'), 7 | url('fonts/FiraCode/ttf/FiraCode-Light.ttf') format('truetype'); 8 | font-weight: 300; 9 | font-style: normal; 10 | } 11 | 12 | @font-face { 13 | font-family: 'Fira Code'; 14 | src: url('fonts/FiraCode/eot/FiraCode-Regular.eot'); 15 | src: url('fonts/FiraCode/eot/FiraCode-Regular.eot') 16 | format('embedded-opentype'), 17 | url('fonts/FiraCode/woff2/FiraCode-Regular.woff2') format('woff2'), 18 | url('fonts/FiraCode/woff/FiraCode-Regular.woff') format('woff'), 19 | url('fonts/FiraCode/ttf/FiraCode-Regular.ttf') format('truetype'); 20 | font-weight: 400; 21 | font-style: normal; 22 | } 23 | 24 | @font-face { 25 | font-family: 'Fira Code'; 26 | src: url('fonts/FiraCode/eot/FiraCode-Medium.eot'); 27 | src: url('fonts/FiraCode/eot/FiraCode-Medium.eot') format('embedded-opentype'), 28 | url('fonts/FiraCode/woff2/FiraCode-Medium.woff2') format('woff2'), 29 | url('fonts/FiraCode/woff/FiraCode-Medium.woff') format('woff'), 30 | url('fonts/FiraCode/ttf/FiraCode-Medium.ttf') format('truetype'); 31 | font-weight: 500; 32 | font-style: normal; 33 | } 34 | 35 | @font-face { 36 | font-family: 'Fira Code'; 37 | src: url('fonts/FiraCode/eot/FiraCode-Bold.eot'); 38 | src: url('fonts/FiraCode/eot/FiraCode-Bold.eot') format('embedded-opentype'), 39 | url('fonts/FiraCode/woff2/FiraCode-Bold.woff2') format('woff2'), 40 | url('fonts/FiraCode/woff/FiraCode-Bold.woff') format('woff'), 41 | url('fonts/FiraCode/ttf/FiraCode-Bold.ttf') format('truetype'); 42 | font-weight: 700; 43 | font-style: normal; 44 | } 45 | -------------------------------------------------------------------------------- /src/shared/services/export-favorites/index.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018-2020 "Graph Foundation" 3 | * Graph Foundation, Inc. [https://graphfoundation.org] 4 | * 5 | * This file is part of ONgDB. 6 | * 7 | * ONgDB is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /* 21 | * Copyright (c) 2002-2020 "Neo4j," 22 | * Neo4j Sweden AB [http://neo4j.com] 23 | * 24 | * This file is part of Neo4j. 25 | * 26 | * Neo4j is free software: you can redistribute it and/or modify 27 | * it under the terms of the GNU General Public License as published by 28 | * the Free Software Foundation, either version 3 of the License, or 29 | * (at your option) any later version. 30 | * 31 | * This program is distributed in the hope that it will be useful, 32 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 33 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 34 | * GNU General Public License for more details. 35 | * 36 | * You should have received a copy of the GNU General Public License 37 | * along with this program. If not, see . 38 | */ 39 | 40 | export { 41 | exportFavorites, 42 | mapOldFavoritesAndFolders 43 | } from './export-favorites.utils' 44 | export { SLASH, CYPHER_FILE_EXTENSION } from './export-favorites.constants' 45 | -------------------------------------------------------------------------------- /src/browser/components/Ellipsis.jsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018-2020 "Graph Foundation" 3 | * Graph Foundation, Inc. [https://graphfoundation.org] 4 | * 5 | * This file is part of ONgDB. 6 | * 7 | * ONgDB is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /* 21 | * Copyright (c) 2002-2020 "Neo4j," 22 | * Neo4j Sweden AB [http://neo4j.com] 23 | * 24 | * This file is part of Neo4j. 25 | * 26 | * Neo4j is free software: you can redistribute it and/or modify 27 | * it under the terms of the GNU General Public License as published by 28 | * the Free Software Foundation, either version 3 of the License, or 29 | * (at your option) any later version. 30 | * 31 | * This program is distributed in the hope that it will be useful, 32 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 33 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 34 | * GNU General Public License for more details. 35 | * 36 | * You should have received a copy of the GNU General Public License 37 | * along with this program. If not, see . 38 | */ 39 | 40 | import styled from 'styled-components' 41 | 42 | const Ellipsis = styled.div` 43 | text-overflow: ellipsis; 44 | overflow: hidden; 45 | white-space: nowrap; 46 | ` 47 | export default Ellipsis 48 | -------------------------------------------------------------------------------- /src/browser/components/buttons/index.test.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018-2020 "Graph Foundation" 3 | * Graph Foundation, Inc. [https://graphfoundation.org] 4 | * 5 | * This file is part of ONgDB. 6 | * 7 | * ONgDB is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /* 21 | * Copyright (c) 2002-2020 "Neo4j," 22 | * Neo4j Sweden AB [http://neo4j.com] 23 | * 24 | * This file is part of Neo4j. 25 | * 26 | * Neo4j is free software: you can redistribute it and/or modify 27 | * it under the terms of the GNU General Public License as published by 28 | * the Free Software Foundation, either version 3 of the License, or 29 | * (at your option) any later version. 30 | * 31 | * This program is distributed in the hope that it will be useful, 32 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 33 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 34 | * GNU General Public License for more details. 35 | * 36 | * You should have received a copy of the GNU General Public License 37 | * along with this program. If not, see . 38 | */ 39 | import React from 'react' 40 | import { render } from '@testing-library/react' 41 | 42 | import { CloseButton } from './index' 43 | 44 | test('CloseButton renders', () => { 45 | render() 46 | }) 47 | -------------------------------------------------------------------------------- /src/browser/index.test.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018-2020 "Graph Foundation" 3 | * Graph Foundation, Inc. [https://graphfoundation.org] 4 | * 5 | * This file is part of ONgDB. 6 | * 7 | * ONgDB is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /* 21 | * Copyright (c) 2002-2020 "Neo4j," 22 | * Neo4j Sweden AB [http://neo4j.com] 23 | * 24 | * This file is part of Neo4j. 25 | * 26 | * Neo4j is free software: you can redistribute it and/or modify 27 | * it under the terms of the GNU General Public License as published by 28 | * the Free Software Foundation, either version 3 of the License, or 29 | * (at your option) any later version. 30 | * 31 | * This program is distributed in the hope that it will be useful, 32 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 33 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 34 | * GNU General Public License for more details. 35 | * 36 | * You should have received a copy of the GNU General Public License 37 | * along with this program. If not, see . 38 | */ 39 | import React from 'react' 40 | import { render } from '@testing-library/react' 41 | import AppInit from './AppInit' 42 | 43 | describe('browser entry', () => { 44 | it('renders', () => { 45 | render() 46 | }) 47 | }) 48 | -------------------------------------------------------------------------------- /src/browser/modules/Frame/FrameSuccess.jsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018-2020 "Graph Foundation" 3 | * Graph Foundation, Inc. [https://graphfoundation.org] 4 | * 5 | * This file is part of ONgDB. 6 | * 7 | * ONgDB is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /* 21 | * Copyright (c) 2002-2020 "Neo4j," 22 | * Neo4j Sweden AB [http://neo4j.com] 23 | * 24 | * This file is part of Neo4j. 25 | * 26 | * Neo4j is free software: you can redistribute it and/or modify 27 | * it under the terms of the GNU General Public License as published by 28 | * the Free Software Foundation, either version 3 of the License, or 29 | * (at your option) any later version. 30 | * 31 | * This program is distributed in the hope that it will be useful, 32 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 33 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 34 | * GNU General Public License for more details. 35 | * 36 | * You should have received a copy of the GNU General Public License 37 | * along with this program. If not, see . 38 | */ 39 | import React from 'react' 40 | const FrameSuccess = props => { 41 | if (!props || !props.message) return null 42 | return {props.message} 43 | } 44 | 45 | export default FrameSuccess 46 | -------------------------------------------------------------------------------- /src/shared/services/intercom.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018-2020 "Graph Foundation" 3 | * Graph Foundation, Inc. [https://graphfoundation.org] 4 | * 5 | * This file is part of ONgDB. 6 | * 7 | * ONgDB is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /* 21 | * Copyright (c) 2002-2020 "Neo4j," 22 | * Neo4j Sweden AB [http://neo4j.com] 23 | * 24 | * This file is part of Neo4j. 25 | * 26 | * Neo4j is free software: you can redistribute it and/or modify 27 | * it under the terms of the GNU General Public License as published by 28 | * the Free Software Foundation, either version 3 of the License, or 29 | * (at your option) any later version. 30 | * 31 | * This program is distributed in the hope that it will be useful, 32 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 33 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 34 | * GNU General Public License for more details. 35 | * 36 | * You should have received a copy of the GNU General Public License 37 | * along with this program. If not, see . 38 | */ 39 | 40 | import { canUseDOM } from 'services/utils' 41 | 42 | export const hasIntercom = () => canUseDOM() && window.Intercom 43 | 44 | export default function api(...args) { 45 | if (hasIntercom()) window.Intercom.apply(null, args) 46 | } 47 | -------------------------------------------------------------------------------- /src/browser/styles/constants.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018-2020 "Graph Foundation" 3 | * Graph Foundation, Inc. [https://graphfoundation.org] 4 | * 5 | * This file is part of ONgDB. 6 | * 7 | * ONgDB is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /* 21 | * Copyright (c) 2002-2020 "Neo4j," 22 | * Neo4j Sweden AB [http://neo4j.com] 23 | * 24 | * This file is part of Neo4j. 25 | * 26 | * Neo4j is free software: you can redistribute it and/or modify 27 | * it under the terms of the GNU General Public License as published by 28 | * the Free Software Foundation, either version 3 of the License, or 29 | * (at your option) any later version. 30 | * 31 | * This program is distributed in the hope that it will be useful, 32 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 33 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 34 | * GNU General Public License for more details. 35 | * 36 | * You should have received a copy of the GNU General Public License 37 | * along with this program. If not, see . 38 | */ 39 | 40 | export const font = {} 41 | 42 | export const dim = { 43 | // Editor bar 44 | editorbarHeight: 71, 45 | // Frame 46 | frameBodyHeight: 550, 47 | frameTitlebarHeight: 39, 48 | frameStatusbarHeight: 39, 49 | frameBodyPadding: 20 50 | } 51 | -------------------------------------------------------------------------------- /src/browser/modules/ClickToCode/styled.jsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018-2020 "Graph Foundation" 3 | * Graph Foundation, Inc. [https://graphfoundation.org] 4 | * 5 | * This file is part of ONgDB. 6 | * 7 | * ONgDB is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /* 21 | * Copyright (c) 2002-2020 "Neo4j," 22 | * Neo4j Sweden AB [http://neo4j.com] 23 | * 24 | * This file is part of Neo4j. 25 | * 26 | * Neo4j is free software: you can redistribute it and/or modify 27 | * it under the terms of the GNU General Public License as published by 28 | * the Free Software Foundation, either version 3 of the License, or 29 | * (at your option) any later version. 30 | * 31 | * This program is distributed in the hope that it will be useful, 32 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 33 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 34 | * GNU General Public License for more details. 35 | * 36 | * You should have received a copy of the GNU General Public License 37 | * along with this program. If not, see . 38 | */ 39 | import styled from 'styled-components' 40 | 41 | export const StyledCodeBlock = styled.code` 42 | background-color: black; 43 | color: white; 44 | cursor: pointer; 45 | border: none; 46 | border-radius: 4px; 47 | padding: 2px 4px; 48 | ` 49 | -------------------------------------------------------------------------------- /src/browser/components/Text.jsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018-2020 "Graph Foundation" 3 | * Graph Foundation, Inc. [https://graphfoundation.org] 4 | * 5 | * This file is part of ONgDB. 6 | * 7 | * ONgDB is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /* 21 | * Copyright (c) 2002-2020 "Neo4j," 22 | * Neo4j Sweden AB [http://neo4j.com] 23 | * 24 | * This file is part of Neo4j. 25 | * 26 | * Neo4j is free software: you can redistribute it and/or modify 27 | * it under the terms of the GNU General Public License as published by 28 | * the Free Software Foundation, either version 3 of the License, or 29 | * (at your option) any later version. 30 | * 31 | * This program is distributed in the hope that it will be useful, 32 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 33 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 34 | * GNU General Public License for more details. 35 | * 36 | * You should have received a copy of the GNU General Public License 37 | * along with this program. If not, see . 38 | */ 39 | 40 | import styled from 'styled-components' 41 | 42 | export const Lead = styled.p` 43 | font-weight: 300; 44 | font-size: 15px; 45 | line-height: 22px; 46 | font-family: ${props => props.theme.primaryFontFamily}; 47 | color: ${props => props.theme.headerText}; 48 | ` 49 | -------------------------------------------------------------------------------- /test_utils/setupTests.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018-2020 "Graph Foundation" 3 | * Graph Foundation, Inc. [https://graphfoundation.org] 4 | * 5 | * This file is part of ONgDB. 6 | * 7 | * ONgDB is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /* 21 | * Copyright (c) 2002-2020 "Neo4j," 22 | * Neo4j Sweden AB [http://neo4j.com] 23 | * 24 | * This file is part of Neo4j. 25 | * 26 | * Neo4j is free software: you can redistribute it and/or modify 27 | * it under the terms of the GNU General Public License as published by 28 | * the Free Software Foundation, either version 3 of the License, or 29 | * (at your option) any later version. 30 | * 31 | * This program is distributed in the hope that it will be useful, 32 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 33 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 34 | * GNU General Public License for more details. 35 | * 36 | * You should have received a copy of the GNU General Public License 37 | * along with this program. If not, see . 38 | */ 39 | 40 | // polyfill for jsdom (for tests only) 41 | // tests with codemirror breaks without it 42 | global.document.createRange = () => { 43 | return { 44 | setEnd: () => {}, 45 | setStart: () => {}, 46 | getBoundingClientRect: () => {}, 47 | getClientRects: () => [] 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/browser/components/buttons/__snapshots__/ConfirmationButton.test.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`ConfirmationButton renders changes state on clicks and finally calls the onConfirmed prop 1`] = ` 4 |
    5 | 13 |
    14 | `; 15 | 16 | exports[`ConfirmationButton renders changes state on clicks and finally calls the onConfirmed prop 2`] = ` 17 |
    18 | 19 | 27 | 35 | 36 |
    37 | `; 38 | 39 | exports[`ConfirmationButton renders changes state on clicks and finally calls the onConfirmed prop 3`] = ` 40 |
    41 | 49 |
    50 | `; 51 | 52 | exports[`ConfirmationButton renders changes state on clicks and finally calls the onConfirmed prop 4`] = ` 53 |
    54 | 62 |
    63 | `; 64 | -------------------------------------------------------------------------------- /src/browser/modules/D3Visualization/lib/visualization/utils/arrays.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018-2020 "Graph Foundation" 3 | * Graph Foundation, Inc. [https://graphfoundation.org] 4 | * 5 | * This file is part of ONgDB. 6 | * 7 | * ONgDB is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /* 21 | * Copyright (c) 2002-2020 "Neo4j," 22 | * Neo4j Sweden AB [http://neo4j.com] 23 | * 24 | * This file is part of Neo4j. 25 | * 26 | * Neo4j is free software: you can redistribute it and/or modify 27 | * it under the terms of the GNU General Public License as published by 28 | * the Free Software Foundation, either version 3 of the License, or 29 | * (at your option) any later version. 30 | * 31 | * This program is distributed in the hope that it will be useful, 32 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 33 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 34 | * GNU General Public License for more details. 35 | * 36 | * You should have received a copy of the GNU General Public License 37 | * along with this program. If not, see . 38 | */ 39 | 40 | export default function cloneArray(original) { 41 | const clone = new Array(original.length) 42 | for (let idx = 0; idx < original.length; idx++) { 43 | const node = original[idx] 44 | clone[idx] = node 45 | } 46 | return clone 47 | } 48 | -------------------------------------------------------------------------------- /src/browser/modules/Frame/FrameSidebar.jsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018-2020 "Graph Foundation" 3 | * Graph Foundation, Inc. [https://graphfoundation.org] 4 | * 5 | * This file is part of ONgDB. 6 | * 7 | * ONgDB is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /* 21 | * Copyright (c) 2002-2020 "Neo4j," 22 | * Neo4j Sweden AB [http://neo4j.com] 23 | * 24 | * This file is part of Neo4j. 25 | * 26 | * Neo4j is free software: you can redistribute it and/or modify 27 | * it under the terms of the GNU General Public License as published by 28 | * the Free Software Foundation, either version 3 of the License, or 29 | * (at your option) any later version. 30 | * 31 | * This program is distributed in the hope that it will be useful, 32 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 33 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 34 | * GNU General Public License for more details. 35 | * 36 | * You should have received a copy of the GNU General Public License 37 | * along with this program. If not, see . 38 | */ 39 | import React from 'react' 40 | import { StyledFrameSidebar } from './styled' 41 | 42 | const FrameSidebar = props => { 43 | if (!props || !props.children) return null 44 | return {props.children} 45 | } 46 | 47 | export default FrameSidebar 48 | -------------------------------------------------------------------------------- /src/shared/modules/stream/frameViewTypes.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018-2020 "Graph Foundation" 3 | * Graph Foundation, Inc. [https://graphfoundation.org] 4 | * 5 | * This file is part of ONgDB. 6 | * 7 | * ONgDB is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /* 21 | * Copyright (c) 2002-2020 "Neo4j," 22 | * Neo4j Sweden AB [http://neo4j.com] 23 | * 24 | * This file is part of Neo4j. 25 | * 26 | * Neo4j is free software: you can redistribute it and/or modify 27 | * it under the terms of the GNU General Public License as published by 28 | * the Free Software Foundation, either version 3 of the License, or 29 | * (at your option) any later version. 30 | * 31 | * This program is distributed in the hope that it will be useful, 32 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 33 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 34 | * GNU General Public License for more details. 35 | * 36 | * You should have received a copy of the GNU General Public License 37 | * along with this program. If not, see . 38 | */ 39 | 40 | export const VISUALIZATION = 'VISUALIZATION' 41 | export const PLAN = 'PLAN' 42 | export const WARNINGS = 'WARNINGS' 43 | export const ERRORS = 'ERRORS' 44 | export const TABLE = 'TABLE' 45 | export const CODE = 'CODE' 46 | export const ERROR = 'ERROR' 47 | export const TEXT = 'TEXT' 48 | -------------------------------------------------------------------------------- /src/browser/hooks/useTimer.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018-2020 "Graph Foundation" 3 | * Graph Foundation, Inc. [https://graphfoundation.org] 4 | * 5 | * This file is part of ONgDB. 6 | * 7 | * ONgDB is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /* 21 | * Copyright (c) 2002-2020 "Neo4j," 22 | * Neo4j Sweden AB [http://neo4j.com] 23 | * 24 | * This file is part of Neo4j. 25 | * 26 | * Neo4j is free software: you can redistribute it and/or modify 27 | * it under the terms of the GNU General Public License as published by 28 | * the Free Software Foundation, either version 3 of the License, or 29 | * (at your option) any later version. 30 | * 31 | * This program is distributed in the hope that it will be useful, 32 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 33 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 34 | * GNU General Public License for more details. 35 | * 36 | * You should have received a copy of the GNU General Public License 37 | * along with this program. If not, see . 38 | */ 39 | 40 | import { useState, useEffect } from 'react' 41 | 42 | export default function useTimer(ms) { 43 | const [didPling, pling] = useState(false) 44 | useEffect(() => { 45 | const timer = setTimeout(() => pling(true), ms) 46 | return () => clearTimeout(timer) 47 | }, []) 48 | return didPling 49 | } 50 | -------------------------------------------------------------------------------- /src/shared/services/duckUtils.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018-2020 "Graph Foundation" 3 | * Graph Foundation, Inc. [https://graphfoundation.org] 4 | * 5 | * This file is part of ONgDB. 6 | * 7 | * ONgDB is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /* 21 | * Copyright (c) 2002-2020 "Neo4j," 22 | * Neo4j Sweden AB [http://neo4j.com] 23 | * 24 | * This file is part of Neo4j. 25 | * 26 | * Neo4j is free software: you can redistribute it and/or modify 27 | * it under the terms of the GNU General Public License as published by 28 | * the Free Software Foundation, either version 3 of the License, or 29 | * (at your option) any later version. 30 | * 31 | * This program is distributed in the hope that it will be useful, 32 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 33 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 34 | * GNU General Public License for more details. 35 | * 36 | * You should have received a copy of the GNU General Public License 37 | * along with this program. If not, see . 38 | */ 39 | 40 | export const hydrate = (initialState, state) => { 41 | if (!state) return state 42 | return state.hydrated ? state : { ...initialState, ...state, hydrated: true } 43 | } 44 | 45 | export const dehydrate = state => { 46 | if (state) { 47 | delete state.hydrated 48 | } 49 | return state 50 | } 51 | -------------------------------------------------------------------------------- /src/browser/modules/Stream/HistoryRow.jsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018-2020 "Graph Foundation" 3 | * Graph Foundation, Inc. [https://graphfoundation.org] 4 | * 5 | * This file is part of ONgDB. 6 | * 7 | * ONgDB is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /* 21 | * Copyright (c) 2002-2020 "Neo4j," 22 | * Neo4j Sweden AB [http://neo4j.com] 23 | * 24 | * This file is part of Neo4j. 25 | * 26 | * Neo4j is free software: you can redistribute it and/or modify 27 | * it under the terms of the GNU General Public License as published by 28 | * the Free Software Foundation, either version 3 of the License, or 29 | * (at your option) any later version. 30 | * 31 | * This program is distributed in the hope that it will be useful, 32 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 33 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 34 | * GNU General Public License for more details. 35 | * 36 | * You should have received a copy of the GNU General Public License 37 | * along with this program. If not, see . 38 | */ 39 | import React from 'react' 40 | import { StyledHistoryRow } from './styled' 41 | 42 | const HistoryRow = ({ entry, handleEntryClick }) => { 43 | return ( 44 | handleEntryClick(entry)}> 45 | {entry} 46 | 47 | ) 48 | } 49 | export default HistoryRow 50 | -------------------------------------------------------------------------------- /src/shared/services/santize.utils.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018-2020 "Graph Foundation" 3 | * Graph Foundation, Inc. [https://graphfoundation.org] 4 | * 5 | * This file is part of ONgDB. 6 | * 7 | * ONgDB is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /* 21 | * Copyright (c) 2002-2020 "Neo4j," 22 | * Neo4j Sweden AB [http://neo4j.com] 23 | * 24 | * This file is part of Neo4j. 25 | * 26 | * Neo4j is free software: you can redistribute it and/or modify 27 | * it under the terms of the GNU General Public License as published by 28 | * the Free Software Foundation, either version 3 of the License, or 29 | * (at your option) any later version. 30 | * 31 | * This program is distributed in the hope that it will be useful, 32 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 33 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 34 | * GNU General Public License for more details. 35 | * 36 | * You should have received a copy of the GNU General Public License 37 | * along with this program. If not, see . 38 | */ 39 | import sanitizeHTML from 'sanitize-html' 40 | export const PRINT_ENTITIES = { 41 | allowedTags: [], 42 | allowedAttributes: { '*': ['*'] }, 43 | disallowedTagsMode: 'escape' 44 | } 45 | 46 | export const sanitize = config => str => sanitizeHTML(str, config) 47 | export const HTMLEntities = sanitize(PRINT_ENTITIES) 48 | -------------------------------------------------------------------------------- /src/shared/modules/cypher/queriesProcedureHelper.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018-2020 "Graph Foundation" 3 | * Graph Foundation, Inc. [https://graphfoundation.org] 4 | * 5 | * This file is part of ONgDB. 6 | * 7 | * ONgDB is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /* 21 | * Copyright (c) 2002-2020 "Neo4j," 22 | * Neo4j Sweden AB [http://neo4j.com] 23 | * 24 | * This file is part of Neo4j. 25 | * 26 | * Neo4j is free software: you can redistribute it and/or modify 27 | * it under the terms of the GNU General Public License as published by 28 | * the Free Software Foundation, either version 3 of the License, or 29 | * (at your option) any later version. 30 | * 31 | * This program is distributed in the hope that it will be useful, 32 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 33 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 34 | * GNU General Public License for more details. 35 | * 36 | * You should have received a copy of the GNU General Public License 37 | * along with this program. If not, see . 38 | */ 39 | 40 | export const getCausalClusterAddresses = 41 | 'CALL dbms.cluster.overview YIELD addresses' 42 | 43 | export function listQueriesProcedure() { 44 | return 'CALL dbms.listQueries' 45 | } 46 | 47 | export function killQueriesProcedure(queryIdList) { 48 | return `CALL dbms.killQueries([${queryIdList.map(q => `"${q}"`).join()}])` 49 | } 50 | -------------------------------------------------------------------------------- /src/browser/modules/Stream/CypherFrame/relatable-view.styled.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2002-2019 "Neo4j," 3 | * Neo4j Sweden AB [http://neo4j.com] 4 | * This file is part of Neo4j. 5 | * Neo4j is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * You should have received a copy of the GNU General Public License 14 | * along with this program. If not, see . 15 | * 16 | */ 17 | 18 | import styled from 'styled-components' 19 | 20 | export const RelatableStyleWrapper = styled.div` 21 | width: 100%; 22 | /* semantic ui specificity... */ 23 | .relatable__table-row, 24 | .relatable__table-row.relatable__table-header-row 25 | .relatable__table-header-cell { 26 | background-color: ${props => props.theme.secondaryBackground}; 27 | color: ${props => props.theme.secondaryText}; 28 | } 29 | .relatable__table-row-number { 30 | color: ${props => props.theme.preText}; 31 | background-color: ${props => props.theme.preBackground}; 32 | } 33 | .relatable__table-header-row .relatable__table-cell { 34 | border-bottom: ${props => props.theme.inFrameBorder}; 35 | } 36 | .relatable__table-body-row .relatable__table-cell { 37 | border-top: ${props => props.theme.inFrameBorder}; 38 | } 39 | ` 40 | 41 | export const StyledJsonPre = styled.pre` 42 | background-color: ${props => props.theme.preBackground}; 43 | -webkit-border-radius: 5px; 44 | border-radius: 5px; 45 | margin: 20px 10px; 46 | border-bottom: none; 47 | color: ${props => props.theme.preText}; 48 | line-height: 26px; 49 | padding: 2px 10px; 50 | max-width: 320px; 51 | white-space: pre-wrap; 52 | ` 53 | -------------------------------------------------------------------------------- /src/browser/modules/D3Visualization/lib/visualization/components/renderer.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018-2020 "Graph Foundation" 3 | * Graph Foundation, Inc. [https://graphfoundation.org] 4 | * 5 | * This file is part of ONgDB. 6 | * 7 | * ONgDB is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /* 21 | * Copyright (c) 2002-2020 "Neo4j," 22 | * Neo4j Sweden AB [http://neo4j.com] 23 | * 24 | * This file is part of Neo4j. 25 | * 26 | * Neo4j is free software: you can redistribute it and/or modify 27 | * it under the terms of the GNU General Public License as published by 28 | * the Free Software Foundation, either version 3 of the License, or 29 | * (at your option) any later version. 30 | * 31 | * This program is distributed in the hope that it will be useful, 32 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 33 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 34 | * GNU General Public License for more details. 35 | * 36 | * You should have received a copy of the GNU General Public License 37 | * along with this program. If not, see . 38 | */ 39 | export default class Renderer { 40 | onGraphChange = null 41 | onTick = null 42 | constructor(opts) { 43 | Object.assign(this, opts == null ? {} : opts) 44 | if (this.onGraphChange === null) { 45 | this.onGraphChange = function() {} 46 | } 47 | if (this.onTick === null) { 48 | this.onTick = function() {} 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/browser/components/drawer/index.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018-2020 "Graph Foundation" 3 | * Graph Foundation, Inc. [https://graphfoundation.org] 4 | * 5 | * This file is part of ONgDB. 6 | * 7 | * ONgDB is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /* 21 | * Copyright (c) 2002-2020 "Neo4j," 22 | * Neo4j Sweden AB [http://neo4j.com] 23 | * 24 | * This file is part of Neo4j. 25 | * 26 | * Neo4j is free software: you can redistribute it and/or modify 27 | * it under the terms of the GNU General Public License as published by 28 | * the Free Software Foundation, either version 3 of the License, or 29 | * (at your option) any later version. 30 | * 31 | * This program is distributed in the hope that it will be useful, 32 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 33 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 34 | * GNU General Public License for more details. 35 | * 36 | * You should have received a copy of the GNU General Public License 37 | * along with this program. If not, see . 38 | */ 39 | 40 | import { 41 | Drawer, 42 | DrawerBody, 43 | DrawerHeader, 44 | DrawerSubHeader, 45 | DrawerSection, 46 | DrawerSectionBody, 47 | DrawerToppedHeader, 48 | DrawerFooter 49 | } from './Drawer' 50 | 51 | export { 52 | Drawer, 53 | DrawerBody, 54 | DrawerHeader, 55 | DrawerSubHeader, 56 | DrawerSection, 57 | DrawerSectionBody, 58 | DrawerToppedHeader, 59 | DrawerFooter 60 | } 61 | -------------------------------------------------------------------------------- /src/shared/modules/dbMeta/__snapshots__/dbMetaDuck.test.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`hydrating state should merge inital state and state on load 1`] = ` 4 | Object { 5 | "databases": Array [], 6 | "foo": "bar", 7 | "functions": Array [], 8 | "labels": Array [], 9 | "nodes": 0, 10 | "procedures": Array [], 11 | "properties": Array [], 12 | "relationshipTypes": Array [], 13 | "relationships": 0, 14 | "role": null, 15 | "server": Object { 16 | "edition": null, 17 | "storeSize": null, 18 | "version": null, 19 | }, 20 | "settings": Object { 21 | "browser.allow_outgoing_connections": false, 22 | "browser.remote_content_hostname_whitelist": "cdn.graphfoundation.org, localhost", 23 | "browser.retain_connection_credentials": true, 24 | }, 25 | } 26 | `; 27 | 28 | exports[`updating metadata can CLEAR to reset state 1`] = ` 29 | Object { 30 | "databases": Array [], 31 | "functions": Array [], 32 | "labels": Array [], 33 | "nodes": 0, 34 | "procedures": Array [], 35 | "properties": Array [], 36 | "relationshipTypes": Array [], 37 | "relationships": 0, 38 | "role": null, 39 | "server": Object { 40 | "edition": null, 41 | "storeSize": null, 42 | "version": null, 43 | }, 44 | "settings": Object { 45 | "browser.allow_outgoing_connections": false, 46 | "browser.remote_content_hostname_whitelist": "cdn.graphfoundation.org, localhost", 47 | "browser.retain_connection_credentials": true, 48 | }, 49 | } 50 | `; 51 | 52 | exports[`updating metadata can update meta values with UPDATE 1`] = ` 53 | Object { 54 | "myKey": "yo", 55 | "noKey": true, 56 | "secondKey": true, 57 | } 58 | `; 59 | 60 | exports[`updating metadata can update server info 1`] = ` 61 | Object { 62 | "server": Object { 63 | "edition": "enterprise", 64 | "storeId": "xxxx", 65 | "version": "3.2.0-RC2", 66 | }, 67 | "shouldKeep": true, 68 | } 69 | `; 70 | 71 | exports[`updating metadata can update server settings 1`] = ` 72 | Object { 73 | "settings": Object { 74 | "browser.test": 1, 75 | }, 76 | "shouldKeep": true, 77 | } 78 | `; 79 | -------------------------------------------------------------------------------- /src/shared/modules/udc/udcHelpers.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018-2020 "Graph Foundation" 3 | * Graph Foundation, Inc. [https://graphfoundation.org] 4 | * 5 | * This file is part of ONgDB. 6 | * 7 | * ONgDB is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /* 21 | * Copyright (c) 2002-2020 "Neo4j," 22 | * Neo4j Sweden AB [http://neo4j.com] 23 | * 24 | * This file is part of Neo4j. 25 | * 26 | * Neo4j is free software: you can redistribute it and/or modify 27 | * it under the terms of the GNU General Public License as published by 28 | * the Free Software Foundation, either version 3 of the License, or 29 | * (at your option) any later version. 30 | * 31 | * This program is distributed in the hope that it will be useful, 32 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 33 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 34 | * GNU General Public License for more details. 35 | * 36 | * You should have received a copy of the GNU General Public License 37 | * along with this program. If not, see . 38 | */ 39 | 40 | export const shouldTriggerConnectEvent = (state, todayDate = null) => { 41 | const pingDate = new Date(state.pingTime || 0) 42 | const localTodayDate = todayDate || getTodayDate() 43 | if (pingDate < localTodayDate) return true 44 | return false 45 | } 46 | 47 | export const getTodayDate = () => { 48 | const today = new Date() 49 | return new Date(today.getFullYear(), today.getMonth(), today.getDate()) 50 | } 51 | -------------------------------------------------------------------------------- /src/browser/modules/Stream/PreFrame.jsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018-2020 "Graph Foundation" 3 | * Graph Foundation, Inc. [https://graphfoundation.org] 4 | * 5 | * This file is part of ONgDB. 6 | * 7 | * ONgDB is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /* 21 | * Copyright (c) 2002-2020 "Neo4j," 22 | * Neo4j Sweden AB [http://neo4j.com] 23 | * 24 | * This file is part of Neo4j. 25 | * 26 | * Neo4j is free software: you can redistribute it and/or modify 27 | * it under the terms of the GNU General Public License as published by 28 | * the Free Software Foundation, either version 3 of the License, or 29 | * (at your option) any later version. 30 | * 31 | * This program is distributed in the hope that it will be useful, 32 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 33 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 34 | * GNU General Public License for more details. 35 | * 36 | * You should have received a copy of the GNU General Public License 37 | * along with this program. If not, see . 38 | */ 39 | import React from 'react' 40 | import FrameTemplate from '../Frame/FrameTemplate' 41 | import { PaddedDiv } from './styled' 42 | 43 | const PreFrame = ({ frame }) => { 44 | return ( 45 | 49 |
    {frame.result || frame.contents}
    50 | 51 | } 52 | /> 53 | ) 54 | } 55 | export default PreFrame 56 | -------------------------------------------------------------------------------- /src/browser/modules/D3Visualization/lib/visualization/d3-appendSvg.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018-2020 "Graph Foundation" 3 | * Graph Foundation, Inc. [https://graphfoundation.org] 4 | * 5 | * This file is part of ONgDB. 6 | * 7 | * ONgDB is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /* 21 | * Copyright (c) 2002-2020 "Neo4j," 22 | * Neo4j Sweden AB [http://neo4j.com] 23 | * 24 | * This file is part of Neo4j. 25 | * 26 | * Neo4j is free software: you can redistribute it and/or modify 27 | * it under the terms of the GNU General Public License as published by 28 | * the Free Software Foundation, either version 3 of the License, or 29 | * (at your option) any later version. 30 | * 31 | * This program is distributed in the hope that it will be useful, 32 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 33 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 34 | * GNU General Public License for more details. 35 | * 36 | * You should have received a copy of the GNU General Public License 37 | * along with this program. If not, see . 38 | */ 39 | 40 | /* global DOMParser */ 41 | 42 | import d3 from 'd3' 43 | 44 | d3.selection.enter.prototype.appendSVG = function(SVGString) { 45 | return this.select(function() { 46 | return this.appendChild( 47 | document.importNode( 48 | new DOMParser().parseFromString(SVGString, 'application/xml') 49 | .documentElement.firstChild, 50 | true 51 | ) 52 | ) 53 | }) 54 | } 55 | -------------------------------------------------------------------------------- /src/browser/components/EditionView.jsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018-2020 "Graph Foundation" 3 | * Graph Foundation, Inc. [https://graphfoundation.org] 4 | * 5 | * This file is part of ONgDB. 6 | * 7 | * ONgDB is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /* 21 | * Copyright (c) 2002-2020 "Neo4j," 22 | * Neo4j Sweden AB [http://neo4j.com] 23 | * 24 | * This file is part of Neo4j. 25 | * 26 | * Neo4j is free software: you can redistribute it and/or modify 27 | * it under the terms of the GNU General Public License as published by 28 | * the Free Software Foundation, either version 3 of the License, or 29 | * (at your option) any later version. 30 | * 31 | * This program is distributed in the hope that it will be useful, 32 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 33 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 34 | * GNU General Public License for more details. 35 | * 36 | * You should have received a copy of the GNU General Public License 37 | * along with this program. If not, see . 38 | */ 39 | import React from 'react' 40 | import { Code } from '../modules/Stream/Queries/styled' 41 | 42 | export const EnterpriseOnlyFrame = ({ command }) => { 43 | return ( 44 |
    45 |

    46 | Unable to display {command} because the procedures required 47 | to run this frame are missing. These procedures are usually found in 48 | ONgDB Enterprise Edition. 49 |

    50 |
    51 | ) 52 | } 53 | -------------------------------------------------------------------------------- /src/browser/modules/Stream/Extras/SnakeFrame/Snake.test.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018-2020 "Graph Foundation" 3 | * Graph Foundation, Inc. [https://graphfoundation.org] 4 | * 5 | * This file is part of ONgDB. 6 | * 7 | * ONgDB is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /* 21 | * Copyright (c) 2002-2020 "Neo4j," 22 | * Neo4j Sweden AB [http://neo4j.com] 23 | * 24 | * This file is part of Neo4j. 25 | * 26 | * Neo4j is free software: you can redistribute it and/or modify 27 | * it under the terms of the GNU General Public License as published by 28 | * the Free Software Foundation, either version 3 of the License, or 29 | * (at your option) any later version. 30 | * 31 | * This program is distributed in the hope that it will be useful, 32 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 33 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 34 | * GNU General Public License for more details. 35 | * 36 | * You should have received a copy of the GNU General Public License 37 | * along with this program. If not, see . 38 | */ 39 | 40 | import React from 'react' 41 | import { render, fireEvent } from '@testing-library/react' 42 | 43 | import Snake from './Snake' 44 | import { SnakeFrame } from './index' 45 | 46 | test('Frame renders', () => { 47 | const { getByText } = render() 48 | const startBtn = getByText(/start the game!/i) 49 | fireEvent.click(startBtn) 50 | }) 51 | test('Extras renders', () => { 52 | render() 53 | }) 54 | -------------------------------------------------------------------------------- /src/browser/documentation/help/partials/params-on-systemdb.jsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018-2020 "Graph Foundation" 3 | * Graph Foundation, Inc. [https://graphfoundation.org] 4 | * 5 | * This file is part of ONgDB. 6 | * 7 | * ONgDB is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /* 21 | * Copyright (c) 2002-2020 "Neo4j," 22 | * Neo4j Sweden AB [http://neo4j.com] 23 | * 24 | * This file is part of Neo4j. 25 | * 26 | * Neo4j is free software: you can redistribute it and/or modify 27 | * it under the terms of the GNU General Public License as published by 28 | * the Free Software Foundation, either version 3 of the License, or 29 | * (at your option) any later version. 30 | * 31 | * This program is distributed in the hope that it will be useful, 32 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 33 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 34 | * GNU General Public License for more details. 35 | * 36 | * You should have received a copy of the GNU General Public License 37 | * along with this program. If not, see . 38 | */ 39 | import React from 'react' 40 | export default function ParamsOnSystemDb() { 41 | return ( 42 |

    43 | A note on system database 44 |
    45 | If you are using a multi-database DBMS, parameters cannot be declared when 46 | using the system database. Switch to a different database and declare, 47 | then switch back to system database and use them. 48 |

    49 | ) 50 | } 51 | -------------------------------------------------------------------------------- /src/shared/services/bolt/driverFactory.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018-2020 "Graph Foundation" 3 | * Graph Foundation, Inc. [https://graphfoundation.org] 4 | * 5 | * This file is part of ONgDB. 6 | * 7 | * ONgDB is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /* 21 | * Copyright (c) 2002-2020 "Neo4j," 22 | * Neo4j Sweden AB [http://neo4j.com] 23 | * 24 | * This file is part of Neo4j. 25 | * 26 | * Neo4j is free software: you can redistribute it and/or modify 27 | * it under the terms of the GNU General Public License as published by 28 | * the Free Software Foundation, either version 3 of the License, or 29 | * (at your option) any later version. 30 | * 31 | * This program is distributed in the hope that it will be useful, 32 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 33 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 34 | * GNU General Public License for more details. 35 | * 36 | * You should have received a copy of the GNU General Public License 37 | * along with this program. If not, see . 38 | */ 39 | 40 | import neo4j from 'neo4j-driver' 41 | 42 | export const createDriverOrFailFn = (url, auth, opts, failFn = () => {}) => { 43 | // This is needed, I haven't figured out why. I don't find any mutations to 44 | // the object, so not sure what's going on. 45 | const spreadOpts = { ...opts } 46 | try { 47 | const res = neo4j.driver(url, auth, spreadOpts) 48 | return res 49 | } catch (e) { 50 | failFn(e) 51 | return null 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/browser/modules/Stream/errorMessageFormater.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018-2020 "Graph Foundation" 3 | * Graph Foundation, Inc. [https://graphfoundation.org] 4 | * 5 | * This file is part of ONgDB. 6 | * 7 | * ONgDB is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /* 21 | * Copyright (c) 2002-2020 "Neo4j," 22 | * Neo4j Sweden AB [http://neo4j.com] 23 | * 24 | * This file is part of Neo4j. 25 | * 26 | * Neo4j is free software: you can redistribute it and/or modify 27 | * it under the terms of the GNU General Public License as published by 28 | * the Free Software Foundation, either version 3 of the License, or 29 | * (at your option) any later version. 30 | * 31 | * This program is distributed in the hope that it will be useful, 32 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 33 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 34 | * GNU General Public License for more details. 35 | * 36 | * You should have received a copy of the GNU General Public License 37 | * along with this program. If not, see . 38 | */ 39 | 40 | import { IESecurityError18 } from './Errors/IESecurityErrors' 41 | 42 | const error = (title, message) => ({ 43 | title, 44 | message: message || title 45 | }) 46 | 47 | const knownErrors = { 48 | 18: IESecurityError18 49 | } 50 | 51 | export const errorMessageFormater = (code, message) => { 52 | const title = `${code || code === 0 ? code : ''}${ 53 | code && message ? ': ' : '' 54 | }${message || ''}` 55 | return error(title, knownErrors[code]) 56 | } 57 | -------------------------------------------------------------------------------- /src/shared/modules/features/featureDuck.utils.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018-2020 "Graph Foundation" 3 | * Graph Foundation, Inc. [https://graphfoundation.org] 4 | * 5 | * This file is part of ONgDB. 6 | * 7 | * ONgDB is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /* 21 | * Copyright (c) 2002-2020 "Neo4j," 22 | * Neo4j Sweden AB [http://neo4j.com] 23 | * 24 | * This file is part of Neo4j. 25 | * 26 | * Neo4j is free software: you can redistribute it and/or modify 27 | * it under the terms of the GNU General Public License as published by 28 | * the Free Software Foundation, either version 3 of the License, or 29 | * (at your option) any later version. 30 | * 31 | * This program is distributed in the hope that it will be useful, 32 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 33 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 34 | * GNU General Public License for more details. 35 | * 36 | * You should have received a copy of the GNU General Public License 37 | * along with this program. If not, see . 38 | */ 39 | 40 | import semver from 'semver' 41 | 42 | export const guessSemverVersion = versionString => { 43 | if (!versionString) { 44 | return null 45 | } 46 | if (semver.valid(versionString)) { 47 | return versionString 48 | } 49 | 50 | const coerceVersion = semver.coerce(versionString) 51 | if (coerceVersion && coerceVersion.version) { 52 | return coerceVersion.version 53 | } 54 | 55 | // Could not get a version from the string 56 | return null 57 | } 58 | -------------------------------------------------------------------------------- /src/shared/modules/experimentalFeatures/experimentalFeaturesDuck.js: -------------------------------------------------------------------------------- 1 | import { APP_START, USER_CLEAR } from 'shared/modules/app/appDuck' 2 | 3 | export const NAME = 'experimentalFeatures' 4 | const FEATURE_ON = `${NAME}/FEATURE_ON` 5 | const FEATURE_OFF = `${NAME}/FEATURE_OFF` 6 | 7 | export const getExperimentalFeatures = state => state[NAME] 8 | export const showFeature = (state, name) => !!(state[NAME][name] || {}).on 9 | 10 | export const experimentalFeatureSelfName = 'showSelf' 11 | 12 | export const initialState = { 13 | [experimentalFeatureSelfName]: { 14 | name: experimentalFeatureSelfName, 15 | on: true, 16 | displayName: 'Show experimental features', 17 | tooltip: 'Show feature section in settings drawer' 18 | } 19 | } 20 | 21 | // Helpers 22 | const cherrypickAndMergeStates = (base, stored) => { 23 | if (!stored) { 24 | return { ...base } 25 | } 26 | const existingFeatures = Object.keys(base) 27 | return existingFeatures.reduce((all, name) => { 28 | if (!stored.hasOwnProperty(name) || stored[name].on === undefined) { 29 | all[name] = base[name] 30 | return all 31 | } 32 | all[name] = { ...base[name], on: stored[name].on } 33 | return all 34 | }, {}) 35 | } 36 | 37 | // Reducer 38 | export default function experimentalFeatures(state = initialState, action) { 39 | switch (action.type) { 40 | case APP_START: 41 | return cherrypickAndMergeStates(initialState, state) 42 | case FEATURE_ON: 43 | if (!state.hasOwnProperty(action.name)) { 44 | return state 45 | } 46 | return { ...state, [action.name]: { ...state[action.name], on: true } } 47 | case FEATURE_OFF: 48 | if (!state.hasOwnProperty(action.name)) { 49 | return state 50 | } 51 | return { ...state, [action.name]: { ...state[action.name], on: false } } 52 | case USER_CLEAR: 53 | return initialState 54 | default: 55 | return state 56 | } 57 | } 58 | 59 | export const enableExperimentalFeature = name => { 60 | return { 61 | type: FEATURE_ON, 62 | name 63 | } 64 | } 65 | 66 | export const disableExperimentalFeature = name => { 67 | return { 68 | type: FEATURE_OFF, 69 | name 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /src/browser/documentation/help/partials/admin-on-systemdb.jsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018-2020 "Graph Foundation" 3 | * Graph Foundation, Inc. [https://graphfoundation.org] 4 | * 5 | * This file is part of ONgDB. 6 | * 7 | * ONgDB is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /* 21 | * Copyright (c) 2002-2020 "Neo4j," 22 | * Neo4j Sweden AB [http://neo4j.com] 23 | * 24 | * This file is part of Neo4j. 25 | * 26 | * Neo4j is free software: you can redistribute it and/or modify 27 | * it under the terms of the GNU General Public License as published by 28 | * the Free Software Foundation, either version 3 of the License, or 29 | * (at your option) any later version. 30 | * 31 | * This program is distributed in the hope that it will be useful, 32 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 33 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 34 | * GNU General Public License for more details. 35 | * 36 | * You should have received a copy of the GNU General Public License 37 | * along with this program. If not, see . 38 | */ 39 | import React from 'react' 40 | export default function AdminOnSystemDb() { 41 | return ( 42 |

    43 | A note on system database 44 |
    45 | ONgDB has a complex security model stored in the system graph, maintained 46 | in a special database called the system database. All 47 | administrative commands need to be executed against the{' '} 48 | system database. 49 |

    50 | ) 51 | } 52 | -------------------------------------------------------------------------------- /src/browser/documentation/help/queries.jsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018-2020 "Graph Foundation" 3 | * Graph Foundation, Inc. [https://graphfoundation.org] 4 | * 5 | * This file is part of ONgDB. 6 | * 7 | * ONgDB is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /* 21 | * Copyright (c) 2002-2020 "Neo4j," 22 | * Neo4j Sweden AB [http://neo4j.com] 23 | * 24 | * This file is part of Neo4j. 25 | * 26 | * Neo4j is free software: you can redistribute it and/or modify 27 | * it under the terms of the GNU General Public License as published by 28 | * the Free Software Foundation, either version 3 of the License, or 29 | * (at your option) any later version. 30 | * 31 | * This program is distributed in the hope that it will be useful, 32 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 33 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 34 | * GNU General Public License for more details. 35 | * 36 | * You should have received a copy of the GNU General Public License 37 | * along with this program. If not, see . 38 | */ 39 | 40 | import React from 'react' 41 | const title = 'Query Status' 42 | const subtitle = 'Show query status.' 43 | const category = 'browserUiCommands' 44 | const content = ( 45 | <> 46 |

    47 | The :queries command will list your servers 48 | and clusters running queries. 49 |
    50 | From that list you have the ability to kill unwanted queries. 51 |

    52 | 53 | ) 54 | 55 | export default { title, subtitle, category, content } 56 | -------------------------------------------------------------------------------- /src/browser/components/headers/Headers.test.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018-2020 "Graph Foundation" 3 | * Graph Foundation, Inc. [https://graphfoundation.org] 4 | * 5 | * This file is part of ONgDB. 6 | * 7 | * ONgDB is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /* 21 | * Copyright (c) 2002-2020 "Neo4j," 22 | * Neo4j Sweden AB [http://neo4j.com] 23 | * 24 | * This file is part of Neo4j. 25 | * 26 | * Neo4j is free software: you can redistribute it and/or modify 27 | * it under the terms of the GNU General Public License as published by 28 | * the Free Software Foundation, either version 3 of the License, or 29 | * (at your option) any later version. 30 | * 31 | * This program is distributed in the hope that it will be useful, 32 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 33 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 34 | * GNU General Public License for more details. 35 | * 36 | * You should have received a copy of the GNU General Public License 37 | * along with this program. If not, see . 38 | */ 39 | import React from 'react' 40 | import { render } from '@testing-library/react' 41 | import { H1, H2, H3, H4, H5 } from './Headers' 42 | 43 | describe('headers', () => { 44 | test('H1 renders', () => { 45 | render(

    ) 46 | }) 47 | test('H2 renders', () => { 48 | render(

    ) 49 | }) 50 | test('H3 renders', () => { 51 | render(

    ) 52 | }) 53 | test('H4 renders', () => { 54 | render(

    ) 55 | }) 56 | test('H5 renders', () => { 57 | render(

    ) 58 | }) 59 | }) 60 | -------------------------------------------------------------------------------- /src/shared/modules/commands/helpers/grass.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018-2020 "Graph Foundation" 3 | * Graph Foundation, Inc. [https://graphfoundation.org] 4 | * 5 | * This file is part of ONgDB. 6 | * 7 | * ONgDB is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | /* 21 | * Copyright (c) 2002-2020 "Neo4j," 22 | * Neo4j Sweden AB [http://neo4j.com] 23 | * 24 | * This file is part of Neo4j. 25 | * 26 | * Neo4j is free software: you can redistribute it and/or modify 27 | * it under the terms of the GNU General Public License as published by 28 | * the Free Software Foundation, either version 3 of the License, or 29 | * (at your option) any later version. 30 | * 31 | * This program is distributed in the hope that it will be useful, 32 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 33 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 34 | * GNU General Public License for more details. 35 | * 36 | * You should have received a copy of the GNU General Public License 37 | * along with this program. If not, see . 38 | */ 39 | 40 | import { hostIsAllowed } from 'services/utils' 41 | import remote from 'services/remote' 42 | 43 | export const fetchRemoteGrass = (url, whitelist = null) => { 44 | return new Promise((resolve, reject) => { 45 | if (!hostIsAllowed(url, whitelist)) { 46 | return reject( 47 | new Error('Hostname is not allowed according to server whitelist') 48 | ) 49 | } 50 | resolve() 51 | }).then(() => { 52 | return remote.get(url).then(r => { 53 | return r 54 | }) 55 | }) 56 | } 57 | --------------------------------------------------------------------------------