Merge remote-tracking branch 'upstream/master' into feature/builder-organization

This commit is contained in:
kevmodrome 2020-04-01 12:47:36 +02:00
commit 9c99f416a7
16 changed files with 48 additions and 24 deletions

View File

@ -1,5 +1,5 @@
{ {
"version": "0.0.27", "version": "0.0.29",
"npmClient": "yarn", "npmClient": "yarn",
"packages": [ "packages": [
"packages/*" "packages/*"

View File

@ -12,7 +12,7 @@
"publishdev": "yarn build && node ./scripts/publishDev.js" "publishdev": "yarn build && node ./scripts/publishDev.js"
}, },
"devDependencies": { "devDependencies": {
"@budibase/client": "^0.0.27", "@budibase/client": "^0.0.29",
"fs-extra": "^8.1.0", "fs-extra": "^8.1.0",
"lodash": "^4.17.15", "lodash": "^4.17.15",
"npm-run-all": "^4.1.5", "npm-run-all": "^4.1.5",
@ -30,7 +30,7 @@
"keywords": [ "keywords": [
"svelte" "svelte"
], ],
"version": "0.0.27", "version": "0.0.29",
"license": "MIT", "license": "MIT",
"gitHead": "72a77a035eb7c1443b079bf93c29b3e5fe02094e" "gitHead": "72a77a035eb7c1443b079bf93c29b3e5fe02094e"
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@budibase/builder", "name": "@budibase/builder",
"version": "0.0.27", "version": "0.0.29",
"license": "AGPL-3.0", "license": "AGPL-3.0",
"private": true, "private": true,
"scripts": { "scripts": {
@ -38,7 +38,7 @@
] ]
}, },
"dependencies": { "dependencies": {
"@budibase/client": "^0.0.27", "@budibase/client": "^0.0.29",
"@nx-js/compiler-util": "^2.0.0", "@nx-js/compiler-util": "^2.0.0",
"codemirror": "^5.51.0", "codemirror": "^5.51.0",
"date-fns": "^1.29.0", "date-fns": "^1.29.0",

View File

@ -16,7 +16,7 @@
<div> <div>
<h4 style="margin-bottom: 20px">Choose an Application</h4> <h4 style="margin-bottom: 20px">Choose an Application</h4>
{#each $store.apps as app} {#each $store.apps as app}
<a href={`#/${app}`} class="app-link">{app}</a> <a href={`#${app}`} class="app-link">{app}</a>
{/each} {/each}
</div> </div>
</div> </div>

View File

@ -1,6 +1,7 @@
<script> <script>
import { tick } from "svelte" import { tick } from "svelte"
import { store, backendUiStore } from "builderStore" import { store, backendUiStore } from "builderStore"
import api from "builderStore/api"
import getIcon from "../common/icon" import getIcon from "../common/icon"
import { CheckIcon } from "../common/Icons" import { CheckIcon } from "../common/Icons"
@ -13,6 +14,23 @@
backendUiStore.actions.views.select(views[0]) backendUiStore.actions.views.select(views[0])
backendUiStore.actions.database.select(database) backendUiStore.actions.database.select(database)
} }
async function deleteDatabase(database) {
const DELETE_DATABASE_URL = `/_builder/instance/_master/0/api/record/applications/${$store.appId}/instances/${database.id}`
const response = await api.delete(DELETE_DATABASE_URL)
store.update(state => {
state.appInstances = state.appInstances.filter(
db => db.id !== database.id
)
return state
})
}
onMount(() => {
if ($store.appInstances.length > 0) {
selectDatabase($store.appInstances[0])
}
})
</script> </script>
<div class="root"> <div class="root">
@ -24,12 +42,15 @@
<CheckIcon /> <CheckIcon />
{/if} {/if}
</span> </span>
<i
class="ri-delete-bin-7-line hoverable uk-margin-small-left"
on:click={() => deleteDatabase(database)} />
<button <button
class:active={database.id === $backendUiStore.selectedDatabase.id} class:active={database.id === $backendUiStore.selectedDatabase.id}
on:click={() => selectDatabase(database)}> on:click={() => selectDatabase(database)}>
{database.name} {database.name}
</button> </button>
</li> </li>
{/each} {/each}
</ul> </ul>
@ -53,6 +74,8 @@
li { li {
margin: 0.5rem 0; margin: 0.5rem 0;
display: flex;
align-items: center;
} }
button { button {

View File

@ -1,6 +1,6 @@
{ {
"name": "budibase", "name": "budibase",
"version": "0.0.27", "version": "0.0.29",
"description": "Budibase CLI", "description": "Budibase CLI",
"repository": "https://github.com/Budibase/Budibase", "repository": "https://github.com/Budibase/Budibase",
"homepage": "https://budibase.com", "homepage": "https://budibase.com",
@ -20,8 +20,8 @@
"author": "Budibase", "author": "Budibase",
"license": "AGPL-3.0-or-later", "license": "AGPL-3.0-or-later",
"dependencies": { "dependencies": {
"@budibase/datastores": "^0.0.27", "@budibase/datastores": "^0.0.29",
"@budibase/server": "^0.0.27", "@budibase/server": "^0.0.29",
"@inquirer/password": "^0.0.6-alpha.0", "@inquirer/password": "^0.0.6-alpha.0",
"chalk": "^2.4.2", "chalk": "^2.4.2",
"fs-extra": "^8.1.0", "fs-extra": "^8.1.0",

View File

@ -1,6 +1,6 @@
{ {
"name": "@budibase/client", "name": "@budibase/client",
"version": "0.0.27", "version": "0.0.29",
"license": "MPL-2.0", "license": "MPL-2.0",
"main": "dist/budibase-client.js", "main": "dist/budibase-client.js",
"module": "dist/budibase-client.esm.mjs", "module": "dist/budibase-client.esm.mjs",

View File

@ -1,6 +1,6 @@
{ {
"name": "@budibase/core", "name": "@budibase/core",
"version": "0.0.27", "version": "0.0.29",
"description": "core javascript library for budibase", "description": "core javascript library for budibase",
"main": "dist/budibase-core.umd.js", "main": "dist/budibase-core.umd.js",
"module": "dist/budibase-core.esm.js", "module": "dist/budibase-core.esm.js",

View File

@ -1,6 +1,6 @@
{ {
"name": "@budibase/datastores", "name": "@budibase/datastores",
"version": "0.0.27", "version": "0.0.29",
"description": "implementations of all the datastores... azureblob, local etc", "description": "implementations of all the datastores... azureblob, local etc",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
@ -27,7 +27,7 @@
"@babel/core": "^7.1.2", "@babel/core": "^7.1.2",
"@babel/node": "^7.0.0", "@babel/node": "^7.0.0",
"@babel/preset-env": "^7.1.0", "@babel/preset-env": "^7.1.0",
"@budibase/core": "^0.0.27", "@budibase/core": "^0.0.29",
"es6-promisify": "^6.0.1", "es6-promisify": "^6.0.1",
"fs-extra": "^8.1.0", "fs-extra": "^8.1.0",
"lodash": "^4.17.13", "lodash": "^4.17.13",

View File

@ -12,8 +12,8 @@
"publishdev": "yarn build && node ./scripts/publishDev.js" "publishdev": "yarn build && node ./scripts/publishDev.js"
}, },
"devDependencies": { "devDependencies": {
"@budibase/client": "^0.0.27", "@budibase/client": "^0.0.29",
"@budibase/standard-components": "^0.0.27", "@budibase/standard-components": "^0.0.29",
"@material/button": "^4.0.0", "@material/button": "^4.0.0",
"@material/checkbox": "^4.0.0", "@material/checkbox": "^4.0.0",
"@material/data-table": "4.0.0", "@material/data-table": "4.0.0",
@ -50,7 +50,7 @@
"keywords": [ "keywords": [
"svelte" "svelte"
], ],
"version": "0.0.27", "version": "0.0.29",
"license": "MIT", "license": "MIT",
"gitHead": "72a77a035eb7c1443b079bf93c29b3e5fe02094e", "gitHead": "72a77a035eb7c1443b079bf93c29b3e5fe02094e",
"dependencies": { "dependencies": {

View File

@ -68,7 +68,6 @@
function handleOnClick() { function handleOnClick() {
let item = { _id, checked, label, value } let item = { _id, checked, label, value }
debugger
if (context === "checkboxgroup") { if (context === "checkboxgroup") {
let idx = selectedItems.getItemIdx($selectedItems, _id) let idx = selectedItems.getItemIdx($selectedItems, _id)
if (idx > -1) { if (idx > -1) {

View File

@ -24,7 +24,6 @@
if (_bb.isBound(_bb.props.value)) { if (_bb.isBound(_bb.props.value)) {
_bb.setStateFromBinding(_bb.props.value, value) _bb.setStateFromBinding(_bb.props.value, value)
} }
debugger
_bb.call(onChange, value) _bb.call(onChange, value)
}, value) }, value)
_bb.setContext("BBMD:checkbox:selectedItemsStore", selectedItemsStore) _bb.setContext("BBMD:checkbox:selectedItemsStore", selectedItemsStore)

View File

@ -98,6 +98,7 @@
<div class="mdc-menu-surface--anchor"> <div class="mdc-menu-surface--anchor">
<Textfield <Textfield
{_bb}
{label} {label}
onChange={dateFieldChange} onChange={dateFieldChange}
value={selectedDate} value={selectedDate}

View File

@ -129,6 +129,7 @@ TODO:Needs error handling - this will depend on how Budibase handles errors
{#if renderLeadingIcon} {#if renderLeadingIcon}
{#if useIconButton} {#if useIconButton}
<IconButton <IconButton
{_bb}
{icon} {icon}
context="mdc-text-field__icon mdc-text-field__icon--leading" context="mdc-text-field__icon mdc-text-field__icon--leading"
onClick={iconButtonClick} /> onClick={iconButtonClick} />
@ -152,6 +153,7 @@ TODO:Needs error handling - this will depend on how Budibase handles errors
{#if renderTrailingIcon} {#if renderTrailingIcon}
{#if useIconButton} {#if useIconButton}
<IconButton <IconButton
{_bb}
{icon} {icon}
context="mdc-text-field__icon mdc-text-field__icon--trailing" context="mdc-text-field__icon mdc-text-field__icon--trailing"
onClick={iconButtonClick} /> onClick={iconButtonClick} />

View File

@ -1,6 +1,6 @@
{ {
"name": "@budibase/server", "name": "@budibase/server",
"version": "0.0.27", "version": "0.0.29",
"description": "Budibase Web Server", "description": "Budibase Web Server",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
@ -16,8 +16,8 @@
"author": "Michael Shanks", "author": "Michael Shanks",
"license": "AGPL-3.0-or-later", "license": "AGPL-3.0-or-later",
"dependencies": { "dependencies": {
"@budibase/client": "^0.0.27", "@budibase/client": "^0.0.29",
"@budibase/core": "^0.0.27", "@budibase/core": "^0.0.29",
"@koa/router": "^8.0.0", "@koa/router": "^8.0.0",
"fs-extra": "^8.1.0", "fs-extra": "^8.1.0",
"koa": "^2.7.0", "koa": "^2.7.0",

View File

@ -12,7 +12,7 @@
"publishdev": "yarn build && node ./scripts/publishDev.js" "publishdev": "yarn build && node ./scripts/publishDev.js"
}, },
"devDependencies": { "devDependencies": {
"@budibase/client": "^0.0.27", "@budibase/client": "^0.0.29",
"@nx-js/compiler-util": "^2.0.0", "@nx-js/compiler-util": "^2.0.0",
"bcryptjs": "2.4.3", "bcryptjs": "2.4.3",
"fs-extra": "^8.1.0", "fs-extra": "^8.1.0",
@ -32,7 +32,7 @@
"keywords": [ "keywords": [
"svelte" "svelte"
], ],
"version": "0.0.27", "version": "0.0.29",
"license": "MIT", "license": "MIT",
"gitHead": "72a77a035eb7c1443b079bf93c29b3e5fe02094e" "gitHead": "72a77a035eb7c1443b079bf93c29b3e5fe02094e"
} }