From 7a6395166216db23349354597b169215f511825c Mon Sep 17 00:00:00 2001 From: Garrett Michael Flynn Date: Wed, 29 May 2024 08:30:58 -0700 Subject: [PATCH 1/4] Final simplification of repo structure --- README.md | 2 +- docs/index.rst | 2 +- electron.vite.config.js | 2 +- package.json | 12 ++--- .../assets/app-icon/logo-guide-draft.ico | Bin .../assets/css/demo.css | 0 .../assets/css/fontawesome.css | 0 .../assets/css/global.css | 0 .../assets/css/guided.css | 0 .../assets/css/individualtab.css | 0 .../assets/css/main.css | 0 .../assets/css/main_tabs.css | 0 .../assets/css/nativize.css | 0 .../{renderer => frontend}/assets/css/nav.css | 0 .../assets/css/print.css | 0 .../assets/css/section.css | 0 .../assets/css/spur.css | 0 .../assets/css/tablepath.css | 0 .../assets/css/variables.css | 0 .../assets/icons/dandi.svg | 0 .../assets/icons/delete.svg | 0 .../assets/icons/exploration.svg | 0 .../assets/icons/folder_open.svg | 0 .../assets/icons/fullscreen.svg | 0 .../assets/icons/fullscreen_exit.svg | 0 .../assets/icons/global.svg | 0 .../assets/icons/inspect.svg | 0 .../assets/icons/key.svg | 0 .../assets/icons/neurosift-logo.svg | 0 .../assets/icons/preview.svg | 0 .../assets/icons/python.svg | 0 .../assets/icons/restart.svg | 0 .../assets/icons/save.svg | 0 .../assets/icons/search.svg | 0 .../assets/icons/server.svg | 0 .../assets/icons/settings.svg | 0 .../assets/icons/web_asset.svg | 0 .../assets/icons/wifi.svg | 0 .../assets/img/logo-catalystneuro.png | Bin .../logo-guide-draft-transparent-tight.png | Bin .../img/logo-guide-draft-transparent.png | Bin .../assets/img/logo-guide-draft.png | Bin .../assets/img/logo-neuroconv.png | Bin .../assets/lotties/contact-us-lotties.js | 0 .../assets/lotties/documentation-lotties.js | 0 .../assets/lotties/index.js | 0 .../assets/lotties/overview-lotties.js | 0 .../core/components}/Accordion.js | 0 .../core/components}/BasicTable.js | 0 .../core/components}/Button.js | 0 .../core/components}/Chevron.js | 0 .../core/components}/CodeBlock.js | 0 .../core/components}/DandiResults.js | 0 .../core/components}/Dashboard.js | 5 +- .../core/components}/DateTimeSelector.js | 0 .../core/components}/FileSystemSelector.js | 2 +- .../core/components}/Footer.js | 0 .../core/components}/FullScreenToggle.ts | 0 .../core/components}/InfoBox.js | 0 .../core/components}/InstanceManager.js | 2 +- .../core/components}/JSONSchemaForm.js | 0 .../core/components}/JSONSchemaInput.js | 0 .../core/components}/List.ts | 0 .../core/components}/Loader.ts | 0 .../core/components}/Main.js | 0 .../core/components}/Modal.ts | 0 .../core/components}/NavigationSidebar.js | 0 .../core/components}/OptionalSection.js | 0 .../core/components}/Overlay.ts | 0 .../core/components}/ProgressBar.ts | 0 .../core/components}/Search.js | 0 .../core/components}/SimpleTable.js | 0 .../core/components}/Table.js | 0 .../core/components}/forms/GlobalFormModal.ts | 0 .../core/components}/forms/utils.ts | 0 .../core/components}/globals.js | 0 .../core/components}/hot.js | 0 .../core/components}/instances/item.ts | 0 .../multiselect/MultiSelectForm.js | 0 .../core/components}/pages/FormPage.js | 0 .../core/components}/pages/Page.js | 5 +- .../core/components}/pages/Unsafe.js | 0 .../components}/pages/contact-us/Contact.js | 2 +- .../pages/documentation/Documentation.js | 2 +- .../pages/getting-started/GettingStarted.js | 0 .../core/components}/pages/globals.js | 0 .../pages/guided-mode/GuidedFooter.js | 0 .../pages/guided-mode/GuidedHeader.js | 0 .../pages/guided-mode/GuidedHome.js | 2 +- .../pages/guided-mode/GuidedStart.js | 0 .../pages/guided-mode/ProgressCard.js | 0 .../pages/guided-mode/data/GuidedMetadata.js | 0 .../guided-mode/data/GuidedPathExpansion.js | 2 +- .../guided-mode/data/GuidedSourceData.js | 4 +- .../pages/guided-mode/data/GuidedStructure.js | 0 .../pages/guided-mode/data/ManagedPage.js | 0 .../pages/guided-mode/data/utils.js | 2 +- .../options/GuidedInspectorPage.js | 2 +- .../guided-mode/options/GuidedStubPreview.js | 2 +- .../pages/guided-mode/options/GuidedUpload.js | 0 .../pages/guided-mode/options/utils.js | 0 .../guided-mode/results/GuidedDandiResults.js | 0 .../guided-mode/results/GuidedResults.js | 2 +- .../guided-mode/setup/GuidedNewDatasetInfo.js | 0 .../pages/guided-mode/setup/GuidedSubjects.js | 0 .../pages/guided-mode/setup/Preform.js | 0 .../pages/guided-mode/setup/utils.ts | 0 .../components}/pages/inspect/InspectPage.js | 0 .../core/components}/pages/inspect/utils.js | 0 .../components}/pages/preview/PreviewPage.js | 0 .../pages/settings/SettingsPage.js | 6 ++- .../components}/pages/uploads/UploadsPage.js | 0 .../core/components}/pages/uploads/utils.ts | 0 .../core/components}/pages/utils.js | 0 .../components}/preview/NWBFilePreview.js | 2 +- .../core/components}/preview/Neurosift.js | 0 .../preview/inspector/InspectorList.js | 0 .../core/components}/sidebar.js | 0 .../core/components}/status/StatusBar.ts | 0 .../components}/status/StatusIndicator.ts | 0 .../core/components}/table/Cell.ts | 0 .../core/components}/table/ContextMenu.ts | 0 .../core/components}/table/cells/array.ts | 0 .../core/components}/table/cells/base.ts | 0 .../core/components}/table/cells/date-time.ts | 0 .../core/components}/table/cells/dropdown.ts | 0 .../components}/table/cells/editors/base.ts | 0 .../core/components}/table/cells/input.ts | 4 +- .../components}/table/cells/renderers/base.ts | 0 .../core/components}/table/convert.ts | 0 .../core/components}/table/utils.ts | 0 .../core/components}/utils/progress.js | 0 .../core/components}/utils/useGlobalStyles.js | 0 .../core/dependencies.js} | 2 - .../{renderer/src => frontend/core}/errors.ts | 2 +- .../simple.js => frontend/core/globals.js} | 18 ++++++-- .../{renderer/src => frontend/core}/index.ts | 8 ++-- .../{renderer/src => frontend/core}/pages.js | 43 +++++++++--------- .../src => frontend/core}/progress/index.js | 6 +-- .../core}/progress/operations.js | 4 +- .../src => frontend/core}/progress/update.js | 4 +- .../src => frontend/core}/promises.ts | 0 .../src => frontend/core}/server/globals.ts | 4 +- .../src => frontend/core}/server/index.ts | 6 +-- .../src => frontend/core}/validation/dandi.ts | 0 .../src => frontend/core}/validation/index.js | 0 .../core}/validation/validation.json | 0 .../core}/validation/validation.ts | 2 +- .../{renderer => frontend}/index.html | 2 +- .../index.js => frontend/utils/electron.js} | 6 +-- .../{renderer => frontend}/utils/url.js | 0 src/electron/main/main.ts | 2 +- src/electron/main/splash-screen.html | 2 +- src/electron/renderer/src/electron/check.js | 3 -- src/electron/renderer/src/globals.js | 12 ----- src/schemas/base-metadata.schema.ts | 8 ++-- src/schemas/dandi-upload.schema.ts | 8 ++-- src/schemas/interfaces.info.ts | 4 +- stories/Pages.stories.js | 2 +- stories/components/Accordion.stories.js | 2 +- stories/components/Button.stories.js | 2 +- .../components/FileSystemSelector.stories.js | 2 +- stories/components/InspectorList.stories.js | 2 +- stories/components/InstanceManager.stories.js | 4 +- stories/components/JSONSchemaForm.stories.js | 2 +- stories/components/List.stories.js | 2 +- stories/components/Multiselect.stories.js | 2 +- stories/components/OptionalSection.stories.js | 2 +- stories/components/ProgressBar.stories.js | 2 +- stories/components/Search.stories.js | 2 +- stories/components/StatusBar.stories.js | 8 ++-- stories/components/Table.stories.js | 6 +-- stories/pages/storyStates.ts | 4 +- tests/e2e/pipelines.test.ts | 2 +- tests/metadata.test.ts | 16 +++---- tests/progress.test.ts | 6 +-- 176 files changed, 139 insertions(+), 139 deletions(-) rename src/electron/{renderer => frontend}/assets/app-icon/logo-guide-draft.ico (100%) rename src/electron/{renderer => frontend}/assets/css/demo.css (100%) rename src/electron/{renderer => frontend}/assets/css/fontawesome.css (100%) rename src/electron/{renderer => frontend}/assets/css/global.css (100%) rename src/electron/{renderer => frontend}/assets/css/guided.css (100%) rename src/electron/{renderer => frontend}/assets/css/individualtab.css (100%) rename src/electron/{renderer => frontend}/assets/css/main.css (100%) rename src/electron/{renderer => frontend}/assets/css/main_tabs.css (100%) rename src/electron/{renderer => frontend}/assets/css/nativize.css (100%) rename src/electron/{renderer => frontend}/assets/css/nav.css (100%) rename src/electron/{renderer => frontend}/assets/css/print.css (100%) rename src/electron/{renderer => frontend}/assets/css/section.css (100%) rename src/electron/{renderer => frontend}/assets/css/spur.css (100%) rename src/electron/{renderer => frontend}/assets/css/tablepath.css (100%) rename src/electron/{renderer => frontend}/assets/css/variables.css (100%) rename src/electron/{renderer => frontend}/assets/icons/dandi.svg (100%) rename src/electron/{renderer => frontend}/assets/icons/delete.svg (100%) rename src/electron/{renderer => frontend}/assets/icons/exploration.svg (100%) rename src/electron/{renderer => frontend}/assets/icons/folder_open.svg (100%) rename src/electron/{renderer => frontend}/assets/icons/fullscreen.svg (100%) rename src/electron/{renderer => frontend}/assets/icons/fullscreen_exit.svg (100%) rename src/electron/{renderer => frontend}/assets/icons/global.svg (100%) rename src/electron/{renderer => frontend}/assets/icons/inspect.svg (100%) rename src/electron/{renderer => frontend}/assets/icons/key.svg (100%) rename src/electron/{renderer => frontend}/assets/icons/neurosift-logo.svg (100%) rename src/electron/{renderer => frontend}/assets/icons/preview.svg (100%) rename src/electron/{renderer => frontend}/assets/icons/python.svg (100%) rename src/electron/{renderer => frontend}/assets/icons/restart.svg (100%) rename src/electron/{renderer => frontend}/assets/icons/save.svg (100%) rename src/electron/{renderer => frontend}/assets/icons/search.svg (100%) rename src/electron/{renderer => frontend}/assets/icons/server.svg (100%) rename src/electron/{renderer => frontend}/assets/icons/settings.svg (100%) rename src/electron/{renderer => frontend}/assets/icons/web_asset.svg (100%) rename src/electron/{renderer => frontend}/assets/icons/wifi.svg (100%) rename src/electron/{renderer => frontend}/assets/img/logo-catalystneuro.png (100%) rename src/electron/{renderer => frontend}/assets/img/logo-guide-draft-transparent-tight.png (100%) rename src/electron/{renderer => frontend}/assets/img/logo-guide-draft-transparent.png (100%) rename src/electron/{renderer => frontend}/assets/img/logo-guide-draft.png (100%) rename src/electron/{renderer => frontend}/assets/img/logo-neuroconv.png (100%) rename src/electron/{renderer => frontend}/assets/lotties/contact-us-lotties.js (100%) rename src/electron/{renderer => frontend}/assets/lotties/documentation-lotties.js (100%) rename src/electron/{renderer => frontend}/assets/lotties/index.js (100%) rename src/electron/{renderer => frontend}/assets/lotties/overview-lotties.js (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/Accordion.js (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/BasicTable.js (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/Button.js (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/Chevron.js (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/CodeBlock.js (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/DandiResults.js (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/Dashboard.js (96%) rename src/electron/{renderer/src/stories => frontend/core/components}/DateTimeSelector.js (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/FileSystemSelector.js (96%) rename src/electron/{renderer/src/stories => frontend/core/components}/Footer.js (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/FullScreenToggle.ts (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/InfoBox.js (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/InstanceManager.js (96%) rename src/electron/{renderer/src/stories => frontend/core/components}/JSONSchemaForm.js (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/JSONSchemaInput.js (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/List.ts (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/Loader.ts (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/Main.js (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/Modal.ts (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/NavigationSidebar.js (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/OptionalSection.js (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/Overlay.ts (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/ProgressBar.ts (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/Search.js (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/SimpleTable.js (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/Table.js (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/forms/GlobalFormModal.ts (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/forms/utils.ts (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/globals.js (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/hot.js (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/instances/item.ts (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/multiselect/MultiSelectForm.js (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/pages/FormPage.js (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/pages/Page.js (96%) rename src/electron/{renderer/src/stories => frontend/core/components}/pages/Unsafe.js (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/pages/contact-us/Contact.js (94%) rename src/electron/{renderer/src/stories => frontend/core/components}/pages/documentation/Documentation.js (96%) rename src/electron/{renderer/src/stories => frontend/core/components}/pages/getting-started/GettingStarted.js (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/pages/globals.js (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/pages/guided-mode/GuidedFooter.js (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/pages/guided-mode/GuidedHeader.js (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/pages/guided-mode/GuidedHome.js (97%) rename src/electron/{renderer/src/stories => frontend/core/components}/pages/guided-mode/GuidedStart.js (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/pages/guided-mode/ProgressCard.js (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/pages/guided-mode/data/GuidedMetadata.js (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/pages/guided-mode/data/GuidedPathExpansion.js (97%) rename src/electron/{renderer/src/stories => frontend/core/components}/pages/guided-mode/data/GuidedSourceData.js (97%) rename src/electron/{renderer/src/stories => frontend/core/components}/pages/guided-mode/data/GuidedStructure.js (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/pages/guided-mode/data/ManagedPage.js (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/pages/guided-mode/data/utils.js (96%) rename src/electron/{renderer/src/stories => frontend/core/components}/pages/guided-mode/options/GuidedInspectorPage.js (96%) rename src/electron/{renderer/src/stories => frontend/core/components}/pages/guided-mode/options/GuidedStubPreview.js (94%) rename src/electron/{renderer/src/stories => frontend/core/components}/pages/guided-mode/options/GuidedUpload.js (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/pages/guided-mode/options/utils.js (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/pages/guided-mode/results/GuidedDandiResults.js (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/pages/guided-mode/results/GuidedResults.js (93%) rename src/electron/{renderer/src/stories => frontend/core/components}/pages/guided-mode/setup/GuidedNewDatasetInfo.js (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/pages/guided-mode/setup/GuidedSubjects.js (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/pages/guided-mode/setup/Preform.js (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/pages/guided-mode/setup/utils.ts (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/pages/inspect/InspectPage.js (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/pages/inspect/utils.js (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/pages/preview/PreviewPage.js (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/pages/settings/SettingsPage.js (96%) rename src/electron/{renderer/src/stories => frontend/core/components}/pages/uploads/UploadsPage.js (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/pages/uploads/utils.ts (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/pages/utils.js (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/preview/NWBFilePreview.js (96%) rename src/electron/{renderer/src/stories => frontend/core/components}/preview/Neurosift.js (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/preview/inspector/InspectorList.js (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/sidebar.js (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/status/StatusBar.ts (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/status/StatusIndicator.ts (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/table/Cell.ts (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/table/ContextMenu.ts (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/table/cells/array.ts (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/table/cells/base.ts (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/table/cells/date-time.ts (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/table/cells/dropdown.ts (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/table/cells/editors/base.ts (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/table/cells/input.ts (97%) rename src/electron/{renderer/src/stories => frontend/core/components}/table/cells/renderers/base.ts (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/table/convert.ts (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/table/utils.ts (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/utils/progress.js (100%) rename src/electron/{renderer/src/stories => frontend/core/components}/utils/useGlobalStyles.js (100%) rename src/electron/{renderer/src/dependencies/globals.js => frontend/core/dependencies.js} (95%) rename src/electron/{renderer/src => frontend/core}/errors.ts (74%) rename src/electron/{renderer/src/dependencies/simple.js => frontend/core/globals.js} (69%) rename src/electron/{renderer/src => frontend/core}/index.ts (95%) rename src/electron/{renderer/src => frontend/core}/pages.js (73%) rename src/electron/{renderer/src => frontend/core}/progress/index.js (95%) rename src/electron/{renderer/src => frontend/core}/progress/operations.js (88%) rename src/electron/{renderer/src => frontend/core}/progress/update.js (93%) rename src/electron/{renderer/src => frontend/core}/promises.ts (100%) rename src/electron/{renderer/src => frontend/core}/server/globals.ts (94%) rename src/electron/{renderer/src => frontend/core}/server/index.ts (94%) rename src/electron/{renderer/src => frontend/core}/validation/dandi.ts (100%) rename src/electron/{renderer/src => frontend/core}/validation/index.js (100%) rename src/electron/{renderer/src => frontend/core}/validation/validation.json (100%) rename src/electron/{renderer/src => frontend/core}/validation/validation.ts (99%) rename src/electron/{renderer => frontend}/index.html (97%) rename src/electron/{renderer/src/electron/index.js => frontend/utils/electron.js} (88%) rename src/electron/{renderer => frontend}/utils/url.js (100%) delete mode 100644 src/electron/renderer/src/electron/check.js delete mode 100644 src/electron/renderer/src/globals.js diff --git a/README.md b/README.md index bf95742c4..d86a00a2d 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@

- NeuroConv logo + NeuroConv logo

NWB Graphical User Interface for Data Entry

Full Tests diff --git a/docs/index.rst b/docs/index.rst index 2fb04c252..2805f6417 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -2,7 +2,7 @@ NWB GUIDE documentation ======================= | -.. image:: ../src/electron/renderer/assets/img/logo-guide-draft-transparent-tight.png +.. image:: ../src/electron/frontend/assets/img/logo-guide-draft-transparent-tight.png :scale: 50 % :align: center :alt: NWB GUIDE logo diff --git a/electron.vite.config.js b/electron.vite.config.js index 21a8b4b8f..bf952ab7c 100644 --- a/electron.vite.config.js +++ b/electron.vite.config.js @@ -4,7 +4,7 @@ import ViteYaml from "@modyfi/vite-plugin-yaml"; import { resolve } from "path"; -const htmlRoot = "src/electron/renderer"; +const htmlRoot = "src/electron/frontend"; export default defineConfig({ main: { diff --git a/package.json b/package.json index 0d9b55dd9..81aea6245 100644 --- a/package.json +++ b/package.json @@ -10,9 +10,7 @@ "scripts": { "start": "electron-vite dev --outDir build", "postinstall": "electron-builder install-app-deps", - "dev": "concurrently -n BE,FE --kill-others \"npm run dev:server\" \"npm run dev:app\"", - "dev:app": "vite src/electron/renderer", - "dev:server": "cd src/pyflask && python -m flask run --port 4242", + "server": "cd src/pyflask && python -m flask run --port 4242", "build": "npm run build:app", "echo": "python -c \"print('hello')\"", "build:app": "electron-vite build --outDir build", @@ -77,7 +75,7 @@ "win": { "asar": false, "target": "nsis", - "icon": "src/electron/renderer/assets/app-icon/logo-guide-draft.ico", + "icon": "src/electron/frontend/assets/app-icon/logo-guide-draft.ico", "requestedExecutionLevel": "requireAdministrator" }, "mac": { @@ -98,7 +96,7 @@ ] } ], - "icon": "src/electron/renderer/assets/img/logo-guide-draft.png", + "icon": "src/electron/frontend/assets/img/logo-guide-draft.png", "darkModeSupport": false, "hardenedRuntime": true, "gatekeeperAssess": false, @@ -114,7 +112,7 @@ "linux": { "asar": true, "target": "AppImage", - "icon": "src/electron/renderer/assets/img/logo-guide-draft.png", + "icon": "src/electron/frontend/assets/img/logo-guide-draft.png", "extraResources": [ { "from": "./build/flask/nwb-guide", @@ -127,7 +125,7 @@ "oneClick": false, "perMachine": false, "allowToChangeInstallationDirectory": true, - "installerIcon": "src/electron/renderer/assets/app-icon/logo-guide-draft.ico" + "installerIcon": "src/electron/frontend/assets/app-icon/logo-guide-draft.ico" }, "publish": { "provider": "github" diff --git a/src/electron/renderer/assets/app-icon/logo-guide-draft.ico b/src/electron/frontend/assets/app-icon/logo-guide-draft.ico similarity index 100% rename from src/electron/renderer/assets/app-icon/logo-guide-draft.ico rename to src/electron/frontend/assets/app-icon/logo-guide-draft.ico diff --git a/src/electron/renderer/assets/css/demo.css b/src/electron/frontend/assets/css/demo.css similarity index 100% rename from src/electron/renderer/assets/css/demo.css rename to src/electron/frontend/assets/css/demo.css diff --git a/src/electron/renderer/assets/css/fontawesome.css b/src/electron/frontend/assets/css/fontawesome.css similarity index 100% rename from src/electron/renderer/assets/css/fontawesome.css rename to src/electron/frontend/assets/css/fontawesome.css diff --git a/src/electron/renderer/assets/css/global.css b/src/electron/frontend/assets/css/global.css similarity index 100% rename from src/electron/renderer/assets/css/global.css rename to src/electron/frontend/assets/css/global.css diff --git a/src/electron/renderer/assets/css/guided.css b/src/electron/frontend/assets/css/guided.css similarity index 100% rename from src/electron/renderer/assets/css/guided.css rename to src/electron/frontend/assets/css/guided.css diff --git a/src/electron/renderer/assets/css/individualtab.css b/src/electron/frontend/assets/css/individualtab.css similarity index 100% rename from src/electron/renderer/assets/css/individualtab.css rename to src/electron/frontend/assets/css/individualtab.css diff --git a/src/electron/renderer/assets/css/main.css b/src/electron/frontend/assets/css/main.css similarity index 100% rename from src/electron/renderer/assets/css/main.css rename to src/electron/frontend/assets/css/main.css diff --git a/src/electron/renderer/assets/css/main_tabs.css b/src/electron/frontend/assets/css/main_tabs.css similarity index 100% rename from src/electron/renderer/assets/css/main_tabs.css rename to src/electron/frontend/assets/css/main_tabs.css diff --git a/src/electron/renderer/assets/css/nativize.css b/src/electron/frontend/assets/css/nativize.css similarity index 100% rename from src/electron/renderer/assets/css/nativize.css rename to src/electron/frontend/assets/css/nativize.css diff --git a/src/electron/renderer/assets/css/nav.css b/src/electron/frontend/assets/css/nav.css similarity index 100% rename from src/electron/renderer/assets/css/nav.css rename to src/electron/frontend/assets/css/nav.css diff --git a/src/electron/renderer/assets/css/print.css b/src/electron/frontend/assets/css/print.css similarity index 100% rename from src/electron/renderer/assets/css/print.css rename to src/electron/frontend/assets/css/print.css diff --git a/src/electron/renderer/assets/css/section.css b/src/electron/frontend/assets/css/section.css similarity index 100% rename from src/electron/renderer/assets/css/section.css rename to src/electron/frontend/assets/css/section.css diff --git a/src/electron/renderer/assets/css/spur.css b/src/electron/frontend/assets/css/spur.css similarity index 100% rename from src/electron/renderer/assets/css/spur.css rename to src/electron/frontend/assets/css/spur.css diff --git a/src/electron/renderer/assets/css/tablepath.css b/src/electron/frontend/assets/css/tablepath.css similarity index 100% rename from src/electron/renderer/assets/css/tablepath.css rename to src/electron/frontend/assets/css/tablepath.css diff --git a/src/electron/renderer/assets/css/variables.css b/src/electron/frontend/assets/css/variables.css similarity index 100% rename from src/electron/renderer/assets/css/variables.css rename to src/electron/frontend/assets/css/variables.css diff --git a/src/electron/renderer/assets/icons/dandi.svg b/src/electron/frontend/assets/icons/dandi.svg similarity index 100% rename from src/electron/renderer/assets/icons/dandi.svg rename to src/electron/frontend/assets/icons/dandi.svg diff --git a/src/electron/renderer/assets/icons/delete.svg b/src/electron/frontend/assets/icons/delete.svg similarity index 100% rename from src/electron/renderer/assets/icons/delete.svg rename to src/electron/frontend/assets/icons/delete.svg diff --git a/src/electron/renderer/assets/icons/exploration.svg b/src/electron/frontend/assets/icons/exploration.svg similarity index 100% rename from src/electron/renderer/assets/icons/exploration.svg rename to src/electron/frontend/assets/icons/exploration.svg diff --git a/src/electron/renderer/assets/icons/folder_open.svg b/src/electron/frontend/assets/icons/folder_open.svg similarity index 100% rename from src/electron/renderer/assets/icons/folder_open.svg rename to src/electron/frontend/assets/icons/folder_open.svg diff --git a/src/electron/renderer/assets/icons/fullscreen.svg b/src/electron/frontend/assets/icons/fullscreen.svg similarity index 100% rename from src/electron/renderer/assets/icons/fullscreen.svg rename to src/electron/frontend/assets/icons/fullscreen.svg diff --git a/src/electron/renderer/assets/icons/fullscreen_exit.svg b/src/electron/frontend/assets/icons/fullscreen_exit.svg similarity index 100% rename from src/electron/renderer/assets/icons/fullscreen_exit.svg rename to src/electron/frontend/assets/icons/fullscreen_exit.svg diff --git a/src/electron/renderer/assets/icons/global.svg b/src/electron/frontend/assets/icons/global.svg similarity index 100% rename from src/electron/renderer/assets/icons/global.svg rename to src/electron/frontend/assets/icons/global.svg diff --git a/src/electron/renderer/assets/icons/inspect.svg b/src/electron/frontend/assets/icons/inspect.svg similarity index 100% rename from src/electron/renderer/assets/icons/inspect.svg rename to src/electron/frontend/assets/icons/inspect.svg diff --git a/src/electron/renderer/assets/icons/key.svg b/src/electron/frontend/assets/icons/key.svg similarity index 100% rename from src/electron/renderer/assets/icons/key.svg rename to src/electron/frontend/assets/icons/key.svg diff --git a/src/electron/renderer/assets/icons/neurosift-logo.svg b/src/electron/frontend/assets/icons/neurosift-logo.svg similarity index 100% rename from src/electron/renderer/assets/icons/neurosift-logo.svg rename to src/electron/frontend/assets/icons/neurosift-logo.svg diff --git a/src/electron/renderer/assets/icons/preview.svg b/src/electron/frontend/assets/icons/preview.svg similarity index 100% rename from src/electron/renderer/assets/icons/preview.svg rename to src/electron/frontend/assets/icons/preview.svg diff --git a/src/electron/renderer/assets/icons/python.svg b/src/electron/frontend/assets/icons/python.svg similarity index 100% rename from src/electron/renderer/assets/icons/python.svg rename to src/electron/frontend/assets/icons/python.svg diff --git a/src/electron/renderer/assets/icons/restart.svg b/src/electron/frontend/assets/icons/restart.svg similarity index 100% rename from src/electron/renderer/assets/icons/restart.svg rename to src/electron/frontend/assets/icons/restart.svg diff --git a/src/electron/renderer/assets/icons/save.svg b/src/electron/frontend/assets/icons/save.svg similarity index 100% rename from src/electron/renderer/assets/icons/save.svg rename to src/electron/frontend/assets/icons/save.svg diff --git a/src/electron/renderer/assets/icons/search.svg b/src/electron/frontend/assets/icons/search.svg similarity index 100% rename from src/electron/renderer/assets/icons/search.svg rename to src/electron/frontend/assets/icons/search.svg diff --git a/src/electron/renderer/assets/icons/server.svg b/src/electron/frontend/assets/icons/server.svg similarity index 100% rename from src/electron/renderer/assets/icons/server.svg rename to src/electron/frontend/assets/icons/server.svg diff --git a/src/electron/renderer/assets/icons/settings.svg b/src/electron/frontend/assets/icons/settings.svg similarity index 100% rename from src/electron/renderer/assets/icons/settings.svg rename to src/electron/frontend/assets/icons/settings.svg diff --git a/src/electron/renderer/assets/icons/web_asset.svg b/src/electron/frontend/assets/icons/web_asset.svg similarity index 100% rename from src/electron/renderer/assets/icons/web_asset.svg rename to src/electron/frontend/assets/icons/web_asset.svg diff --git a/src/electron/renderer/assets/icons/wifi.svg b/src/electron/frontend/assets/icons/wifi.svg similarity index 100% rename from src/electron/renderer/assets/icons/wifi.svg rename to src/electron/frontend/assets/icons/wifi.svg diff --git a/src/electron/renderer/assets/img/logo-catalystneuro.png b/src/electron/frontend/assets/img/logo-catalystneuro.png similarity index 100% rename from src/electron/renderer/assets/img/logo-catalystneuro.png rename to src/electron/frontend/assets/img/logo-catalystneuro.png diff --git a/src/electron/renderer/assets/img/logo-guide-draft-transparent-tight.png b/src/electron/frontend/assets/img/logo-guide-draft-transparent-tight.png similarity index 100% rename from src/electron/renderer/assets/img/logo-guide-draft-transparent-tight.png rename to src/electron/frontend/assets/img/logo-guide-draft-transparent-tight.png diff --git a/src/electron/renderer/assets/img/logo-guide-draft-transparent.png b/src/electron/frontend/assets/img/logo-guide-draft-transparent.png similarity index 100% rename from src/electron/renderer/assets/img/logo-guide-draft-transparent.png rename to src/electron/frontend/assets/img/logo-guide-draft-transparent.png diff --git a/src/electron/renderer/assets/img/logo-guide-draft.png b/src/electron/frontend/assets/img/logo-guide-draft.png similarity index 100% rename from src/electron/renderer/assets/img/logo-guide-draft.png rename to src/electron/frontend/assets/img/logo-guide-draft.png diff --git a/src/electron/renderer/assets/img/logo-neuroconv.png b/src/electron/frontend/assets/img/logo-neuroconv.png similarity index 100% rename from src/electron/renderer/assets/img/logo-neuroconv.png rename to src/electron/frontend/assets/img/logo-neuroconv.png diff --git a/src/electron/renderer/assets/lotties/contact-us-lotties.js b/src/electron/frontend/assets/lotties/contact-us-lotties.js similarity index 100% rename from src/electron/renderer/assets/lotties/contact-us-lotties.js rename to src/electron/frontend/assets/lotties/contact-us-lotties.js diff --git a/src/electron/renderer/assets/lotties/documentation-lotties.js b/src/electron/frontend/assets/lotties/documentation-lotties.js similarity index 100% rename from src/electron/renderer/assets/lotties/documentation-lotties.js rename to src/electron/frontend/assets/lotties/documentation-lotties.js diff --git a/src/electron/renderer/assets/lotties/index.js b/src/electron/frontend/assets/lotties/index.js similarity index 100% rename from src/electron/renderer/assets/lotties/index.js rename to src/electron/frontend/assets/lotties/index.js diff --git a/src/electron/renderer/assets/lotties/overview-lotties.js b/src/electron/frontend/assets/lotties/overview-lotties.js similarity index 100% rename from src/electron/renderer/assets/lotties/overview-lotties.js rename to src/electron/frontend/assets/lotties/overview-lotties.js diff --git a/src/electron/renderer/src/stories/Accordion.js b/src/electron/frontend/core/components/Accordion.js similarity index 100% rename from src/electron/renderer/src/stories/Accordion.js rename to src/electron/frontend/core/components/Accordion.js diff --git a/src/electron/renderer/src/stories/BasicTable.js b/src/electron/frontend/core/components/BasicTable.js similarity index 100% rename from src/electron/renderer/src/stories/BasicTable.js rename to src/electron/frontend/core/components/BasicTable.js diff --git a/src/electron/renderer/src/stories/Button.js b/src/electron/frontend/core/components/Button.js similarity index 100% rename from src/electron/renderer/src/stories/Button.js rename to src/electron/frontend/core/components/Button.js diff --git a/src/electron/renderer/src/stories/Chevron.js b/src/electron/frontend/core/components/Chevron.js similarity index 100% rename from src/electron/renderer/src/stories/Chevron.js rename to src/electron/frontend/core/components/Chevron.js diff --git a/src/electron/renderer/src/stories/CodeBlock.js b/src/electron/frontend/core/components/CodeBlock.js similarity index 100% rename from src/electron/renderer/src/stories/CodeBlock.js rename to src/electron/frontend/core/components/CodeBlock.js diff --git a/src/electron/renderer/src/stories/DandiResults.js b/src/electron/frontend/core/components/DandiResults.js similarity index 100% rename from src/electron/renderer/src/stories/DandiResults.js rename to src/electron/frontend/core/components/DandiResults.js diff --git a/src/electron/renderer/src/stories/Dashboard.js b/src/electron/frontend/core/components/Dashboard.js similarity index 96% rename from src/electron/renderer/src/stories/Dashboard.js rename to src/electron/frontend/core/components/Dashboard.js index 74a228430..0b3b96ca5 100644 --- a/src/electron/renderer/src/stories/Dashboard.js +++ b/src/electron/frontend/core/components/Dashboard.js @@ -29,8 +29,9 @@ import "../../../../../node_modules/fomantic-ui/dist/components/accordion.min.cs import "../../../../../node_modules/@sweetalert2/theme-bulma/bulma.css"; // import "../../node_modules/intro.js/minified/introjs.min.css" import "../../assets/css/guided.css"; -import isElectron from "../electron/check.js"; -import { isStorybook, reloadPageToHome } from "../dependencies/globals"; +import { isElectron } from "../../utils/electron.js"; +import { isStorybook, reloadPageToHome } from "../globals.js"; + import { getCurrentProjectName, updateAppProgress } from "../progress/index.js"; // import "https://jsuites.net/v4/jsuites.js" diff --git a/src/electron/renderer/src/stories/DateTimeSelector.js b/src/electron/frontend/core/components/DateTimeSelector.js similarity index 100% rename from src/electron/renderer/src/stories/DateTimeSelector.js rename to src/electron/frontend/core/components/DateTimeSelector.js diff --git a/src/electron/renderer/src/stories/FileSystemSelector.js b/src/electron/frontend/core/components/FileSystemSelector.js similarity index 96% rename from src/electron/renderer/src/stories/FileSystemSelector.js rename to src/electron/frontend/core/components/FileSystemSelector.js index 3bef33378..da0c10140 100644 --- a/src/electron/renderer/src/stories/FileSystemSelector.js +++ b/src/electron/frontend/core/components/FileSystemSelector.js @@ -1,6 +1,6 @@ import { LitElement, css, html } from "lit"; -import { fs, remote } from "../electron/index"; +import { fs, remote } from "../../utils/electron"; import { List } from "./List"; const { dialog } = remote; diff --git a/src/electron/renderer/src/stories/Footer.js b/src/electron/frontend/core/components/Footer.js similarity index 100% rename from src/electron/renderer/src/stories/Footer.js rename to src/electron/frontend/core/components/Footer.js diff --git a/src/electron/renderer/src/stories/FullScreenToggle.ts b/src/electron/frontend/core/components/FullScreenToggle.ts similarity index 100% rename from src/electron/renderer/src/stories/FullScreenToggle.ts rename to src/electron/frontend/core/components/FullScreenToggle.ts diff --git a/src/electron/renderer/src/stories/InfoBox.js b/src/electron/frontend/core/components/InfoBox.js similarity index 100% rename from src/electron/renderer/src/stories/InfoBox.js rename to src/electron/frontend/core/components/InfoBox.js diff --git a/src/electron/renderer/src/stories/InstanceManager.js b/src/electron/frontend/core/components/InstanceManager.js similarity index 96% rename from src/electron/renderer/src/stories/InstanceManager.js rename to src/electron/frontend/core/components/InstanceManager.js index 41ecd6e37..cc5071713 100644 --- a/src/electron/renderer/src/stories/InstanceManager.js +++ b/src/electron/frontend/core/components/InstanceManager.js @@ -1,6 +1,6 @@ import { LitElement, css, html } from "lit"; import "./Button"; -import { notify } from "../dependencies/globals"; +import { notify } from "../dependencies"; import { Accordion } from "./Accordion"; import { InstanceListItem } from "./instances/item"; import { checkStatus } from "../validation"; diff --git a/src/electron/renderer/src/stories/JSONSchemaForm.js b/src/electron/frontend/core/components/JSONSchemaForm.js similarity index 100% rename from src/electron/renderer/src/stories/JSONSchemaForm.js rename to src/electron/frontend/core/components/JSONSchemaForm.js diff --git a/src/electron/renderer/src/stories/JSONSchemaInput.js b/src/electron/frontend/core/components/JSONSchemaInput.js similarity index 100% rename from src/electron/renderer/src/stories/JSONSchemaInput.js rename to src/electron/frontend/core/components/JSONSchemaInput.js diff --git a/src/electron/renderer/src/stories/List.ts b/src/electron/frontend/core/components/List.ts similarity index 100% rename from src/electron/renderer/src/stories/List.ts rename to src/electron/frontend/core/components/List.ts diff --git a/src/electron/renderer/src/stories/Loader.ts b/src/electron/frontend/core/components/Loader.ts similarity index 100% rename from src/electron/renderer/src/stories/Loader.ts rename to src/electron/frontend/core/components/Loader.ts diff --git a/src/electron/renderer/src/stories/Main.js b/src/electron/frontend/core/components/Main.js similarity index 100% rename from src/electron/renderer/src/stories/Main.js rename to src/electron/frontend/core/components/Main.js diff --git a/src/electron/renderer/src/stories/Modal.ts b/src/electron/frontend/core/components/Modal.ts similarity index 100% rename from src/electron/renderer/src/stories/Modal.ts rename to src/electron/frontend/core/components/Modal.ts diff --git a/src/electron/renderer/src/stories/NavigationSidebar.js b/src/electron/frontend/core/components/NavigationSidebar.js similarity index 100% rename from src/electron/renderer/src/stories/NavigationSidebar.js rename to src/electron/frontend/core/components/NavigationSidebar.js diff --git a/src/electron/renderer/src/stories/OptionalSection.js b/src/electron/frontend/core/components/OptionalSection.js similarity index 100% rename from src/electron/renderer/src/stories/OptionalSection.js rename to src/electron/frontend/core/components/OptionalSection.js diff --git a/src/electron/renderer/src/stories/Overlay.ts b/src/electron/frontend/core/components/Overlay.ts similarity index 100% rename from src/electron/renderer/src/stories/Overlay.ts rename to src/electron/frontend/core/components/Overlay.ts diff --git a/src/electron/renderer/src/stories/ProgressBar.ts b/src/electron/frontend/core/components/ProgressBar.ts similarity index 100% rename from src/electron/renderer/src/stories/ProgressBar.ts rename to src/electron/frontend/core/components/ProgressBar.ts diff --git a/src/electron/renderer/src/stories/Search.js b/src/electron/frontend/core/components/Search.js similarity index 100% rename from src/electron/renderer/src/stories/Search.js rename to src/electron/frontend/core/components/Search.js diff --git a/src/electron/renderer/src/stories/SimpleTable.js b/src/electron/frontend/core/components/SimpleTable.js similarity index 100% rename from src/electron/renderer/src/stories/SimpleTable.js rename to src/electron/frontend/core/components/SimpleTable.js diff --git a/src/electron/renderer/src/stories/Table.js b/src/electron/frontend/core/components/Table.js similarity index 100% rename from src/electron/renderer/src/stories/Table.js rename to src/electron/frontend/core/components/Table.js diff --git a/src/electron/renderer/src/stories/forms/GlobalFormModal.ts b/src/electron/frontend/core/components/forms/GlobalFormModal.ts similarity index 100% rename from src/electron/renderer/src/stories/forms/GlobalFormModal.ts rename to src/electron/frontend/core/components/forms/GlobalFormModal.ts diff --git a/src/electron/renderer/src/stories/forms/utils.ts b/src/electron/frontend/core/components/forms/utils.ts similarity index 100% rename from src/electron/renderer/src/stories/forms/utils.ts rename to src/electron/frontend/core/components/forms/utils.ts diff --git a/src/electron/renderer/src/stories/globals.js b/src/electron/frontend/core/components/globals.js similarity index 100% rename from src/electron/renderer/src/stories/globals.js rename to src/electron/frontend/core/components/globals.js diff --git a/src/electron/renderer/src/stories/hot.js b/src/electron/frontend/core/components/hot.js similarity index 100% rename from src/electron/renderer/src/stories/hot.js rename to src/electron/frontend/core/components/hot.js diff --git a/src/electron/renderer/src/stories/instances/item.ts b/src/electron/frontend/core/components/instances/item.ts similarity index 100% rename from src/electron/renderer/src/stories/instances/item.ts rename to src/electron/frontend/core/components/instances/item.ts diff --git a/src/electron/renderer/src/stories/multiselect/MultiSelectForm.js b/src/electron/frontend/core/components/multiselect/MultiSelectForm.js similarity index 100% rename from src/electron/renderer/src/stories/multiselect/MultiSelectForm.js rename to src/electron/frontend/core/components/multiselect/MultiSelectForm.js diff --git a/src/electron/renderer/src/stories/pages/FormPage.js b/src/electron/frontend/core/components/pages/FormPage.js similarity index 100% rename from src/electron/renderer/src/stories/pages/FormPage.js rename to src/electron/frontend/core/components/pages/FormPage.js diff --git a/src/electron/renderer/src/stories/pages/Page.js b/src/electron/frontend/core/components/pages/Page.js similarity index 96% rename from src/electron/renderer/src/stories/pages/Page.js rename to src/electron/frontend/core/components/pages/Page.js index 18ffd028f..e40b2602f 100644 --- a/src/electron/renderer/src/stories/pages/Page.js +++ b/src/electron/frontend/core/components/pages/Page.js @@ -1,7 +1,10 @@ import { LitElement, html } from "lit"; import { runConversion } from "./guided-mode/options/utils.js"; import { get, save } from "../../progress/index.js"; -import { dismissNotification, isStorybook, notify } from "../../dependencies/globals"; + +import { dismissNotification, notify } from "../../dependencies.js"; +import { isStorybook } from "../../globals.js"; + import { randomizeElements, mapSessions, merge } from "./utils"; import { resolveMetadata } from "./guided-mode/data/utils.js"; diff --git a/src/electron/renderer/src/stories/pages/Unsafe.js b/src/electron/frontend/core/components/pages/Unsafe.js similarity index 100% rename from src/electron/renderer/src/stories/pages/Unsafe.js rename to src/electron/frontend/core/components/pages/Unsafe.js diff --git a/src/electron/renderer/src/stories/pages/contact-us/Contact.js b/src/electron/frontend/core/components/pages/contact-us/Contact.js similarity index 94% rename from src/electron/renderer/src/stories/pages/contact-us/Contact.js rename to src/electron/frontend/core/components/pages/contact-us/Contact.js index 90e7ade16..2b8995dae 100644 --- a/src/electron/renderer/src/stories/pages/contact-us/Contact.js +++ b/src/electron/frontend/core/components/pages/contact-us/Contact.js @@ -2,7 +2,7 @@ import { html } from "lit"; import { contact_lottie } from "../../../../assets/lotties/contact-us-lotties.js"; import { Page } from "../Page.js"; -import { startLottie } from "../../../dependencies/globals"; +import { startLottie } from "../../../dependencies.js"; export class ContactPage extends Page { header = { diff --git a/src/electron/renderer/src/stories/pages/documentation/Documentation.js b/src/electron/frontend/core/components/pages/documentation/Documentation.js similarity index 96% rename from src/electron/renderer/src/stories/pages/documentation/Documentation.js rename to src/electron/frontend/core/components/pages/documentation/Documentation.js index 023e05c51..77ca419d4 100644 --- a/src/electron/renderer/src/stories/pages/documentation/Documentation.js +++ b/src/electron/frontend/core/components/pages/documentation/Documentation.js @@ -2,7 +2,7 @@ import { html } from "lit"; import { docu_lottie } from "../../../../assets/lotties/documentation-lotties.js"; import { Page } from "../Page.js"; -import { startLottie } from "../../../dependencies/globals"; +import { startLottie } from "../../../dependencies.js"; import { Button } from "../../Button.js"; diff --git a/src/electron/renderer/src/stories/pages/getting-started/GettingStarted.js b/src/electron/frontend/core/components/pages/getting-started/GettingStarted.js similarity index 100% rename from src/electron/renderer/src/stories/pages/getting-started/GettingStarted.js rename to src/electron/frontend/core/components/pages/getting-started/GettingStarted.js diff --git a/src/electron/renderer/src/stories/pages/globals.js b/src/electron/frontend/core/components/pages/globals.js similarity index 100% rename from src/electron/renderer/src/stories/pages/globals.js rename to src/electron/frontend/core/components/pages/globals.js diff --git a/src/electron/renderer/src/stories/pages/guided-mode/GuidedFooter.js b/src/electron/frontend/core/components/pages/guided-mode/GuidedFooter.js similarity index 100% rename from src/electron/renderer/src/stories/pages/guided-mode/GuidedFooter.js rename to src/electron/frontend/core/components/pages/guided-mode/GuidedFooter.js diff --git a/src/electron/renderer/src/stories/pages/guided-mode/GuidedHeader.js b/src/electron/frontend/core/components/pages/guided-mode/GuidedHeader.js similarity index 100% rename from src/electron/renderer/src/stories/pages/guided-mode/GuidedHeader.js rename to src/electron/frontend/core/components/pages/guided-mode/GuidedHeader.js diff --git a/src/electron/renderer/src/stories/pages/guided-mode/GuidedHome.js b/src/electron/frontend/core/components/pages/guided-mode/GuidedHome.js similarity index 97% rename from src/electron/renderer/src/stories/pages/guided-mode/GuidedHome.js rename to src/electron/frontend/core/components/pages/guided-mode/GuidedHome.js index 07d4fa1c8..a71dc03d6 100644 --- a/src/electron/renderer/src/stories/pages/guided-mode/GuidedHome.js +++ b/src/electron/frontend/core/components/pages/guided-mode/GuidedHome.js @@ -2,7 +2,7 @@ import { html } from "lit"; import { Page } from "../Page.js"; import { ProgressCard } from "./ProgressCard.js"; -import { startLottie } from "../../../dependencies/globals"; +import { startLottie } from "../../../dependencies.js"; import * as progress from "../../../progress/index.js"; import { newDataset } from "../../../../assets/lotties/index.js"; diff --git a/src/electron/renderer/src/stories/pages/guided-mode/GuidedStart.js b/src/electron/frontend/core/components/pages/guided-mode/GuidedStart.js similarity index 100% rename from src/electron/renderer/src/stories/pages/guided-mode/GuidedStart.js rename to src/electron/frontend/core/components/pages/guided-mode/GuidedStart.js diff --git a/src/electron/renderer/src/stories/pages/guided-mode/ProgressCard.js b/src/electron/frontend/core/components/pages/guided-mode/ProgressCard.js similarity index 100% rename from src/electron/renderer/src/stories/pages/guided-mode/ProgressCard.js rename to src/electron/frontend/core/components/pages/guided-mode/ProgressCard.js diff --git a/src/electron/renderer/src/stories/pages/guided-mode/data/GuidedMetadata.js b/src/electron/frontend/core/components/pages/guided-mode/data/GuidedMetadata.js similarity index 100% rename from src/electron/renderer/src/stories/pages/guided-mode/data/GuidedMetadata.js rename to src/electron/frontend/core/components/pages/guided-mode/data/GuidedMetadata.js diff --git a/src/electron/renderer/src/stories/pages/guided-mode/data/GuidedPathExpansion.js b/src/electron/frontend/core/components/pages/guided-mode/data/GuidedPathExpansion.js similarity index 97% rename from src/electron/renderer/src/stories/pages/guided-mode/data/GuidedPathExpansion.js rename to src/electron/frontend/core/components/pages/guided-mode/data/GuidedPathExpansion.js index 4fa48857a..43b535812 100644 --- a/src/electron/renderer/src/stories/pages/guided-mode/data/GuidedPathExpansion.js +++ b/src/electron/frontend/core/components/pages/guided-mode/data/GuidedPathExpansion.js @@ -9,7 +9,7 @@ import { onThrow } from "../../../../errors"; import pathExpansionSchema from "../../../../../../../schemas/json/path-expansion.schema.json" assert { type: "json" }; import { merge } from "../../utils"; import { List } from "../../../List"; -import { fs } from "../../../../electron/index.js"; +import { fs } from "../../../../../utils/electron.js"; import { Button } from "../../../Button.js"; import { Modal } from "../../../Modal"; import { header } from "../../../forms/utils"; diff --git a/src/electron/renderer/src/stories/pages/guided-mode/data/GuidedSourceData.js b/src/electron/frontend/core/components/pages/guided-mode/data/GuidedSourceData.js similarity index 97% rename from src/electron/renderer/src/stories/pages/guided-mode/data/GuidedSourceData.js rename to src/electron/frontend/core/components/pages/guided-mode/data/GuidedSourceData.js index f3876100a..9c99d8704 100644 --- a/src/electron/renderer/src/stories/pages/guided-mode/data/GuidedSourceData.js +++ b/src/electron/frontend/core/components/pages/guided-mode/data/GuidedSourceData.js @@ -1,5 +1,7 @@ import Swal from "sweetalert2"; -import { isStorybook } from "../../../../dependencies/globals"; + +import { isStorybook } from "../../../../globals.js"; + import { JSONSchemaForm } from "../../../JSONSchemaForm.js"; import { InstanceManager } from "../../../InstanceManager.js"; import { ManagedPage } from "./ManagedPage.js"; diff --git a/src/electron/renderer/src/stories/pages/guided-mode/data/GuidedStructure.js b/src/electron/frontend/core/components/pages/guided-mode/data/GuidedStructure.js similarity index 100% rename from src/electron/renderer/src/stories/pages/guided-mode/data/GuidedStructure.js rename to src/electron/frontend/core/components/pages/guided-mode/data/GuidedStructure.js diff --git a/src/electron/renderer/src/stories/pages/guided-mode/data/ManagedPage.js b/src/electron/frontend/core/components/pages/guided-mode/data/ManagedPage.js similarity index 100% rename from src/electron/renderer/src/stories/pages/guided-mode/data/ManagedPage.js rename to src/electron/frontend/core/components/pages/guided-mode/data/ManagedPage.js diff --git a/src/electron/renderer/src/stories/pages/guided-mode/data/utils.js b/src/electron/frontend/core/components/pages/guided-mode/data/utils.js similarity index 96% rename from src/electron/renderer/src/stories/pages/guided-mode/data/utils.js rename to src/electron/frontend/core/components/pages/guided-mode/data/utils.js index f2c4fcf70..b5259e3bb 100644 --- a/src/electron/renderer/src/stories/pages/guided-mode/data/utils.js +++ b/src/electron/frontend/core/components/pages/guided-mode/data/utils.js @@ -1,5 +1,5 @@ import { getEditableItems } from "../../../JSONSchemaInput.js"; -import { merge } from "../../utils"; +import { merge } from "../../utils.js"; // Merge project-wide data into metadata export function populateWithProjectMetadata(info, globalState) { diff --git a/src/electron/renderer/src/stories/pages/guided-mode/options/GuidedInspectorPage.js b/src/electron/frontend/core/components/pages/guided-mode/options/GuidedInspectorPage.js similarity index 96% rename from src/electron/renderer/src/stories/pages/guided-mode/options/GuidedInspectorPage.js rename to src/electron/frontend/core/components/pages/guided-mode/options/GuidedInspectorPage.js index ae262f389..413092150 100644 --- a/src/electron/renderer/src/stories/pages/guided-mode/options/GuidedInspectorPage.js +++ b/src/electron/frontend/core/components/pages/guided-mode/options/GuidedInspectorPage.js @@ -4,7 +4,7 @@ import { Page } from "../../Page.js"; import { unsafeSVG } from "lit/directives/unsafe-svg.js"; import folderOpenSVG from "../../../../../assets/icons/folder_open.svg?raw"; -import { electron } from "../../../../electron/index.js"; +import { electron } from "../../../../../utils/electron.js"; import { getSharedPath, removeFilePaths, truncateFilePaths } from "../../../preview/NWBFilePreview.js"; const { ipcRenderer } = electron; import { until } from "lit/directives/until.js"; diff --git a/src/electron/renderer/src/stories/pages/guided-mode/options/GuidedStubPreview.js b/src/electron/frontend/core/components/pages/guided-mode/options/GuidedStubPreview.js similarity index 94% rename from src/electron/renderer/src/stories/pages/guided-mode/options/GuidedStubPreview.js rename to src/electron/frontend/core/components/pages/guided-mode/options/GuidedStubPreview.js index d1b022155..55979eaa5 100644 --- a/src/electron/renderer/src/stories/pages/guided-mode/options/GuidedStubPreview.js +++ b/src/electron/frontend/core/components/pages/guided-mode/options/GuidedStubPreview.js @@ -4,7 +4,7 @@ import { Page } from "../../Page.js"; import { unsafeSVG } from "lit/directives/unsafe-svg.js"; import folderOpenSVG from "../../../../../assets/icons/folder_open.svg?raw"; -import { electron } from "../../../../electron/index.js"; +import { electron } from "../../../../../utils/electron.js"; import { NWBFilePreview, getSharedPath } from "../../../preview/NWBFilePreview.js"; const { ipcRenderer } = electron; diff --git a/src/electron/renderer/src/stories/pages/guided-mode/options/GuidedUpload.js b/src/electron/frontend/core/components/pages/guided-mode/options/GuidedUpload.js similarity index 100% rename from src/electron/renderer/src/stories/pages/guided-mode/options/GuidedUpload.js rename to src/electron/frontend/core/components/pages/guided-mode/options/GuidedUpload.js diff --git a/src/electron/renderer/src/stories/pages/guided-mode/options/utils.js b/src/electron/frontend/core/components/pages/guided-mode/options/utils.js similarity index 100% rename from src/electron/renderer/src/stories/pages/guided-mode/options/utils.js rename to src/electron/frontend/core/components/pages/guided-mode/options/utils.js diff --git a/src/electron/renderer/src/stories/pages/guided-mode/results/GuidedDandiResults.js b/src/electron/frontend/core/components/pages/guided-mode/results/GuidedDandiResults.js similarity index 100% rename from src/electron/renderer/src/stories/pages/guided-mode/results/GuidedDandiResults.js rename to src/electron/frontend/core/components/pages/guided-mode/results/GuidedDandiResults.js diff --git a/src/electron/renderer/src/stories/pages/guided-mode/results/GuidedResults.js b/src/electron/frontend/core/components/pages/guided-mode/results/GuidedResults.js similarity index 93% rename from src/electron/renderer/src/stories/pages/guided-mode/results/GuidedResults.js rename to src/electron/frontend/core/components/pages/guided-mode/results/GuidedResults.js index 1cc68fa86..dc1e5a333 100644 --- a/src/electron/renderer/src/stories/pages/guided-mode/results/GuidedResults.js +++ b/src/electron/frontend/core/components/pages/guided-mode/results/GuidedResults.js @@ -6,7 +6,7 @@ import { Page } from "../../Page.js"; import { getStubArray } from "../options/GuidedStubPreview.js"; import { getSharedPath } from "../../../preview/NWBFilePreview.js"; -import { electron, path } from "../../../../electron/index.js"; +import { electron, path } from "../../../../../utils/electron.js"; const { ipcRenderer } = electron; export class GuidedResultsPage extends Page { diff --git a/src/electron/renderer/src/stories/pages/guided-mode/setup/GuidedNewDatasetInfo.js b/src/electron/frontend/core/components/pages/guided-mode/setup/GuidedNewDatasetInfo.js similarity index 100% rename from src/electron/renderer/src/stories/pages/guided-mode/setup/GuidedNewDatasetInfo.js rename to src/electron/frontend/core/components/pages/guided-mode/setup/GuidedNewDatasetInfo.js diff --git a/src/electron/renderer/src/stories/pages/guided-mode/setup/GuidedSubjects.js b/src/electron/frontend/core/components/pages/guided-mode/setup/GuidedSubjects.js similarity index 100% rename from src/electron/renderer/src/stories/pages/guided-mode/setup/GuidedSubjects.js rename to src/electron/frontend/core/components/pages/guided-mode/setup/GuidedSubjects.js diff --git a/src/electron/renderer/src/stories/pages/guided-mode/setup/Preform.js b/src/electron/frontend/core/components/pages/guided-mode/setup/Preform.js similarity index 100% rename from src/electron/renderer/src/stories/pages/guided-mode/setup/Preform.js rename to src/electron/frontend/core/components/pages/guided-mode/setup/Preform.js diff --git a/src/electron/renderer/src/stories/pages/guided-mode/setup/utils.ts b/src/electron/frontend/core/components/pages/guided-mode/setup/utils.ts similarity index 100% rename from src/electron/renderer/src/stories/pages/guided-mode/setup/utils.ts rename to src/electron/frontend/core/components/pages/guided-mode/setup/utils.ts diff --git a/src/electron/renderer/src/stories/pages/inspect/InspectPage.js b/src/electron/frontend/core/components/pages/inspect/InspectPage.js similarity index 100% rename from src/electron/renderer/src/stories/pages/inspect/InspectPage.js rename to src/electron/frontend/core/components/pages/inspect/InspectPage.js diff --git a/src/electron/renderer/src/stories/pages/inspect/utils.js b/src/electron/frontend/core/components/pages/inspect/utils.js similarity index 100% rename from src/electron/renderer/src/stories/pages/inspect/utils.js rename to src/electron/frontend/core/components/pages/inspect/utils.js diff --git a/src/electron/renderer/src/stories/pages/preview/PreviewPage.js b/src/electron/frontend/core/components/pages/preview/PreviewPage.js similarity index 100% rename from src/electron/renderer/src/stories/pages/preview/PreviewPage.js rename to src/electron/frontend/core/components/pages/preview/PreviewPage.js diff --git a/src/electron/renderer/src/stories/pages/settings/SettingsPage.js b/src/electron/frontend/core/components/pages/settings/SettingsPage.js similarity index 96% rename from src/electron/renderer/src/stories/pages/settings/SettingsPage.js rename to src/electron/frontend/core/components/pages/settings/SettingsPage.js index e314a9a41..3160a32b1 100644 --- a/src/electron/renderer/src/stories/pages/settings/SettingsPage.js +++ b/src/electron/frontend/core/components/pages/settings/SettingsPage.js @@ -12,8 +12,10 @@ import { Button } from "../../Button.js"; import { global, remove, save } from "../../../progress/index.js"; import { merge, setUndefinedIfNotDeclared } from "../utils"; -import { homeDirectory, notyf, testDataFolderPath } from "../../../dependencies/globals"; -import { SERVER_FILE_PATH, electron, path, port, fs } from "../../../electron/index.js"; +import { notyf } from "../../../dependencies.js"; +import {homeDirectory, testDataFolderPath } from "../../../globals.js"; + +import { SERVER_FILE_PATH, electron, path, port, fs } from "../../../../utils/electron.js"; import saveSVG from "../../../../assets/icons/save.svg?raw"; import folderSVG from "../../../../assets/icons/folder_open.svg?raw"; diff --git a/src/electron/renderer/src/stories/pages/uploads/UploadsPage.js b/src/electron/frontend/core/components/pages/uploads/UploadsPage.js similarity index 100% rename from src/electron/renderer/src/stories/pages/uploads/UploadsPage.js rename to src/electron/frontend/core/components/pages/uploads/UploadsPage.js diff --git a/src/electron/renderer/src/stories/pages/uploads/utils.ts b/src/electron/frontend/core/components/pages/uploads/utils.ts similarity index 100% rename from src/electron/renderer/src/stories/pages/uploads/utils.ts rename to src/electron/frontend/core/components/pages/uploads/utils.ts diff --git a/src/electron/renderer/src/stories/pages/utils.js b/src/electron/frontend/core/components/pages/utils.js similarity index 100% rename from src/electron/renderer/src/stories/pages/utils.js rename to src/electron/frontend/core/components/pages/utils.js diff --git a/src/electron/renderer/src/stories/preview/NWBFilePreview.js b/src/electron/frontend/core/components/preview/NWBFilePreview.js similarity index 96% rename from src/electron/renderer/src/stories/preview/NWBFilePreview.js rename to src/electron/frontend/core/components/preview/NWBFilePreview.js index cd268a90e..c65f3323b 100644 --- a/src/electron/renderer/src/stories/preview/NWBFilePreview.js +++ b/src/electron/frontend/core/components/preview/NWBFilePreview.js @@ -5,7 +5,7 @@ import { unsafeHTML } from "lit/directives/unsafe-html.js"; import { run } from "../pages/guided-mode/options/utils"; import { until } from "lit/directives/until.js"; import { InstanceManager } from "../InstanceManager"; -import { path } from "../../electron"; +import { path } from "../../../utils/electron.js"; import { FullScreenToggle } from "../FullScreenToggle"; export function getSharedPath(array) { diff --git a/src/electron/renderer/src/stories/preview/Neurosift.js b/src/electron/frontend/core/components/preview/Neurosift.js similarity index 100% rename from src/electron/renderer/src/stories/preview/Neurosift.js rename to src/electron/frontend/core/components/preview/Neurosift.js diff --git a/src/electron/renderer/src/stories/preview/inspector/InspectorList.js b/src/electron/frontend/core/components/preview/inspector/InspectorList.js similarity index 100% rename from src/electron/renderer/src/stories/preview/inspector/InspectorList.js rename to src/electron/frontend/core/components/preview/inspector/InspectorList.js diff --git a/src/electron/renderer/src/stories/sidebar.js b/src/electron/frontend/core/components/sidebar.js similarity index 100% rename from src/electron/renderer/src/stories/sidebar.js rename to src/electron/frontend/core/components/sidebar.js diff --git a/src/electron/renderer/src/stories/status/StatusBar.ts b/src/electron/frontend/core/components/status/StatusBar.ts similarity index 100% rename from src/electron/renderer/src/stories/status/StatusBar.ts rename to src/electron/frontend/core/components/status/StatusBar.ts diff --git a/src/electron/renderer/src/stories/status/StatusIndicator.ts b/src/electron/frontend/core/components/status/StatusIndicator.ts similarity index 100% rename from src/electron/renderer/src/stories/status/StatusIndicator.ts rename to src/electron/frontend/core/components/status/StatusIndicator.ts diff --git a/src/electron/renderer/src/stories/table/Cell.ts b/src/electron/frontend/core/components/table/Cell.ts similarity index 100% rename from src/electron/renderer/src/stories/table/Cell.ts rename to src/electron/frontend/core/components/table/Cell.ts diff --git a/src/electron/renderer/src/stories/table/ContextMenu.ts b/src/electron/frontend/core/components/table/ContextMenu.ts similarity index 100% rename from src/electron/renderer/src/stories/table/ContextMenu.ts rename to src/electron/frontend/core/components/table/ContextMenu.ts diff --git a/src/electron/renderer/src/stories/table/cells/array.ts b/src/electron/frontend/core/components/table/cells/array.ts similarity index 100% rename from src/electron/renderer/src/stories/table/cells/array.ts rename to src/electron/frontend/core/components/table/cells/array.ts diff --git a/src/electron/renderer/src/stories/table/cells/base.ts b/src/electron/frontend/core/components/table/cells/base.ts similarity index 100% rename from src/electron/renderer/src/stories/table/cells/base.ts rename to src/electron/frontend/core/components/table/cells/base.ts diff --git a/src/electron/renderer/src/stories/table/cells/date-time.ts b/src/electron/frontend/core/components/table/cells/date-time.ts similarity index 100% rename from src/electron/renderer/src/stories/table/cells/date-time.ts rename to src/electron/frontend/core/components/table/cells/date-time.ts diff --git a/src/electron/renderer/src/stories/table/cells/dropdown.ts b/src/electron/frontend/core/components/table/cells/dropdown.ts similarity index 100% rename from src/electron/renderer/src/stories/table/cells/dropdown.ts rename to src/electron/frontend/core/components/table/cells/dropdown.ts diff --git a/src/electron/renderer/src/stories/table/cells/editors/base.ts b/src/electron/frontend/core/components/table/cells/editors/base.ts similarity index 100% rename from src/electron/renderer/src/stories/table/cells/editors/base.ts rename to src/electron/frontend/core/components/table/cells/editors/base.ts diff --git a/src/electron/renderer/src/stories/table/cells/input.ts b/src/electron/frontend/core/components/table/cells/input.ts similarity index 97% rename from src/electron/renderer/src/stories/table/cells/input.ts rename to src/electron/frontend/core/components/table/cells/input.ts index 5c090813a..17572ead1 100644 --- a/src/electron/renderer/src/stories/table/cells/input.ts +++ b/src/electron/frontend/core/components/table/cells/input.ts @@ -1,12 +1,12 @@ import { LitElement, css, html } from "lit"; import { TableCellBase } from "./base.js"; import { BaseRenderer } from "./renderers/base.js"; -import { Modal } from "../../Modal"; +import { Modal } from "../../Modal.js"; import { SimpleTable } from "../../SimpleTable.js"; import { JSONSchemaInput } from "../../JSONSchemaInput.js"; -import { header } from "../../forms/utils"; +import { header } from "../../forms/utils.js"; export class NestedEditor extends LitElement { diff --git a/src/electron/renderer/src/stories/table/cells/renderers/base.ts b/src/electron/frontend/core/components/table/cells/renderers/base.ts similarity index 100% rename from src/electron/renderer/src/stories/table/cells/renderers/base.ts rename to src/electron/frontend/core/components/table/cells/renderers/base.ts diff --git a/src/electron/renderer/src/stories/table/convert.ts b/src/electron/frontend/core/components/table/convert.ts similarity index 100% rename from src/electron/renderer/src/stories/table/convert.ts rename to src/electron/frontend/core/components/table/convert.ts diff --git a/src/electron/renderer/src/stories/table/utils.ts b/src/electron/frontend/core/components/table/utils.ts similarity index 100% rename from src/electron/renderer/src/stories/table/utils.ts rename to src/electron/frontend/core/components/table/utils.ts diff --git a/src/electron/renderer/src/stories/utils/progress.js b/src/electron/frontend/core/components/utils/progress.js similarity index 100% rename from src/electron/renderer/src/stories/utils/progress.js rename to src/electron/frontend/core/components/utils/progress.js diff --git a/src/electron/renderer/src/stories/utils/useGlobalStyles.js b/src/electron/frontend/core/components/utils/useGlobalStyles.js similarity index 100% rename from src/electron/renderer/src/stories/utils/useGlobalStyles.js rename to src/electron/frontend/core/components/utils/useGlobalStyles.js diff --git a/src/electron/renderer/src/dependencies/globals.js b/src/electron/frontend/core/dependencies.js similarity index 95% rename from src/electron/renderer/src/dependencies/globals.js rename to src/electron/frontend/core/dependencies.js index f7ec74427..810456d11 100644 --- a/src/electron/renderer/src/dependencies/globals.js +++ b/src/electron/frontend/core/dependencies.js @@ -2,8 +2,6 @@ import { Notyf } from "notyf"; import checkChromatic from "chromatic/isChromatic"; import lottie from "lottie-web"; -export * from "./simple.js"; - // ---------- Lottie Helper ---------- const isChromatic = checkChromatic(); diff --git a/src/electron/renderer/src/errors.ts b/src/electron/frontend/core/errors.ts similarity index 74% rename from src/electron/renderer/src/errors.ts rename to src/electron/frontend/core/errors.ts index 89f7ae17f..ba1794a91 100644 --- a/src/electron/renderer/src/errors.ts +++ b/src/electron/frontend/core/errors.ts @@ -1,4 +1,4 @@ -import { notify } from './dependencies/globals' +import { notify } from './dependencies' export const onThrow = (message: string, id?: string) => { return notify(id ? `[${id}]: ${message}` : message, "error", 7000); diff --git a/src/electron/renderer/src/dependencies/simple.js b/src/electron/frontend/core/globals.js similarity index 69% rename from src/electron/renderer/src/dependencies/simple.js rename to src/electron/frontend/core/globals.js index b9c86f59c..6696ac5da 100644 --- a/src/electron/renderer/src/dependencies/simple.js +++ b/src/electron/frontend/core/globals.js @@ -1,6 +1,16 @@ -import { app, crypto, isElectron } from "../electron/index.js"; -import paths from "../../../../paths.config.json" assert { type: "json" }; -import { joinPath } from "../globals"; + +import { app, path, crypto, isElectron } from "../utils/electron.js"; + +import paths from "../../../paths.config.json" assert { type: "json" }; + +import supportedInterfaces from "../../../supported_interfaces.json" assert { type: "json" }; + +export const joinPath = (...args) => (path ? path.join(...args) : args.filter((str) => str).join("/")); + +export let runOnLoad = (fn) => { + if (document.readyState === "complete") fn(); + else window.addEventListener("load", fn); +}; export const reloadPageToHome = () => { if (isStorybook) return; @@ -29,3 +39,5 @@ export const ENCRYPTION_IV = crypto ? crypto.randomBytes(IV_LENGTH) : null; // Storybook export const isStorybook = window.location.href.includes("iframe.html"); + +export { supportedInterfaces }; diff --git a/src/electron/renderer/src/index.ts b/src/electron/frontend/core/index.ts similarity index 95% rename from src/electron/renderer/src/index.ts rename to src/electron/frontend/core/index.ts index b3493aa94..08415c3e1 100644 --- a/src/electron/renderer/src/index.ts +++ b/src/electron/frontend/core/index.ts @@ -1,18 +1,18 @@ import "./pages.js" -import { isElectron, electron } from './electron/index.js' +import { isElectron, electron } from '../utils/electron.js' const { ipcRenderer } = electron; -import { Dashboard } from './stories/Dashboard.js' +import { Dashboard } from './components/Dashboard.js' import { notyf, notify -} from './dependencies/globals' +} from './dependencies.js' import Swal from 'sweetalert2' import { loadServerEvents, pythonServerOpened } from "./server/index.js"; -import { statusBar } from "./server/globals"; +import { statusBar } from "./server/globals.js"; // Set the sidebar subtitle to the current app version const dashboard = document.querySelector('nwb-dashboard') as Dashboard diff --git a/src/electron/renderer/src/pages.js b/src/electron/frontend/core/pages.js similarity index 73% rename from src/electron/renderer/src/pages.js rename to src/electron/frontend/core/pages.js index 7dbd400e7..09e1b4c16 100644 --- a/src/electron/renderer/src/pages.js +++ b/src/electron/frontend/core/pages.js @@ -1,33 +1,32 @@ -import { GettingStartedPage } from "./stories/pages/getting-started/GettingStarted"; -import { DocumentationPage } from "./stories/pages/documentation/Documentation"; -import { ContactPage } from "./stories/pages/contact-us/Contact"; -import { GuidedHomePage } from "./stories/pages/guided-mode/GuidedHome"; -import { GuidedNewDatasetPage } from "./stories/pages/guided-mode/setup/GuidedNewDatasetInfo"; -import { GuidedStructurePage } from "./stories/pages/guided-mode/data/GuidedStructure"; -import { sections } from "./stories/pages/globals"; -import { GuidedSubjectsPage } from "./stories/pages/guided-mode/setup/GuidedSubjects"; -import { GuidedSourceDataPage } from "./stories/pages/guided-mode/data/GuidedSourceData"; -import { GuidedMetadataPage } from "./stories/pages/guided-mode/data/GuidedMetadata"; -import { GuidedUploadPage } from "./stories/pages/guided-mode/options/GuidedUpload"; -import { GuidedResultsPage } from "./stories/pages/guided-mode/results/GuidedResults"; -import { Dashboard } from "./stories/Dashboard"; -import { GuidedStubPreviewPage } from "./stories/pages/guided-mode/options/GuidedStubPreview"; -import { GuidedInspectorPage } from "./stories/pages/guided-mode/options/GuidedInspectorPage"; +import { DocumentationPage } from "./components/pages/documentation/Documentation"; +import { ContactPage } from "./components/pages/contact-us/Contact"; +import { GuidedHomePage } from "./components/pages/guided-mode/GuidedHome"; +import { GuidedNewDatasetPage } from "./components/pages/guided-mode/setup/GuidedNewDatasetInfo"; +import { GuidedStructurePage } from "./components/pages/guided-mode/data/GuidedStructure"; +import { sections } from "./components/pages/globals"; +import { GuidedSubjectsPage } from "./components/pages/guided-mode/setup/GuidedSubjects"; +import { GuidedSourceDataPage } from "./components/pages/guided-mode/data/GuidedSourceData"; +import { GuidedMetadataPage } from "./components/pages/guided-mode/data/GuidedMetadata"; +import { GuidedUploadPage } from "./components/pages/guided-mode/options/GuidedUpload"; +import { GuidedResultsPage } from "./components/pages/guided-mode/results/GuidedResults"; +import { Dashboard } from "./components/Dashboard"; +import { GuidedStubPreviewPage } from "./components/pages/guided-mode/options/GuidedStubPreview"; +import { GuidedInspectorPage } from "./components/pages/guided-mode/options/GuidedInspectorPage"; import logo from "../assets/img/logo-guide-draft-transparent-tight.png"; -import { GuidedPathExpansionPage } from "./stories/pages/guided-mode/data/GuidedPathExpansion"; +import { GuidedPathExpansionPage } from "./components/pages/guided-mode/data/GuidedPathExpansion"; import uploadIcon from "../assets/icons/dandi.svg?raw"; import inspectIcon from "../assets/icons/inspect.svg?raw"; import neurosiftIcon from "../assets/icons/neurosift-logo.svg?raw"; import settingsIcon from "../assets/icons/settings.svg?raw"; -import { UploadsPage } from "./stories/pages/uploads/UploadsPage"; -import { SettingsPage } from "./stories/pages/settings/SettingsPage"; -import { InspectPage } from "./stories/pages/inspect/InspectPage"; -import { PreviewPage } from "./stories/pages/preview/PreviewPage"; -import { GuidedPreform } from "./stories/pages/guided-mode/setup/Preform"; -import { GuidedDandiResultsPage } from "./stories/pages/guided-mode/results/GuidedDandiResults"; +import { UploadsPage } from "./components/pages/uploads/UploadsPage"; +import { SettingsPage } from "./components/pages/settings/SettingsPage"; +import { InspectPage } from "./components/pages/inspect/InspectPage"; +import { PreviewPage } from "./components/pages/preview/PreviewPage"; +import { GuidedPreform } from "./components/pages/guided-mode/setup/Preform"; +import { GuidedDandiResultsPage } from "./components/pages/guided-mode/results/GuidedDandiResults"; let dashboard = document.querySelector("nwb-dashboard"); if (!dashboard) dashboard = new Dashboard(); diff --git a/src/electron/renderer/src/progress/index.js b/src/electron/frontend/core/progress/index.js similarity index 95% rename from src/electron/renderer/src/progress/index.js rename to src/electron/frontend/core/progress/index.js index 3527f9da2..761ab8534 100644 --- a/src/electron/renderer/src/progress/index.js +++ b/src/electron/frontend/core/progress/index.js @@ -7,11 +7,11 @@ import { appDirectory, ENCRYPTION_KEY, ENCRYPTION_IV, -} from "../dependencies/simple.js"; -import { fs, crypto } from "../electron/index.js"; +} from "../globals.js"; +import { fs, crypto } from "../../utils/electron.js"; import { joinPath, runOnLoad } from "../globals"; -import { merge } from "../stories/pages/utils.js"; +import { merge } from "../components/pages/utils.js"; import { updateAppProgress, updateFile } from "./update.js"; import { updateURLParams } from "../../utils/url.js"; diff --git a/src/electron/renderer/src/progress/operations.js b/src/electron/frontend/core/progress/operations.js similarity index 88% rename from src/electron/renderer/src/progress/operations.js rename to src/electron/frontend/core/progress/operations.js index b4c4658b1..8d60e238e 100644 --- a/src/electron/renderer/src/progress/operations.js +++ b/src/electron/frontend/core/progress/operations.js @@ -1,6 +1,6 @@ import { joinPath } from "../globals"; -import { conversionSaveFolderPath, guidedProgressFilePath, previewSaveFolderPath } from "../dependencies/simple"; -import { fs } from "../electron"; +import { conversionSaveFolderPath, guidedProgressFilePath, previewSaveFolderPath } from "../globals"; +import { fs } from "../../utils/electron"; export const remove = (name) => { //Get the path of the progress file to delete diff --git a/src/electron/renderer/src/progress/update.js b/src/electron/frontend/core/progress/update.js similarity index 93% rename from src/electron/renderer/src/progress/update.js rename to src/electron/frontend/core/progress/update.js index 5a2258f9b..c621427b6 100644 --- a/src/electron/renderer/src/progress/update.js +++ b/src/electron/frontend/core/progress/update.js @@ -1,6 +1,6 @@ import { updateURLParams } from "../../utils/url.js"; -import { guidedProgressFilePath } from "../dependencies/simple.js"; -import { fs } from "../electron/index.js"; +import { guidedProgressFilePath } from "../globals.js"; +import { fs } from "../../utils/electron.js"; import { joinPath } from "../globals"; import { get, hasEntry } from "./index.js"; diff --git a/src/electron/renderer/src/promises.ts b/src/electron/frontend/core/promises.ts similarity index 100% rename from src/electron/renderer/src/promises.ts rename to src/electron/frontend/core/promises.ts diff --git a/src/electron/renderer/src/server/globals.ts b/src/electron/frontend/core/server/globals.ts similarity index 94% rename from src/electron/renderer/src/server/globals.ts rename to src/electron/frontend/core/server/globals.ts index 5ad456472..6f23ea2c7 100644 --- a/src/electron/renderer/src/server/globals.ts +++ b/src/electron/frontend/core/server/globals.ts @@ -1,4 +1,4 @@ -import { isElectron, app, port } from '../electron/index.js' +import { isElectron, app, port } from '../../utils/electron.js' import serverSVG from "../../assets/icons/server.svg?raw"; import webAssetSVG from "../../assets/icons/web_asset.svg?raw"; @@ -19,7 +19,7 @@ export const resolve = (object, callback) => { // ------------------------------------------------- -import { StatusBar } from "../stories/status/StatusBar.js"; +import { StatusBar } from "../components/status/StatusBar.js"; import { unsafeSVG } from "lit/directives/unsafe-svg.js"; const appVersion = app?.getVersion(); diff --git a/src/electron/renderer/src/server/index.ts b/src/electron/frontend/core/server/index.ts similarity index 94% rename from src/electron/renderer/src/server/index.ts rename to src/electron/frontend/core/server/index.ts index 62dba82f2..e8b69b229 100644 --- a/src/electron/renderer/src/server/index.ts +++ b/src/electron/frontend/core/server/index.ts @@ -1,13 +1,13 @@ -import { isElectron, electron, app, port } from '../electron/index.js' +import { isElectron, electron, app, port } from '../../utils/electron.js' const { ipcRenderer } = electron; import { notyf, -} from '../dependencies/globals' +} from '../dependencies.js' import Swal from 'sweetalert2' -import { activateServer, baseUrl, statusBar } from './globals'; +import { activateServer, baseUrl, statusBar } from './globals.js'; // Check if the Flask server is live const serverIsLiveStartup = async () => { diff --git a/src/electron/renderer/src/validation/dandi.ts b/src/electron/frontend/core/validation/dandi.ts similarity index 100% rename from src/electron/renderer/src/validation/dandi.ts rename to src/electron/frontend/core/validation/dandi.ts diff --git a/src/electron/renderer/src/validation/index.js b/src/electron/frontend/core/validation/index.js similarity index 100% rename from src/electron/renderer/src/validation/index.js rename to src/electron/frontend/core/validation/index.js diff --git a/src/electron/renderer/src/validation/validation.json b/src/electron/frontend/core/validation/validation.json similarity index 100% rename from src/electron/renderer/src/validation/validation.json rename to src/electron/frontend/core/validation/validation.json diff --git a/src/electron/renderer/src/validation/validation.ts b/src/electron/frontend/core/validation/validation.ts similarity index 99% rename from src/electron/renderer/src/validation/validation.ts rename to src/electron/frontend/core/validation/validation.ts index 9a6b8eb1a..961f9b5fc 100644 --- a/src/electron/renderer/src/validation/validation.ts +++ b/src/electron/frontend/core/validation/validation.ts @@ -1,5 +1,5 @@ import schema from './validation.json' -import { JSONSchemaForm, getSchema } from '../stories/JSONSchemaForm' +import { JSONSchemaForm, getSchema } from '../components/JSONSchemaForm' import Swal from 'sweetalert2' diff --git a/src/electron/renderer/index.html b/src/electron/frontend/index.html similarity index 97% rename from src/electron/renderer/index.html rename to src/electron/frontend/index.html index 1429dac62..a1d25a4ff 100755 --- a/src/electron/renderer/index.html +++ b/src/electron/frontend/index.html @@ -31,7 +31,7 @@ - +