From 8cb49fb27e51240e7f185c1011da0321fd874087 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Thu, 12 Mar 2020 14:23:29 +0000 Subject: [PATCH] UI structure --- packages/builder/package.json | 1 + packages/builder/rollup.config.js | 2 +- packages/builder/src/App.svelte | 16 +- packages/builder/src/BackendRoot.svelte | 13 +- packages/builder/src/budibase.css | 20 ++ packages/builder/src/builderStore/store.js | 2 - packages/builder/src/common/CodeArea.svelte | 13 +- packages/builder/src/common/Select.svelte | 20 +- packages/builder/src/common/Table.svelte | 45 ++++ .../builder/src/database/DatabaseRoot.svelte | 27 ++- .../builder/src/database/FieldView.svelte | 12 +- .../builder/src/database/IndexView.svelte | 84 ++++++-- .../ModelDataTable/ModelDataTable.svelte | 62 ++++-- .../ModelDataTable/TablePagination.svelte | 44 ++++ .../src/database/ModelDataTable/api.js | 24 +++ .../modals/CreateEditField.svelte | 23 ++ .../modals/CreateEditModel.svelte | 23 ++ .../modals/CreateEditRecord.svelte | 60 ++++++ .../modals/CreateEditView.svelte | 23 ++ .../ModelDataTable/modals/DeleteRecord.svelte | 24 +++ .../database/ModelDataTable/modals/index.js | 2 + .../{RecordView.svelte => ModelView.svelte} | 204 +++++++----------- packages/builder/src/global.css | 4 + packages/builder/src/main.js | 2 +- packages/builder/src/nav/BackendNav.svelte | 4 +- packages/builder/src/nav/DatabasesList.svelte | 15 +- packages/builder/src/nav/HierarchyRow.svelte | 3 +- .../src/nav/SchemaManagementDrawer.svelte | 14 +- .../core/src/indexing/indexSchemaCreator.js | 2 +- 29 files changed, 576 insertions(+), 212 deletions(-) create mode 100644 packages/builder/src/common/Table.svelte create mode 100644 packages/builder/src/database/ModelDataTable/TablePagination.svelte create mode 100644 packages/builder/src/database/ModelDataTable/api.js create mode 100644 packages/builder/src/database/ModelDataTable/modals/CreateEditField.svelte create mode 100644 packages/builder/src/database/ModelDataTable/modals/CreateEditModel.svelte create mode 100644 packages/builder/src/database/ModelDataTable/modals/CreateEditRecord.svelte create mode 100644 packages/builder/src/database/ModelDataTable/modals/CreateEditView.svelte create mode 100644 packages/builder/src/database/ModelDataTable/modals/DeleteRecord.svelte create mode 100644 packages/builder/src/database/ModelDataTable/modals/index.js rename packages/builder/src/database/{RecordView.svelte => ModelView.svelte} (58%) diff --git a/packages/builder/package.json b/packages/builder/package.json index fa92be46a2..70a9602309 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -47,6 +47,7 @@ "safe-buffer": "^5.1.2", "shortid": "^2.2.8", "string_decoder": "^1.2.0", + "svelte-routing": "^1.4.2", "uikit": "^3.1.7" }, "devDependencies": { diff --git a/packages/builder/rollup.config.js b/packages/builder/rollup.config.js index 5a607720d8..bbc1d3c5fc 100644 --- a/packages/builder/rollup.config.js +++ b/packages/builder/rollup.config.js @@ -165,7 +165,7 @@ export default { svelte({ // enable run-time checks when not in production dev: !production, - include: "src/**/*.svelte", + include: ["src/**/*.svelte", "node_modules/**/*.svelte"], // we'll extract any component CSS out into // a separate file — better for performance css: css => { diff --git a/packages/builder/src/App.svelte b/packages/builder/src/App.svelte index 81e74e8543..69bddc225c 100644 --- a/packages/builder/src/App.svelte +++ b/packages/builder/src/App.svelte @@ -29,16 +29,16 @@ {/await} + {#if $store.useAnalytics} +