diff --git a/lerna.json b/lerna.json index e2e4d027b5..61a14ec6f2 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "0.9.140-alpha.5", + "version": "0.9.140-alpha.10", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/auth/package.json b/packages/auth/package.json index 8c1f38d64c..365df62d01 100644 --- a/packages/auth/package.json +++ b/packages/auth/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/auth", - "version": "0.9.140-alpha.5", + "version": "0.9.140-alpha.10", "description": "Authentication middlewares for budibase builder and apps", "main": "src/index.js", "author": "Budibase", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index 9ddedfd28f..b1ae385e45 100644 --- a/packages/bbui/package.json +++ b/packages/bbui/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/bbui", "description": "A UI solution used in the different Budibase projects.", - "version": "0.9.140-alpha.5", + "version": "0.9.140-alpha.10", "license": "AGPL-3.0", "svelte": "src/index.js", "module": "dist/bbui.es.js", diff --git a/packages/builder/package.json b/packages/builder/package.json index 01dfc08f2c..82905cd765 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "0.9.140-alpha.5", + "version": "0.9.140-alpha.10", "license": "AGPL-3.0", "private": true, "scripts": { @@ -65,10 +65,10 @@ } }, "dependencies": { - "@budibase/bbui": "^0.9.140-alpha.5", - "@budibase/client": "^0.9.140-alpha.5", + "@budibase/bbui": "^0.9.140-alpha.10", + "@budibase/client": "^0.9.140-alpha.10", "@budibase/colorpicker": "1.1.2", - "@budibase/string-templates": "^0.9.140-alpha.5", + "@budibase/string-templates": "^0.9.140-alpha.10", "@sentry/browser": "5.19.1", "@spectrum-css/page": "^3.0.1", "@spectrum-css/vars": "^3.0.1", diff --git a/packages/builder/src/builderStore/store/frontend.js b/packages/builder/src/builderStore/store/frontend.js index b7c42003da..09132f28cb 100644 --- a/packages/builder/src/builderStore/store/frontend.js +++ b/packages/builder/src/builderStore/store/frontend.js @@ -215,6 +215,13 @@ export const getFrontendStore = () => { if (screenToDelete._id === state.selectedScreenId) { state.selectedScreenId = null } + //remove the link for this screen + screenDeletePromises.push( + store.actions.components.links.delete( + screenToDelete.routing.route, + screenToDelete.props._instanceName + ) + ) } return state }) @@ -646,6 +653,36 @@ export const getFrontendStore = () => { // Save layout await store.actions.layouts.save(layout) }, + delete: async (url, title) => { + const layout = get(mainLayout) + if (!layout) { + return + } + + // Add link setting to main layout + if (layout.props._component.endsWith("layout")) { + // If using a new SDK, add to the layout component settings + layout.props.links = layout.props.links.filter( + link => !(link.text === title && link.url === url) + ) + } else { + // If using an old SDK, add to the navigation component + // TODO: remove this when we can assume everyone has updated + const nav = findComponentType( + layout.props, + "@budibase/standard-components/navigation" + ) + if (!nav) { + return + } + + nav._children = nav._children.filter( + child => !(child.url === url && child.text === title) + ) + } + // Save layout + await store.actions.layouts.save(layout) + }, }, }, } diff --git a/packages/builder/src/components/backend/DatasourceNavigator/DatasourceNavigator.svelte b/packages/builder/src/components/backend/DatasourceNavigator/DatasourceNavigator.svelte index 193e778300..6ba8e4042f 100644 --- a/packages/builder/src/components/backend/DatasourceNavigator/DatasourceNavigator.svelte +++ b/packages/builder/src/components/backend/DatasourceNavigator/DatasourceNavigator.svelte @@ -83,20 +83,19 @@ {#if datasource.open} + {#each $queries.list.filter(query => query.datasourceId === datasource._id) as query} + onClickQuery(query)} + > + + + {/each} {/if} - - {#each $queries.list.filter(query => query.datasourceId === datasource._id) as query} - onClickQuery(query)} - > - - - {/each} {/each} {/if} diff --git a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/actions/RefreshDataProvider.svelte b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/actions/RefreshDataProvider.svelte new file mode 100644 index 0000000000..fe251a0320 --- /dev/null +++ b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/actions/RefreshDataProvider.svelte @@ -0,0 +1,35 @@ + + +
+ +