From c8dd48b5078f38ae7472a17aeb60fa0edeaae352 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Mon, 18 May 2020 11:01:09 +0100 Subject: [PATCH] formatting --- packages/builder/src/App.svelte | 1 - .../builder/src/builderStore/store/backend.js | 2 +- .../builder/src/builderStore/store/index.js | 18 ++++--- .../modals/CreateDatabase.svelte | 5 +- .../EventsEditor/EventEditorModal.svelte | 2 +- .../userInterface/PropControl.svelte | 2 +- .../userInterface/StateBindingControl.svelte | 5 +- .../userInterface/pagesParsing/createProps.js | 2 +- .../userInterface/pagesParsing/types.js | 4 +- packages/builder/src/main.js | 2 +- packages/client/src/index.js | 2 +- .../server/src/api/controllers/instance.js | 2 +- .../src/api/routes/tests/couchTestUtils.js | 8 +-- packages/server/src/db/client.js | 8 +-- packages/server/src/electron.js | 51 +++++++++---------- .../server/src/utilities/builder/buildPage.js | 4 +- packages/standard-components/rollup.config.js | 2 +- .../standard-components/src/DataChart.svelte | 27 +++++----- .../standard-components/src/DataForm.svelte | 26 ++++------ .../standard-components/src/DataList.svelte | 15 ++---- .../standard-components/src/DataMap.svelte | 4 +- .../standard-components/src/DataSearch.svelte | 6 +-- .../standard-components/src/DataTable.svelte | 2 +- scripts/symlinkDev.js | 4 +- 24 files changed, 93 insertions(+), 111 deletions(-) diff --git a/packages/builder/src/App.svelte b/packages/builder/src/App.svelte index de64d43249..86c7580a56 100644 --- a/packages/builder/src/App.svelte +++ b/packages/builder/src/App.svelte @@ -29,4 +29,3 @@ - diff --git a/packages/builder/src/builderStore/store/backend.js b/packages/builder/src/builderStore/store/backend.js index e925c04e8d..62ebd39682 100644 --- a/packages/builder/src/builderStore/store/backend.js +++ b/packages/builder/src/builderStore/store/backend.js @@ -80,4 +80,4 @@ export const createDatabaseForApp = store => appInstance => { state.appInstances.push(appInstance) return state }) -} \ No newline at end of file +} diff --git a/packages/builder/src/builderStore/store/index.js b/packages/builder/src/builderStore/store/index.js index 5adb1b88f3..63b8ef16be 100644 --- a/packages/builder/src/builderStore/store/index.js +++ b/packages/builder/src/builderStore/store/index.js @@ -1,5 +1,5 @@ import { cloneDeep, values } from "lodash/fp" -import { backendUiStore } from "builderStore"; +import { backendUiStore } from "builderStore" import * as backendStoreActions from "./backend" import { writable, get } from "svelte/store" import api from "../api" @@ -194,7 +194,7 @@ const setCurrentScreen = store => screenName => { const deleteScreen = store => name => { store.update(s => { const components = s.components.filter(c => c.name !== name) - const screens = s.screens.filter(c => c.name !== name); + const screens = s.screens.filter(c => c.name !== name) s.components = components s.screens = screens @@ -351,12 +351,16 @@ const addChildComponent = store => (componentToAdd, presetName) => { const presetProps = presetName ? component.presets[presetName] : {} - const instanceId = get(backendUiStore).selectedDatabase._id; + const instanceId = get(backendUiStore).selectedDatabase._id - const newComponent = createProps(component, { - ...presetProps, - _instanceId: instanceId - }, state) + const newComponent = createProps( + component, + { + ...presetProps, + _instanceId: instanceId, + }, + state + ) state.currentComponentInfo._children = state.currentComponentInfo._children.concat( newComponent.props diff --git a/packages/builder/src/components/database/ModelDataTable/modals/CreateDatabase.svelte b/packages/builder/src/components/database/ModelDataTable/modals/CreateDatabase.svelte index ec03a77247..b9208b15a3 100644 --- a/packages/builder/src/components/database/ModelDataTable/modals/CreateDatabase.svelte +++ b/packages/builder/src/components/database/ModelDataTable/modals/CreateDatabase.svelte @@ -9,10 +9,7 @@ let databaseName async function createDatabase() { - const response = await api.createDatabase( - $store.appId, - databaseName - ) + const response = await api.createDatabase($store.appId, databaseName) store.createDatabaseForApp(response) onClosed() } diff --git a/packages/builder/src/components/userInterface/EventsEditor/EventEditorModal.svelte b/packages/builder/src/components/userInterface/EventsEditor/EventEditorModal.svelte index 09f7af7c81..684d400399 100644 --- a/packages/builder/src/components/userInterface/EventsEditor/EventEditorModal.svelte +++ b/packages/builder/src/components/userInterface/EventsEditor/EventEditorModal.svelte @@ -1,5 +1,5 @@
@@ -28,7 +27,7 @@ +
{/each} - +