From 6ee72d7301be69b43e615d0fbd4ad1c4fb4a181c Mon Sep 17 00:00:00 2001 From: Michael Shanks Date: Tue, 18 Feb 2020 21:22:43 +0000 Subject: [PATCH] bug in store - insertCodeMetadata import vanished --- packages/builder/src/builderStore/store.js | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/packages/builder/src/builderStore/store.js b/packages/builder/src/builderStore/store.js index 97a49b2fdc..8d2456abb0 100644 --- a/packages/builder/src/builderStore/store.js +++ b/packages/builder/src/builderStore/store.js @@ -5,7 +5,6 @@ import { sortBy, map, last, - keys, concat, find, isEmpty, @@ -21,10 +20,7 @@ import { import { writable } from "svelte/store" import { defaultPagesObject } from "../userInterface/pagesParsing/defaultPagesObject" import api from "./api" -import { - isRootComponent, - getExactComponent, -} from "../userInterface/pagesParsing/searchComponents" +import { getExactComponent } from "../userInterface/pagesParsing/searchComponents" import { rename } from "../userInterface/pagesParsing/renameScreen" import { getNewScreen, @@ -33,12 +29,10 @@ import { getBuiltin, } from "../userInterface/pagesParsing/createProps" import { expandComponentDefinition } from "../userInterface/pagesParsing/types" -import { - loadLibs, - loadLibUrls -} from "./loadComponentLibraries" +import { loadLibs, loadLibUrls } from "./loadComponentLibraries" import { buildCodeForScreens } from "./buildCodeForScreens" import { generate_screen_css } from "./generate_css" +import { insertCodeMetadata } from "./insertCodeMetadata" let appname = "" @@ -714,7 +708,6 @@ const setCurrentPage = store => pageName => { }) } - const getContainerComponent = components => components.find(c => c.name === "@budibase/standard-components/container") @@ -727,8 +720,8 @@ const addChildComponent = store => (componentToAdd, presetName) => { const component = componentToAdd.startsWith("##") ? getBuiltin(componentToAdd) : state.components.find(({ name }) => name === componentToAdd) - const presetProps = presetName ? component.presets[presetName] : {}; - const newComponent = createProps(component, presetProps); + const presetProps = presetName ? component.presets[presetName] : {} + const newComponent = createProps(component, presetProps) state.currentComponentInfo._children = state.currentComponentInfo._children.concat( newComponent.props