diff --git a/packages/builder/src/builderStore/dataBinding.js b/packages/builder/src/builderStore/dataBinding.js index 1a7b217f61..635a52e7da 100644 --- a/packages/builder/src/builderStore/dataBinding.js +++ b/packages/builder/src/builderStore/dataBinding.js @@ -1,10 +1,7 @@ import { cloneDeep } from "lodash/fp" import { get } from "svelte/store" import { store } from "builderStore" -import { - tables as tablesStore, - queries as queriesStores, -} from "stores/backend/" +import { tables as tablesStore, queries as queriesStores } from "stores/backend" import { findComponentPath } from "./storeUtils" import { makePropSafe } from "@budibase/string-templates" import { TableNames } from "../constants" diff --git a/packages/builder/src/builderStore/store/frontend.js b/packages/builder/src/builderStore/store/frontend.js index c1727c2e9e..ff551751da 100644 --- a/packages/builder/src/builderStore/store/frontend.js +++ b/packages/builder/src/builderStore/store/frontend.js @@ -15,7 +15,7 @@ import { queries, database, tables, -} from "stores/backend/" +} from "stores/backend" import { fetchComponentLibDefinitions } from "../loadComponentLibraries" import api from "../api" diff --git a/packages/builder/src/components/automation/AutomationBuilder/FlowChart/AutomationBlockTagline.svelte b/packages/builder/src/components/automation/AutomationBuilder/FlowChart/AutomationBlockTagline.svelte index 99b843ebc6..48cd1dacc3 100644 --- a/packages/builder/src/components/automation/AutomationBuilder/FlowChart/AutomationBlockTagline.svelte +++ b/packages/builder/src/components/automation/AutomationBuilder/FlowChart/AutomationBlockTagline.svelte @@ -1,7 +1,7 @@ diff --git a/packages/builder/src/components/backend/DataTable/cells/RoleCell.svelte b/packages/builder/src/components/backend/DataTable/cells/RoleCell.svelte index 8267c2f7d4..9a04933a19 100644 --- a/packages/builder/src/components/backend/DataTable/cells/RoleCell.svelte +++ b/packages/builder/src/components/backend/DataTable/cells/RoleCell.svelte @@ -1,5 +1,5 @@ {#if $database?._id} diff --git a/packages/builder/src/components/backend/TableNavigator/modals/CreateTableModal.svelte b/packages/builder/src/components/backend/TableNavigator/modals/CreateTableModal.svelte index a72b6cfab6..5c9559088a 100644 --- a/packages/builder/src/components/backend/TableNavigator/modals/CreateTableModal.svelte +++ b/packages/builder/src/components/backend/TableNavigator/modals/CreateTableModal.svelte @@ -1,12 +1,7 @@ diff --git a/packages/builder/src/components/backend/TableNavigator/popovers/EditViewPopover.svelte b/packages/builder/src/components/backend/TableNavigator/popovers/EditViewPopover.svelte index f6e0dcf616..68f16d3c74 100644 --- a/packages/builder/src/components/backend/TableNavigator/popovers/EditViewPopover.svelte +++ b/packages/builder/src/components/backend/TableNavigator/popovers/EditViewPopover.svelte @@ -1,11 +1,6 @@ diff --git a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/actions/DeleteRow.svelte b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/actions/DeleteRow.svelte index 9b6136ae1f..0895c78331 100644 --- a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/actions/DeleteRow.svelte +++ b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/actions/DeleteRow.svelte @@ -1,12 +1,13 @@ diff --git a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/actions/ExecuteQuery.svelte b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/actions/ExecuteQuery.svelte index 59e16ace32..2bafed1408 100644 --- a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/actions/ExecuteQuery.svelte +++ b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/actions/ExecuteQuery.svelte @@ -1,7 +1,7 @@ -<<<<<<< HEAD -
- - ->>>>>>> d803aa0bd7a74220e432f4a1b338abdd7fbe9b7d {/each} diff --git a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/actions/SaveRow.svelte b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/actions/SaveRow.svelte index b367b17484..a94a5e3002 100644 --- a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/actions/SaveRow.svelte +++ b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/actions/SaveRow.svelte @@ -1,6 +1,7 @@ diff --git a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/TableSelect.svelte b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/TableSelect.svelte index 75a0a740f8..b41098da2d 100644 --- a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/TableSelect.svelte +++ b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/TableSelect.svelte @@ -1,6 +1,6 @@ diff --git a/packages/builder/src/components/integration/QueryViewer.svelte b/packages/builder/src/components/integration/QueryViewer.svelte index 5d3472449c..ca931f26d7 100644 --- a/packages/builder/src/components/integration/QueryViewer.svelte +++ b/packages/builder/src/components/integration/QueryViewer.svelte @@ -15,7 +15,7 @@ import IntegrationQueryEditor from "components/integration/index.svelte" import ExternalDataSourceTable from "components/backend/DataTable/ExternalDataSourceTable.svelte" import ParameterBuilder from "components/integration/QueryParameterBuilder.svelte" - import { datasources, integrations, queries } from 'stores/backend/' + import { datasources, integrations, queries } from "stores/backend" const PREVIEW_HEADINGS = [ { @@ -39,9 +39,7 @@ let parameters let data = [] - $: datasource = $datasources.list.find( - ds => ds._id === query.datasourceId - ) + $: datasource = $datasources.list.find(ds => ds._id === query.datasourceId) $: query.schema = fields.reduce( (acc, next) => ({ @@ -113,10 +111,7 @@ async function saveQuery() { try { - const { _id } = await queries.save( - query.datasourceId, - query - ) + const { _id } = await queries.save(query.datasourceId, query) notifier.success(`Query saved successfully.`) $goto(`../../${_id}`) } catch (err) { diff --git a/packages/builder/src/components/settings/tabs/APIKeys.svelte b/packages/builder/src/components/settings/tabs/APIKeys.svelte index e48af500dc..45dedf0041 100644 --- a/packages/builder/src/components/settings/tabs/APIKeys.svelte +++ b/packages/builder/src/components/settings/tabs/APIKeys.svelte @@ -2,7 +2,7 @@ import { Input, Label, TextButton } from "@budibase/bbui" import api from "builderStore/api" import { notifier } from "builderStore/store/notifications" - import { database } from 'stores/backend/' + import { database } from "stores/backend" import analytics from "analytics" let keys = { budibase: "" } diff --git a/packages/builder/src/pages/builder/[application]/_reset.svelte b/packages/builder/src/pages/builder/[application]/_reset.svelte index 0336eac179..ffc46dacd4 100644 --- a/packages/builder/src/pages/builder/[application]/_reset.svelte +++ b/packages/builder/src/pages/builder/[application]/_reset.svelte @@ -1,6 +1,6 @@ -{#if $backendUiStore.tables.length === 0} +{#if $tables.list.length === 0} Connect your first datasource to start building. {:else}Select a datasource to edit{/if} @@ -22,26 +20,3 @@ margin-top: 2px; } -======= - import { datasources, tables } from 'stores/backend/' - import { goto } from "@sveltech/routify" - import { onMount } from "svelte" - - onMount(async () => { - // navigate to first table in list, if not already selected - $datasources.list.length > 0 && $goto(`../${$datasources.list[0]._id}`) - }) - - - {#if $tables.list.length === 0} - Connect your first datasource to start building. - {:else}Select a datasource to edit{/if} - - ->>>>>>> d803aa0bd7a74220e432f4a1b338abdd7fbe9b7d:packages/builder/src/pages/[application]/data/datasource/index.svelte diff --git a/packages/builder/src/pages/builder/[application]/data/table/[selectedTable]/_layout.svelte b/packages/builder/src/pages/builder/[application]/data/table/[selectedTable]/_layout.svelte index ad2c1e407b..14f6303e5f 100644 --- a/packages/builder/src/pages/builder/[application]/data/table/[selectedTable]/_layout.svelte +++ b/packages/builder/src/pages/builder/[application]/data/table/[selectedTable]/_layout.svelte @@ -1,16 +1,9 @@ {#if $database?._id && $tables?.selected?.name} diff --git a/packages/builder/src/pages/builder/[application]/data/table/_layout.svelte b/packages/builder/src/pages/builder/[application]/data/table/_layout.svelte index 1a542d9ad8..9ab874a4d0 100644 --- a/packages/builder/src/pages/builder/[application]/data/table/_layout.svelte +++ b/packages/builder/src/pages/builder/[application]/data/table/_layout.svelte @@ -1,6 +1,6 @@ diff --git a/packages/builder/src/pages/builder/[application]/data/view/[selectedView]/_layout.svelte b/packages/builder/src/pages/builder/[application]/data/view/[selectedView]/_layout.svelte index 87251c5da1..ec8bca74ef 100644 --- a/packages/builder/src/pages/builder/[application]/data/view/[selectedView]/_layout.svelte +++ b/packages/builder/src/pages/builder/[application]/data/view/[selectedView]/_layout.svelte @@ -1,11 +1,6 @@ diff --git a/packages/builder/vite.config.js b/packages/builder/vite.config.js index b7ca281a63..db02790ffd 100644 --- a/packages/builder/vite.config.js +++ b/packages/builder/vite.config.js @@ -40,6 +40,10 @@ export default ({ mode }) => { find: "builderStore", replacement: path.resolve("./src/builderStore"), }, + { + find: "stores", + replacement: path.resolve("./src/stores"), + }, { find: "constants", replacement: path.resolve("./src/constants"),