diff --git a/packages/builder/src/builderStore/store/index.js b/packages/builder/src/builderStore/store/index.js index c97eb48f25..0fbe8be518 100644 --- a/packages/builder/src/builderStore/store/index.js +++ b/packages/builder/src/builderStore/store/index.js @@ -24,6 +24,7 @@ import { saveScreenApi as _saveScreenApi, regenerateCssForCurrentScreen, generateNewIdsForComponent, + getComponentDefinition, } from "../storeUtils" export const getStore = () => { const initial = { @@ -74,9 +75,6 @@ export const getStore = () => { export default getStore -export const getComponentDefinition = (state, name) => - name.startsWith("##") ? getBuiltin(name) : state.components[name] - const setPackage = (store, initial) => async pkg => { const [main_screens, unauth_screens] = await Promise.all([ api diff --git a/packages/builder/src/builderStore/storeUtils.js b/packages/builder/src/builderStore/storeUtils.js index 1630d118e0..a1974d81b9 100644 --- a/packages/builder/src/builderStore/storeUtils.js +++ b/packages/builder/src/builderStore/storeUtils.js @@ -1,4 +1,7 @@ -import { makePropsSafe } from "components/userInterface/pagesParsing/createProps" +import { + makePropsSafe, + getBuiltin, +} from "components/userInterface/pagesParsing/createProps" import api from "./api" import { generate_screen_css } from "./generate_css" import { uuid } from "./uuid" @@ -85,3 +88,6 @@ export const generateNewIdsForComponent = c => walkProps(c, p => { p._id = uuid() }) + +export const getComponentDefinition = (state, name) => + name.startsWith("##") ? getBuiltin(name) : state.components[name] diff --git a/packages/builder/src/components/userInterface/ComponentDropdownMenu.svelte b/packages/builder/src/components/userInterface/ComponentDropdownMenu.svelte index 23e28a7b48..b120ca549b 100644 --- a/packages/builder/src/components/userInterface/ComponentDropdownMenu.svelte +++ b/packages/builder/src/components/userInterface/ComponentDropdownMenu.svelte @@ -1,7 +1,7 @@