From c120eb934d9326f5f252114a3851455c2b76d681 Mon Sep 17 00:00:00 2001 From: kevmodrome Date: Tue, 31 Mar 2020 13:16:03 +0200 Subject: [PATCH] updates imports and finishes moving all commonly used files to the node_modules folder --- packages/builder/rollup.config.js | 9 ++- packages/builder/src/App.svelte | 2 +- .../node_modules/builderStore/generate_css.js | 2 +- .../builderStore/loadComponentLibraries.js | 2 +- .../builderStore/store/backend.js | 10 +-- .../node_modules/builderStore/store/index.js | 12 ++-- .../accessLevels/AccessLevelsRoot.svelte | 17 +++-- .../actionsAndTriggers/ActionView.svelte | 14 ++-- .../actionsAndTriggers/Actions.svelte | 12 ++-- .../ActionsAndTriggersRoot.svelte | 35 +++++----- .../actionsAndTriggers/TriggerView.svelte | 23 ++++--- .../actionsAndTriggers/Triggers.svelte | 8 +-- .../node_modules/components/common/core.js | 18 +++--- .../components/common/eventHandlers.js | 6 +- .../components/database/DatabaseRoot.svelte | 10 +-- .../components/database/IndexView.svelte | 19 +++--- .../ModelDataTable/ModelDataTable.svelte | 20 ++++-- .../ModelDataTable/TablePagination.svelte | 2 +- .../components/database/ModelDataTable/api.js | 4 +- .../modals/CreateDatabase.svelte | 6 +- .../modals/CreateEditModel.svelte | 6 +- .../modals/CreateEditRecord.svelte | 12 ++-- .../ModelDataTable/modals/CreateUser.svelte | 6 +- .../ModelDataTable/modals/DeleteRecord.svelte | 6 +- .../components/database/ModelView.svelte | 64 ++++++++++--------- .../components/nav/BackendNav.svelte | 5 +- .../components/nav/DatabasesList.svelte | 2 +- .../components/nav/HierarchyRow.svelte | 2 +- .../components/nav/NavItem.svelte | 2 +- .../nav/SchemaManagementDrawer.svelte | 7 +- .../components/nav/UsersList.svelte | 4 +- .../userInterface/CodeEditor.svelte | 6 +- .../ComponentPropertiesPanel.svelte | 6 +- .../ComponentSelectionList.svelte | 29 +++++---- .../userInterface/ComponentsHierarchy.svelte | 31 +++++---- .../ComponentsPaneSwitcher.svelte | 2 +- .../userInterface/CurrentItemPreview.svelte | 4 +- .../EventsEditor/EventsEditor.svelte | 18 +++--- .../EventsEditor/HandlerSelector.svelte | 12 ++-- .../EventsEditor/StateBindingCascader.svelte | 16 ++--- .../userInterface/MasterLayout.svelte | 28 ++++---- .../components/userInterface/NewScreen.svelte | 25 ++++---- .../components/userInterface/PageView.svelte | 18 +++--- .../components/userInterface/PagesList.svelte | 6 +- .../PropertyCascader/PropertyCascader.svelte | 8 +-- .../userInterface/SettingsView.svelte | 10 +-- .../userInterface/UserInterfaceRoot.svelte | 10 +-- .../userInterface/pagesParsing/createProps.js | 2 +- 48 files changed, 305 insertions(+), 273 deletions(-) diff --git a/packages/builder/rollup.config.js b/packages/builder/rollup.config.js index b928418559..615e5b8208 100644 --- a/packages/builder/rollup.config.js +++ b/packages/builder/rollup.config.js @@ -214,13 +214,12 @@ export default { // Watch the `dist` directory and refresh the // browser on changes when not in production - !production && serve(), !production && livereload(outputpath), !production && - browsersync({ - server: outputpath, - middleware: [apiProxy, _builderProxy], - }), + browsersync({ + server: outputpath, + middleware: [apiProxy, _builderProxy], + }), // If we're building for production (npm run build // instead of npm run dev), minify diff --git a/packages/builder/src/App.svelte b/packages/builder/src/App.svelte index 5c7124fd24..424c7b9a1e 100644 --- a/packages/builder/src/App.svelte +++ b/packages/builder/src/App.svelte @@ -8,7 +8,7 @@ import Spinner from "components/common/Spinner.svelte" import AppNotification, { showAppNotification, - } from "components/AppNotification.svelte" + } from "components/common/AppNotification.svelte" let init = initialise() diff --git a/packages/builder/src/node_modules/builderStore/generate_css.js b/packages/builder/src/node_modules/builderStore/generate_css.js index 19148ce9b0..0f776a5255 100644 --- a/packages/builder/src/node_modules/builderStore/generate_css.js +++ b/packages/builder/src/node_modules/builderStore/generate_css.js @@ -1,5 +1,5 @@ import { filter, map, reduce, toPairs } from "lodash/fp" -import { pipe } from "../common/core" +import { pipe } from "components/common/core" const self = n => n const join_with = delimiter => a => a.join(delimiter) diff --git a/packages/builder/src/node_modules/builderStore/loadComponentLibraries.js b/packages/builder/src/node_modules/builderStore/loadComponentLibraries.js index 5a142f2798..8534bcf177 100644 --- a/packages/builder/src/node_modules/builderStore/loadComponentLibraries.js +++ b/packages/builder/src/node_modules/builderStore/loadComponentLibraries.js @@ -1,5 +1,5 @@ import { flatten, values, uniq, map } from "lodash/fp" -import { pipe } from "../common/core" +import { pipe } from "components/common/core" export const loadLibs = async (appName, appPackage) => { const allLibraries = {} diff --git a/packages/builder/src/node_modules/builderStore/store/backend.js b/packages/builder/src/node_modules/builderStore/store/backend.js index 65f012e34c..fa888ca9d5 100644 --- a/packages/builder/src/node_modules/builderStore/store/backend.js +++ b/packages/builder/src/node_modules/builderStore/store/backend.js @@ -1,7 +1,7 @@ import { writable } from "svelte/store" import api from "../api" import { cloneDeep, sortBy, find, remove } from "lodash/fp" -import { hierarchy as hierarchyFunctions } from "../../../../core/src" +import { hierarchy as hierarchyFunctions } from "../../../../../core/src" import { getNode, validate, @@ -10,7 +10,7 @@ import { isIndex, canDeleteIndex, canDeleteRecord, -} from "../../common/core" +} from "components/common/core" export const getBackendUiStore = () => { const INITIAL_BACKEND_UI_STATE = { @@ -100,9 +100,9 @@ export const saveBackend = async state => { const instances_currentFirst = state.selectedDatabase ? [ - state.appInstances.find(i => i.id === state.selectedDatabase.id), - ...state.appInstances.filter(i => i.id !== state.selectedDatabase.id), - ] + state.appInstances.find(i => i.id === state.selectedDatabase.id), + ...state.appInstances.filter(i => i.id !== state.selectedDatabase.id), + ] : state.appInstances for (let instance of instances_currentFirst) { diff --git a/packages/builder/src/node_modules/builderStore/store/index.js b/packages/builder/src/node_modules/builderStore/store/index.js index 41230bcaf4..76cdc5a7c3 100644 --- a/packages/builder/src/node_modules/builderStore/store/index.js +++ b/packages/builder/src/node_modules/builderStore/store/index.js @@ -1,18 +1,18 @@ import { filter, cloneDeep, last, concat, isEmpty, values } from "lodash/fp" -import { pipe, getNode, constructHierarchy } from "../../common/core" +import { pipe, getNode, constructHierarchy } from "components/common/core" import * as backendStoreActions from "./backend" import { writable } from "svelte/store" -import { defaultPagesObject } from "../../userInterface/pagesParsing/defaultPagesObject" +import { defaultPagesObject } from "components/userInterface/pagesParsing/defaultPagesObject" import api from "../api" -import { getExactComponent } from "../../userInterface/pagesParsing/searchComponents" -import { rename } from "../../userInterface/pagesParsing/renameScreen" +import { getExactComponent } from "components/userInterface/pagesParsing/searchComponents" +import { rename } from "components/userInterface/pagesParsing/renameScreen" import { getNewScreen, createProps, makePropsSafe, getBuiltin, -} from "../../userInterface/pagesParsing/createProps" -import { expandComponentDefinition } from "../../userInterface/pagesParsing/types" +} from "components/userInterface/pagesParsing/createProps" +import { expandComponentDefinition } from "components/userInterface/pagesParsing/types" import { loadLibs, libUrlsForPreview } from "../loadComponentLibraries" import { buildCodeForScreens } from "../buildCodeForScreens" import { generate_screen_css } from "../generate_css" diff --git a/packages/builder/src/node_modules/components/accessLevels/AccessLevelsRoot.svelte b/packages/builder/src/node_modules/components/accessLevels/AccessLevelsRoot.svelte index 8d57d83f2b..f53afae5f6 100644 --- a/packages/builder/src/node_modules/components/accessLevels/AccessLevelsRoot.svelte +++ b/packages/builder/src/node_modules/components/accessLevels/AccessLevelsRoot.svelte @@ -1,12 +1,15 @@ diff --git a/packages/builder/src/node_modules/components/database/ModelDataTable/modals/CreateEditRecord.svelte b/packages/builder/src/node_modules/components/database/ModelDataTable/modals/CreateEditRecord.svelte index 25837db018..99c7e78116 100644 --- a/packages/builder/src/node_modules/components/database/ModelDataTable/modals/CreateEditRecord.svelte +++ b/packages/builder/src/node_modules/components/database/ModelDataTable/modals/CreateEditRecord.svelte @@ -1,18 +1,18 @@
diff --git a/packages/builder/src/node_modules/components/nav/DatabasesList.svelte b/packages/builder/src/node_modules/components/nav/DatabasesList.svelte index b531d34351..422e1b3136 100644 --- a/packages/builder/src/node_modules/components/nav/DatabasesList.svelte +++ b/packages/builder/src/node_modules/components/nav/DatabasesList.svelte @@ -1,6 +1,6 @@