Remove unused props
This commit is contained in:
parent
227679f189
commit
cc6c603924
|
@ -47,7 +47,6 @@ declare global {
|
||||||
// Data from builder
|
// Data from builder
|
||||||
"##BUDIBASE_APP_ID##"?: string
|
"##BUDIBASE_APP_ID##"?: string
|
||||||
"##BUDIBASE_IN_BUILDER##"?: true
|
"##BUDIBASE_IN_BUILDER##"?: true
|
||||||
"##BUDIBASE_PREVIEW_LAYOUT##"?: Layout
|
|
||||||
"##BUDIBASE_PREVIEW_SCREEN##"?: Screen
|
"##BUDIBASE_PREVIEW_SCREEN##"?: Screen
|
||||||
"##BUDIBASE_SELECTED_COMPONENT_ID##"?: string
|
"##BUDIBASE_SELECTED_COMPONENT_ID##"?: string
|
||||||
"##BUDIBASE_PREVIEW_ID##"?: number
|
"##BUDIBASE_PREVIEW_ID##"?: number
|
||||||
|
@ -114,7 +113,6 @@ const loadBudibase = async () => {
|
||||||
builderStore.set({
|
builderStore.set({
|
||||||
...get(builderStore),
|
...get(builderStore),
|
||||||
inBuilder: !!window["##BUDIBASE_IN_BUILDER##"],
|
inBuilder: !!window["##BUDIBASE_IN_BUILDER##"],
|
||||||
layout: window["##BUDIBASE_PREVIEW_LAYOUT##"],
|
|
||||||
screen: window["##BUDIBASE_PREVIEW_SCREEN##"],
|
screen: window["##BUDIBASE_PREVIEW_SCREEN##"],
|
||||||
selectedComponentId: window["##BUDIBASE_SELECTED_COMPONENT_ID##"],
|
selectedComponentId: window["##BUDIBASE_SELECTED_COMPONENT_ID##"],
|
||||||
previewId: window["##BUDIBASE_PREVIEW_ID##"],
|
previewId: window["##BUDIBASE_PREVIEW_ID##"],
|
||||||
|
|
|
@ -28,11 +28,9 @@ interface BuilderStore {
|
||||||
navigation: AppNavigation | null
|
navigation: AppNavigation | null
|
||||||
hiddenComponentIds: string[]
|
hiddenComponentIds: string[]
|
||||||
usedPlugins: Plugin[] | null
|
usedPlugins: Plugin[] | null
|
||||||
eventResolvers: {}
|
|
||||||
metadata: { componentId: string; step: number } | null
|
metadata: { componentId: string; step: number } | null
|
||||||
snippets: Snippet[] | null
|
snippets: Snippet[] | null
|
||||||
componentErrors: Record<string, UIComponentError[]>
|
componentErrors: Record<string, UIComponentError[]>
|
||||||
layout: any
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const createBuilderStore = () => {
|
const createBuilderStore = () => {
|
||||||
|
@ -48,13 +46,9 @@ const createBuilderStore = () => {
|
||||||
navigation: null,
|
navigation: null,
|
||||||
hiddenComponentIds: [],
|
hiddenComponentIds: [],
|
||||||
usedPlugins: null,
|
usedPlugins: null,
|
||||||
eventResolvers: {},
|
|
||||||
metadata: null,
|
metadata: null,
|
||||||
snippets: null,
|
snippets: null,
|
||||||
componentErrors: {},
|
componentErrors: {},
|
||||||
|
|
||||||
// Legacy - allow the builder to specify a layout
|
|
||||||
layout: null,
|
|
||||||
}
|
}
|
||||||
const store = writable(initialState)
|
const store = writable(initialState)
|
||||||
const actions = {
|
const actions = {
|
||||||
|
|
|
@ -36,11 +36,6 @@ const createScreenStore = () => {
|
||||||
activeScreen = Helpers.cloneDeep($builderStore.screen)
|
activeScreen = Helpers.cloneDeep($builderStore.screen)
|
||||||
screens = [activeScreen]
|
screens = [activeScreen]
|
||||||
|
|
||||||
// Legacy - allow the builder to specify a layout
|
|
||||||
if ($builderStore.layout) {
|
|
||||||
activeLayout = $builderStore.layout
|
|
||||||
}
|
|
||||||
|
|
||||||
// Attach meta
|
// Attach meta
|
||||||
const errors = $builderStore.componentErrors || {}
|
const errors = $builderStore.componentErrors || {}
|
||||||
const attachComponentMeta = component => {
|
const attachComponentMeta = component => {
|
||||||
|
|
|
@ -80,7 +80,6 @@
|
||||||
// Set some flags so the app knows we're in the builder
|
// Set some flags so the app knows we're in the builder
|
||||||
window["##BUDIBASE_IN_BUILDER##"] = true
|
window["##BUDIBASE_IN_BUILDER##"] = true
|
||||||
window["##BUDIBASE_APP_ID##"] = appId
|
window["##BUDIBASE_APP_ID##"] = appId
|
||||||
window["##BUDIBASE_PREVIEW_LAYOUT##"] = layout
|
|
||||||
window["##BUDIBASE_PREVIEW_SCREEN##"] = screen
|
window["##BUDIBASE_PREVIEW_SCREEN##"] = screen
|
||||||
window["##BUDIBASE_SELECTED_COMPONENT_ID##"] = selectedComponentId
|
window["##BUDIBASE_SELECTED_COMPONENT_ID##"] = selectedComponentId
|
||||||
window["##BUDIBASE_PREVIEW_ID##"] = Math.random()
|
window["##BUDIBASE_PREVIEW_ID##"] = Math.random()
|
||||||
|
|
Loading…
Reference in New Issue