1
0
Fork 0
mirror of synced 2024-07-15 11:15:59 +12:00

Merge branch 'develop' into api-tests-generate-tenants

This commit is contained in:
Pedro Silva 2023-02-02 09:36:21 +00:00
commit 0cb3e4a046
18 changed files with 111 additions and 79 deletions

View file

@ -194,5 +194,5 @@ jobs:
PAYLOAD_VERSION: ${{ env.RELEASE_VERSION }}
with:
repository: budibase/budibase-deploys
event: deploy-develop-to-qa
event: deploy-budibase-develop-to-qa
github_pat: ${{ secrets.GH_ACCESS_TOKEN }}

View file

@ -1,5 +1,5 @@
{
"version": "2.2.12-alpha.58",
"version": "2.2.12-alpha.61",
"npmClient": "yarn",
"packages": [
"packages/*"

View file

@ -1,6 +1,6 @@
{
"name": "@budibase/backend-core",
"version": "2.2.12-alpha.58",
"version": "2.2.12-alpha.61",
"description": "Budibase backend core libraries used in server and worker",
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
@ -23,7 +23,7 @@
},
"dependencies": {
"@budibase/nano": "10.1.1",
"@budibase/types": "2.2.12-alpha.58",
"@budibase/types": "2.2.12-alpha.61",
"@shopify/jest-koa-mocks": "5.0.1",
"@techpass/passport-openidconnect": "0.3.2",
"aws-cloudfront-sign": "2.2.0",

View file

@ -1,7 +1,7 @@
{
"name": "@budibase/bbui",
"description": "A UI solution used in the different Budibase projects.",
"version": "2.2.12-alpha.58",
"version": "2.2.12-alpha.61",
"license": "MPL-2.0",
"svelte": "src/index.js",
"module": "dist/bbui.es.js",
@ -38,7 +38,7 @@
],
"dependencies": {
"@adobe/spectrum-css-workflow-icons": "1.2.1",
"@budibase/string-templates": "2.2.12-alpha.58",
"@budibase/string-templates": "2.2.12-alpha.61",
"@spectrum-css/accordion": "3.0.24",
"@spectrum-css/actionbutton": "1.0.1",
"@spectrum-css/actiongroup": "1.0.1",

View file

@ -1,6 +1,6 @@
{
"name": "@budibase/builder",
"version": "2.2.12-alpha.58",
"version": "2.2.12-alpha.61",
"license": "GPL-3.0",
"private": true,
"scripts": {
@ -58,10 +58,10 @@
}
},
"dependencies": {
"@budibase/bbui": "2.2.12-alpha.58",
"@budibase/client": "2.2.12-alpha.58",
"@budibase/frontend-core": "2.2.12-alpha.58",
"@budibase/string-templates": "2.2.12-alpha.58",
"@budibase/bbui": "2.2.12-alpha.61",
"@budibase/client": "2.2.12-alpha.61",
"@budibase/frontend-core": "2.2.12-alpha.61",
"@budibase/string-templates": "2.2.12-alpha.61",
"@fortawesome/fontawesome-svg-core": "^6.2.1",
"@fortawesome/free-brands-svg-icons": "^6.2.1",
"@fortawesome/free-solid-svg-icons": "^6.2.1",
@ -114,4 +114,4 @@
"vite": "^3.0.8"
},
"gitHead": "115189f72a850bfb52b65ec61d932531bf327072"
}
}

View file

@ -509,21 +509,24 @@ const getSelectedRowsBindings = asset => {
return bindings
}
export const makeStateBinding = key => {
return {
type: "context",
runtimeBinding: `${makePropSafe("state")}.${makePropSafe(key)}`,
readableBinding: `State.${key}`,
category: "State",
icon: "AutomatedSegment",
display: { name: key },
}
}
/**
* Gets all state bindings that are globally available.
*/
const getStateBindings = () => {
let bindings = []
if (get(store).clientFeatures?.state) {
const safeState = makePropSafe("state")
bindings = getAllStateVariables().map(key => ({
type: "context",
runtimeBinding: `${safeState}.${makePropSafe(key)}`,
readableBinding: `State.${key}`,
category: "State",
icon: "AutomatedSegment",
display: { name: key },
}))
bindings = getAllStateVariables().map(makeStateBinding)
}
return bindings
}

View file

@ -11,7 +11,10 @@
} from "@budibase/bbui"
import { getAvailableActions } from "./index"
import { generate } from "shortid"
import { getEventContextBindings } from "builderStore/dataBinding"
import {
getEventContextBindings,
makeStateBinding,
} from "builderStore/dataBinding"
import { currentAsset, store } from "builderStore"
const flipDurationMs = 150
@ -52,7 +55,7 @@
actions,
selectedAction?.id
)
$: allBindings = eventContexBindings.concat(bindings)
$: allBindings = getAllBindings(bindings, eventContexBindings, actions)
$: {
// Ensure each action has a unique ID
if (actions) {
@ -111,6 +114,33 @@
function handleDndFinalize(e) {
actions = e.detail.items
}
const getAllBindings = (bindings, eventContextBindings, actions) => {
let allBindings = eventContextBindings.concat(bindings)
// Ensure bindings are generated for all "update state" action keys
actions
.filter(action => {
// Find all "Update State" actions which set values
return (
action[EVENT_TYPE_KEY] === "Update State" &&
action.parameters?.type === "set" &&
action.parameters.key
)
})
.forEach(action => {
// Check we have a binding for this action, and generate one if not
const stateBinding = makeStateBinding(action.parameters.key)
const hasKey = allBindings.some(binding => {
return binding.runtimeBinding === stateBinding.runtimeBinding
})
if (!hasKey) {
allBindings.push(stateBinding)
}
})
return allBindings
}
</script>
<DrawerContent>
@ -186,7 +216,7 @@
<div class="selected-action-container">
<svelte:component
this={selectedActionComponent}
parameters={selectedAction.parameters}
bind:parameters={selectedAction.parameters}
bindings={allBindings}
{nested}
/>

View file

@ -1,6 +1,6 @@
{
"name": "@budibase/cli",
"version": "2.2.12-alpha.58",
"version": "2.2.12-alpha.61",
"description": "Budibase CLI, for developers, self hosting and migrations.",
"main": "src/index.js",
"bin": {
@ -26,9 +26,9 @@
"outputPath": "build"
},
"dependencies": {
"@budibase/backend-core": "2.2.12-alpha.58",
"@budibase/string-templates": "2.2.12-alpha.58",
"@budibase/types": "2.2.12-alpha.58",
"@budibase/backend-core": "2.2.12-alpha.61",
"@budibase/string-templates": "2.2.12-alpha.61",
"@budibase/types": "2.2.12-alpha.61",
"axios": "0.21.2",
"chalk": "4.1.0",
"cli-progress": "3.11.2",

View file

@ -1,6 +1,6 @@
{
"name": "@budibase/client",
"version": "2.2.12-alpha.58",
"version": "2.2.12-alpha.61",
"license": "MPL-2.0",
"module": "dist/budibase-client.js",
"main": "dist/budibase-client.js",
@ -19,9 +19,9 @@
"dev:builder": "rollup -cw"
},
"dependencies": {
"@budibase/bbui": "2.2.12-alpha.58",
"@budibase/frontend-core": "2.2.12-alpha.58",
"@budibase/string-templates": "2.2.12-alpha.58",
"@budibase/bbui": "2.2.12-alpha.61",
"@budibase/frontend-core": "2.2.12-alpha.61",
"@budibase/string-templates": "2.2.12-alpha.61",
"@spectrum-css/button": "^3.0.3",
"@spectrum-css/card": "^3.0.3",
"@spectrum-css/divider": "^1.0.3",

View file

@ -1,12 +1,12 @@
{
"name": "@budibase/frontend-core",
"version": "2.2.12-alpha.58",
"version": "2.2.12-alpha.61",
"description": "Budibase frontend core libraries used in builder and client",
"author": "Budibase",
"license": "MPL-2.0",
"svelte": "src/index.js",
"dependencies": {
"@budibase/bbui": "2.2.12-alpha.58",
"@budibase/bbui": "2.2.12-alpha.61",
"lodash": "^4.17.21",
"svelte": "^3.46.2"
}

View file

@ -1,6 +1,6 @@
{
"name": "@budibase/sdk",
"version": "2.2.12-alpha.58",
"version": "2.2.12-alpha.61",
"description": "Budibase Public API SDK",
"author": "Budibase",
"license": "MPL-2.0",

View file

@ -1,7 +1,7 @@
{
"name": "@budibase/server",
"email": "hi@budibase.com",
"version": "2.2.12-alpha.58",
"version": "2.2.12-alpha.61",
"description": "Budibase Web Server",
"main": "src/index.ts",
"repository": {
@ -43,11 +43,11 @@
"license": "GPL-3.0",
"dependencies": {
"@apidevtools/swagger-parser": "10.0.3",
"@budibase/backend-core": "2.2.12-alpha.58",
"@budibase/client": "2.2.12-alpha.58",
"@budibase/pro": "2.2.12-alpha.58",
"@budibase/string-templates": "2.2.12-alpha.58",
"@budibase/types": "2.2.12-alpha.58",
"@budibase/backend-core": "2.2.12-alpha.61",
"@budibase/client": "2.2.12-alpha.61",
"@budibase/pro": "2.2.12-alpha.61",
"@budibase/string-templates": "2.2.12-alpha.61",
"@budibase/types": "2.2.12-alpha.61",
"@bull-board/api": "3.7.0",
"@bull-board/koa": "3.9.4",
"@elastic/elasticsearch": "7.10.0",

View file

@ -6,7 +6,6 @@ import {
QueryType,
} from "@budibase/types"
import { db as dbCore } from "@budibase/backend-core"
import { DatabaseWithConnection } from "@budibase/backend-core/src/db"
interface CouchDBConfig {
url: string

View file

@ -1273,13 +1273,13 @@
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
"@budibase/backend-core@2.2.12-alpha.58":
version "2.2.12-alpha.58"
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.2.12-alpha.58.tgz#911a6f8d4ea4e8abe9d8ce28d85e2f1c533581a5"
integrity sha512-6VhfYUu5T+BSLT3LlrGzBMm/BczJEbR4ST9MU37kfdO32FgVSyhWBC1mIm/TGcd+JkWA9n5JThL/6AlPaD56og==
"@budibase/backend-core@2.2.12-alpha.61":
version "2.2.12-alpha.61"
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.2.12-alpha.61.tgz#5453d8de94d8262eb39816f673bdb2d729434788"
integrity sha512-NOwZlA6jjQY5HjLujlhnWfJBWjUb7mryFD3d6tLyVuq+exf3ALZO59TE2hSsgSPTpaVTrNOSV4gwbYOev/Drsg==
dependencies:
"@budibase/nano" "10.1.1"
"@budibase/types" "2.2.12-alpha.58"
"@budibase/types" "2.2.12-alpha.61"
"@shopify/jest-koa-mocks" "5.0.1"
"@techpass/passport-openidconnect" "0.3.2"
aws-cloudfront-sign "2.2.0"
@ -1374,13 +1374,13 @@
qs "^6.11.0"
tough-cookie "^4.1.2"
"@budibase/pro@2.2.12-alpha.58":
version "2.2.12-alpha.58"
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.2.12-alpha.58.tgz#ad6e5f0a9ba6274baa59451756b8f4d683eb790e"
integrity sha512-vZe3rAnQE0rNHOZ1PYjqFOs96hVb29fiiQ1fcAoGIb0dgCr5tPSpBZ5wGxWiMv3cjTWyimTzX4ZPHhxfoUN0FQ==
"@budibase/pro@2.2.12-alpha.61":
version "2.2.12-alpha.61"
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.2.12-alpha.61.tgz#93ca762a0773950d959c9fff24325cfe93718eff"
integrity sha512-ttg6TEGTn+IX2+Uyv853wsNp9pXPZ1n9tNZC9un4jAH/edbxhCElBSNMH8gsHyqw9oOGJOkNNTzsd1IfOTckqw==
dependencies:
"@budibase/backend-core" "2.2.12-alpha.58"
"@budibase/types" "2.2.12-alpha.58"
"@budibase/backend-core" "2.2.12-alpha.61"
"@budibase/types" "2.2.12-alpha.61"
"@koa/router" "8.0.8"
bull "4.10.1"
joi "17.6.0"
@ -1406,10 +1406,10 @@
svelte-apexcharts "^1.0.2"
svelte-flatpickr "^3.1.0"
"@budibase/types@2.2.12-alpha.58":
version "2.2.12-alpha.58"
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.2.12-alpha.58.tgz#ec974297a9e8036565ad07a5d87b9c5480dd28f2"
integrity sha512-DTFBhPpaqzW2p1RJ0TOT0RFqTHrM5kkfEKQqrBYr3OYRlv0zPf+jnUZ2cyrgoJx1dceTOLIDB0JVpTmcqIfVtw==
"@budibase/types@2.2.12-alpha.61":
version "2.2.12-alpha.61"
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.2.12-alpha.61.tgz#b1f87134dccfb14a9222a1733bba6f7a5277e3f1"
integrity sha512-gbST+HYYMZ2R+eUnb1lHSoRfLI72XYxzimCaDfWVfBjYTsfQoUkkhMbse+zldUBIveLMGFETZ6MIs3k2puHqEQ==
"@bull-board/api@3.7.0":
version "3.7.0"

View file

@ -1,6 +1,6 @@
{
"name": "@budibase/string-templates",
"version": "2.2.12-alpha.58",
"version": "2.2.12-alpha.61",
"description": "Handlebars wrapper for Budibase templating.",
"main": "src/index.cjs",
"module": "dist/bundle.mjs",

View file

@ -1,6 +1,6 @@
{
"name": "@budibase/types",
"version": "2.2.12-alpha.58",
"version": "2.2.12-alpha.61",
"description": "Budibase types",
"main": "dist/index.js",
"types": "dist/index.d.ts",

View file

@ -1,7 +1,7 @@
{
"name": "@budibase/worker",
"email": "hi@budibase.com",
"version": "2.2.12-alpha.58",
"version": "2.2.12-alpha.61",
"description": "Budibase background service",
"main": "src/index.ts",
"repository": {
@ -36,10 +36,10 @@
"author": "Budibase",
"license": "GPL-3.0",
"dependencies": {
"@budibase/backend-core": "2.2.12-alpha.58",
"@budibase/pro": "2.2.12-alpha.58",
"@budibase/string-templates": "2.2.12-alpha.58",
"@budibase/types": "2.2.12-alpha.58",
"@budibase/backend-core": "2.2.12-alpha.61",
"@budibase/pro": "2.2.12-alpha.61",
"@budibase/string-templates": "2.2.12-alpha.61",
"@budibase/types": "2.2.12-alpha.61",
"@koa/router": "8.0.8",
"@sentry/node": "6.17.7",
"@techpass/passport-openidconnect": "0.3.2",

View file

@ -470,13 +470,13 @@
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
"@budibase/backend-core@2.2.12-alpha.58":
version "2.2.12-alpha.58"
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.2.12-alpha.58.tgz#911a6f8d4ea4e8abe9d8ce28d85e2f1c533581a5"
integrity sha512-6VhfYUu5T+BSLT3LlrGzBMm/BczJEbR4ST9MU37kfdO32FgVSyhWBC1mIm/TGcd+JkWA9n5JThL/6AlPaD56og==
"@budibase/backend-core@2.2.12-alpha.61":
version "2.2.12-alpha.61"
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.2.12-alpha.61.tgz#5453d8de94d8262eb39816f673bdb2d729434788"
integrity sha512-NOwZlA6jjQY5HjLujlhnWfJBWjUb7mryFD3d6tLyVuq+exf3ALZO59TE2hSsgSPTpaVTrNOSV4gwbYOev/Drsg==
dependencies:
"@budibase/nano" "10.1.1"
"@budibase/types" "2.2.12-alpha.58"
"@budibase/types" "2.2.12-alpha.61"
"@shopify/jest-koa-mocks" "5.0.1"
"@techpass/passport-openidconnect" "0.3.2"
aws-cloudfront-sign "2.2.0"
@ -521,13 +521,13 @@
qs "^6.11.0"
tough-cookie "^4.1.2"
"@budibase/pro@2.2.12-alpha.58":
version "2.2.12-alpha.58"
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.2.12-alpha.58.tgz#ad6e5f0a9ba6274baa59451756b8f4d683eb790e"
integrity sha512-vZe3rAnQE0rNHOZ1PYjqFOs96hVb29fiiQ1fcAoGIb0dgCr5tPSpBZ5wGxWiMv3cjTWyimTzX4ZPHhxfoUN0FQ==
"@budibase/pro@2.2.12-alpha.61":
version "2.2.12-alpha.61"
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.2.12-alpha.61.tgz#93ca762a0773950d959c9fff24325cfe93718eff"
integrity sha512-ttg6TEGTn+IX2+Uyv853wsNp9pXPZ1n9tNZC9un4jAH/edbxhCElBSNMH8gsHyqw9oOGJOkNNTzsd1IfOTckqw==
dependencies:
"@budibase/backend-core" "2.2.12-alpha.58"
"@budibase/types" "2.2.12-alpha.58"
"@budibase/backend-core" "2.2.12-alpha.61"
"@budibase/types" "2.2.12-alpha.61"
"@koa/router" "8.0.8"
bull "4.10.1"
joi "17.6.0"
@ -535,10 +535,10 @@
lru-cache "^7.14.1"
node-fetch "^2.6.1"
"@budibase/types@2.2.12-alpha.58":
version "2.2.12-alpha.58"
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.2.12-alpha.58.tgz#ec974297a9e8036565ad07a5d87b9c5480dd28f2"
integrity sha512-DTFBhPpaqzW2p1RJ0TOT0RFqTHrM5kkfEKQqrBYr3OYRlv0zPf+jnUZ2cyrgoJx1dceTOLIDB0JVpTmcqIfVtw==
"@budibase/types@2.2.12-alpha.61":
version "2.2.12-alpha.61"
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.2.12-alpha.61.tgz#b1f87134dccfb14a9222a1733bba6f7a5277e3f1"
integrity sha512-gbST+HYYMZ2R+eUnb1lHSoRfLI72XYxzimCaDfWVfBjYTsfQoUkkhMbse+zldUBIveLMGFETZ6MIs3k2puHqEQ==
"@cspotcode/source-map-support@^0.8.0":
version "0.8.1"