Merge remote-tracking branch 'origin/master' into fix/multipicker-default-behaviour

This commit is contained in:
Dean 2022-10-26 09:10:21 +01:00
commit c17cfc2666
21 changed files with 146 additions and 85 deletions

View File

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

View File

@ -1,6 +1,6 @@
{
"name": "@budibase/backend-core",
"version": "2.0.34",
"version": "2.0.38",
"description": "Budibase backend core libraries used in server and worker",
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
@ -20,7 +20,7 @@
"test:watch": "jest --watchAll"
},
"dependencies": {
"@budibase/types": "^2.0.34",
"@budibase/types": "^2.0.38",
"@shopify/jest-koa-mocks": "5.0.1",
"@techpass/passport-openidconnect": "0.3.2",
"aws-sdk": "2.1030.0",

View File

@ -1,7 +1,7 @@
{
"name": "@budibase/bbui",
"description": "A UI solution used in the different Budibase projects.",
"version": "2.0.34",
"version": "2.0.38",
"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.0.34",
"@budibase/string-templates": "^2.0.38",
"@spectrum-css/actionbutton": "^1.0.1",
"@spectrum-css/actiongroup": "^1.0.1",
"@spectrum-css/avatar": "^3.0.2",

View File

@ -132,7 +132,7 @@
{#if open}
<div
use:clickOutside={() => (open = false)}
transition:fly={{ y: -20, duration: 200 }}
transition:fly|local={{ y: -20, duration: 200 }}
class="spectrum-Popover spectrum-Popover--bottom spectrum-Picker-popover is-open"
class:spectrum-Popover--align-right={alignRight}
>

View File

@ -1,6 +1,6 @@
{
"name": "@budibase/builder",
"version": "2.0.34",
"version": "2.0.38",
"license": "GPL-3.0",
"private": true,
"scripts": {
@ -71,10 +71,10 @@
}
},
"dependencies": {
"@budibase/bbui": "^2.0.34",
"@budibase/client": "^2.0.34",
"@budibase/frontend-core": "^2.0.34",
"@budibase/string-templates": "^2.0.34",
"@budibase/bbui": "^2.0.38",
"@budibase/client": "^2.0.38",
"@budibase/frontend-core": "^2.0.38",
"@budibase/string-templates": "^2.0.38",
"@sentry/browser": "5.19.1",
"@spectrum-css/page": "^3.0.1",
"@spectrum-css/vars": "^3.0.1",

View File

@ -7,7 +7,7 @@
export let webhookModal
</script>
<div class="title">
<div class="nav">
<Tabs selected="Automations">
<Tab title="Automations">
<AutomationList />
@ -27,12 +27,15 @@
top: var(--spacing-l);
right: var(--spacing-xl);
}
.title {
.nav {
overflow-y: auto;
background: var(--background);
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: stretch;
position: relative;
border-right: var(--border-light);
padding-bottom: 60px;
}
</style>

View File

@ -120,7 +120,7 @@
allSteps[idx]?.stepId === ActionStepID.LOOP &&
allSteps.find(x => x.blockToLoop === block.id)
// If the previous block was a loop block, decerement the index so the following
// If the previous block was a loop block, decrement the index so the following
// steps are in the correct order
if (wasLoopBlock) {
loopBlockCount++

View File

@ -14,6 +14,12 @@
export let block
export let isTestModal
$: parsedBindings = bindings.map(binding => {
let clone = Object.assign({}, binding)
clone.icon = "ShareAndroid"
return clone
})
let table
let schemaFields
@ -79,6 +85,10 @@
return [value]
}
if (type === "json") {
return value.value
}
return value
}
@ -109,7 +119,7 @@
{isTestModal}
{field}
{schema}
{bindings}
bindings={parsedBindings}
{value}
{onChange}
/>
@ -124,7 +134,7 @@
on:change={e => onChange(e, field, schema.type)}
label={field}
type="string"
{bindings}
bindings={parsedBindings}
fillWidth={true}
allowJS={true}
updateOnChange={false}

View File

@ -5,11 +5,13 @@
DatePicker,
Multiselect,
TextArea,
Label,
} from "@budibase/bbui"
import LinkedRowSelector from "components/common/LinkedRowSelector.svelte"
import DrawerBindableInput from "../../common/bindings/DrawerBindableInput.svelte"
import ModalBindableInput from "../../common/bindings/ModalBindableInput.svelte"
import AutomationBindingPanel from "../../common/bindings/ServerBindingPanel.svelte"
import Editor from "components/integration/QueryEditor.svelte"
export let onChange
export let field
@ -18,6 +20,12 @@
export let bindings
export let isTestModal
$: parsedBindings = bindings.map(binding => {
let clone = Object.assign({}, binding)
clone.icon = "ShareAndroid"
return clone
})
function schemaHasOptions(schema) {
return !!schema.constraints?.inclusion?.length
}
@ -50,6 +58,20 @@
/>
{:else if schema.type === "longform"}
<TextArea label={field} bind:value={value[field]} />
{:else if schema.type === "json"}
<span>
<Label>{field}</Label>
<Editor
editorHeight="150"
mode="json"
on:change={e => {
if (e.detail?.value !== value[field]) {
onChange(e, field, schema.type)
}
}}
value={value[field]}
/>
</span>
{:else if schema.type === "link"}
<LinkedRowSelector bind:linkedRows={value[field]} {schema} />
{:else if schema.type === "string" || schema.type === "number"}
@ -60,7 +82,7 @@
on:change={e => onChange(e, field)}
label={field}
type="string"
{bindings}
bindings={parsedBindings}
fillWidth={true}
allowJS={true}
updateOnChange={false}

View File

@ -1,6 +1,6 @@
{
"name": "@budibase/cli",
"version": "2.0.34",
"version": "2.0.38",
"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.0.34",
"@budibase/string-templates": "^2.0.34",
"@budibase/types": "^2.0.34",
"@budibase/backend-core": "^2.0.38",
"@budibase/string-templates": "^2.0.38",
"@budibase/types": "^2.0.38",
"axios": "0.21.2",
"chalk": "4.1.0",
"cli-progress": "3.11.2",

View File

@ -1,6 +1,6 @@
{
"name": "@budibase/client",
"version": "2.0.34",
"version": "2.0.38",
"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.0.34",
"@budibase/frontend-core": "^2.0.34",
"@budibase/string-templates": "^2.0.34",
"@budibase/bbui": "^2.0.38",
"@budibase/frontend-core": "^2.0.38",
"@budibase/string-templates": "^2.0.38",
"@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.0.34",
"version": "2.0.38",
"description": "Budibase frontend core libraries used in builder and client",
"author": "Budibase",
"license": "MPL-2.0",
"svelte": "src/index.js",
"dependencies": {
"@budibase/bbui": "^2.0.34",
"@budibase/bbui": "^2.0.38",
"lodash": "^4.17.21",
"svelte": "^3.46.2"
}

View File

@ -1,6 +1,6 @@
{
"name": "@budibase/sdk",
"version": "2.0.34",
"version": "2.0.38",
"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.0.34",
"version": "2.0.38",
"description": "Budibase Web Server",
"main": "src/index.ts",
"repository": {
@ -77,11 +77,11 @@
"license": "GPL-3.0",
"dependencies": {
"@apidevtools/swagger-parser": "10.0.3",
"@budibase/backend-core": "^2.0.34",
"@budibase/client": "^2.0.34",
"@budibase/pro": "2.0.34",
"@budibase/string-templates": "^2.0.34",
"@budibase/types": "^2.0.34",
"@budibase/backend-core": "^2.0.38",
"@budibase/client": "^2.0.38",
"@budibase/pro": "2.0.38",
"@budibase/string-templates": "^2.0.38",
"@budibase/types": "^2.0.38",
"@bull-board/api": "3.7.0",
"@bull-board/koa": "3.9.4",
"@elastic/elasticsearch": "7.10.0",

View File

@ -1,6 +1,5 @@
const { getTable } = require("../api/controllers/table/utils")
const {
findHBSBlocks,
decodeJSBinding,
isJSBinding,
encodeJSBinding,
@ -82,24 +81,34 @@ exports.getError = err => {
}
exports.substituteLoopStep = (hbsString, substitute) => {
let blocks = []
let checkForJS = isJSBinding(hbsString)
let substitutedHbsString = ""
let open = checkForJS ? `$("` : "{{"
let closed = checkForJS ? `")` : "}}"
if (checkForJS) {
hbsString = decodeJSBinding(hbsString)
blocks.push(hbsString)
} else {
blocks = findHBSBlocks(hbsString)
}
for (let block of blocks) {
block = block.replace(/loop/, substitute)
if (checkForJS) {
hbsString = encodeJSBinding(block)
} else {
hbsString = block
let pointer = 0,
openPointer = 0,
closedPointer = 0
while (pointer < hbsString.length) {
openPointer = hbsString.indexOf(open, pointer)
closedPointer = hbsString.indexOf(closed, pointer) + 2
if (openPointer < 0 || closedPointer < 0) {
substitutedHbsString += hbsString.substring(pointer)
break
}
let before = hbsString.substring(pointer, openPointer)
let block = hbsString
.substring(openPointer, closedPointer)
.replace(/loop/, substitute)
substitutedHbsString += before + block
pointer = closedPointer
}
return hbsString
if (checkForJS) {
substitutedHbsString = encodeJSBinding(substitutedHbsString)
}
return substitutedHbsString
}
exports.stringSplit = value => {

View File

@ -0,0 +1,17 @@
const automationUtils = require("../automationUtils")
describe("automationUtils", () => {
test("substituteLoopStep should allow multiple loop binding substitutes", () => {
expect(automationUtils.substituteLoopStep(
`{{ loop.currentItem._id }} {{ loop.currentItem._id }} {{ loop.currentItem._id }}`,
"step.2"))
.toBe(`{{ step.2.currentItem._id }} {{ step.2.currentItem._id }} {{ step.2.currentItem._id }}`)
})
test("substituteLoopStep should handle not subsituting outside of curly braces", () => {
expect(automationUtils.substituteLoopStep(
`loop {{ loop.currentItem._id }}loop loop{{ loop.currentItem._id }}loop`,
"step.2"))
.toBe(`loop {{ step.2.currentItem._id }}loop loop{{ step.2.currentItem._id }}loop`)
})
})

View File

@ -1094,12 +1094,12 @@
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
"@budibase/backend-core@2.0.34":
version "2.0.34"
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.0.34.tgz#67d140a55a3a1bc807bb60bf06062e1361588977"
integrity sha512-ofJZNOTA8oO5FxhwBPEuZ6Rq7lO47QkHVreEvESgAb4aJLpCoLNmWhizKN2iRgZ0+avgoauAd36Yj+qI1mVjkQ==
"@budibase/backend-core@2.0.38":
version "2.0.38"
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.0.38.tgz#d02a58b777e7598e1377cfe42f092d08cd905374"
integrity sha512-hD+5hwlTN6AdgAzHE9oJLT8cqMFcxcjGacFZSJXJ8SIJAJJL1B25ouhY6PLbbo4XJpD2FV/xpIQxWrAGl8tN/A==
dependencies:
"@budibase/types" "^2.0.34"
"@budibase/types" "^2.0.38"
"@shopify/jest-koa-mocks" "5.0.1"
"@techpass/passport-openidconnect" "0.3.2"
aws-sdk "2.1030.0"
@ -1180,13 +1180,13 @@
svelte-flatpickr "^3.2.3"
svelte-portal "^1.0.0"
"@budibase/pro@2.0.34":
version "2.0.34"
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.0.34.tgz#8b8e51bd847eb415f259d71b26c6f89ed2166a49"
integrity sha512-lJQAOw9SBDkLwLsglriGNIuOHMPNrKzLCRCCpETGNuhnRi/kvILck1lk3oyhz3dxllyBb8iDOMleEUBxSAum1Q==
"@budibase/pro@2.0.38":
version "2.0.38"
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.0.38.tgz#c307b0d49fb8a2d94e7ccb89445862645c5bc6b7"
integrity sha512-bR5HzQNcsrf7iYOERm/5XcK2RrEWcx7aR1vFCV+tDLHRq+h1VMo/YVaPCpcrnsgl+cQoccpHacv0fHO/VbIlJw==
dependencies:
"@budibase/backend-core" "2.0.34"
"@budibase/types" "2.0.34"
"@budibase/backend-core" "2.0.38"
"@budibase/types" "2.0.38"
"@koa/router" "8.0.8"
joi "17.6.0"
node-fetch "^2.6.1"
@ -1209,10 +1209,10 @@
svelte-apexcharts "^1.0.2"
svelte-flatpickr "^3.1.0"
"@budibase/types@2.0.34", "@budibase/types@^2.0.34":
version "2.0.34"
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.0.34.tgz#1a7c483a1577596cc896d5d03f04ebafe037b664"
integrity sha512-pt8/gCRuErKfSv3sVu75bHSjgpPv/bAaMb+Vam1xyp0gY7YUR1yBhllWY0tEIVXroCe0kgn40+fKZOR2Yli0ag==
"@budibase/types@2.0.38", "@budibase/types@^2.0.38":
version "2.0.38"
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.0.38.tgz#eb280a77333a0c4ae064e239534f5dd7a4adf7aa"
integrity sha512-xuFj7gi6v3MxTQSVpQJm5lXXu103yX2fvAipZXisUKSsqlSpr5FFf4+LZ95bcgo8KP8J8GNhpSk+M5sbyR6qMA==
"@bull-board/api@3.7.0":
version "3.7.0"

View File

@ -1,6 +1,6 @@
{
"name": "@budibase/string-templates",
"version": "2.0.34",
"version": "2.0.38",
"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.0.34",
"version": "2.0.38",
"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.0.34",
"version": "2.0.38",
"description": "Budibase background service",
"main": "src/index.ts",
"repository": {
@ -36,10 +36,10 @@
"author": "Budibase",
"license": "GPL-3.0",
"dependencies": {
"@budibase/backend-core": "^2.0.34",
"@budibase/pro": "2.0.34",
"@budibase/string-templates": "^2.0.34",
"@budibase/types": "^2.0.34",
"@budibase/backend-core": "^2.0.38",
"@budibase/pro": "2.0.38",
"@budibase/string-templates": "^2.0.38",
"@budibase/types": "^2.0.38",
"@koa/router": "8.0.8",
"@sentry/node": "6.17.7",
"@techpass/passport-openidconnect": "0.3.2",

View File

@ -291,12 +291,12 @@
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
"@budibase/backend-core@2.0.34":
version "2.0.34"
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.0.34.tgz#67d140a55a3a1bc807bb60bf06062e1361588977"
integrity sha512-ofJZNOTA8oO5FxhwBPEuZ6Rq7lO47QkHVreEvESgAb4aJLpCoLNmWhizKN2iRgZ0+avgoauAd36Yj+qI1mVjkQ==
"@budibase/backend-core@2.0.38":
version "2.0.38"
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.0.38.tgz#d02a58b777e7598e1377cfe42f092d08cd905374"
integrity sha512-hD+5hwlTN6AdgAzHE9oJLT8cqMFcxcjGacFZSJXJ8SIJAJJL1B25ouhY6PLbbo4XJpD2FV/xpIQxWrAGl8tN/A==
dependencies:
"@budibase/types" "^2.0.34"
"@budibase/types" "^2.0.38"
"@shopify/jest-koa-mocks" "5.0.1"
"@techpass/passport-openidconnect" "0.3.2"
aws-sdk "2.1030.0"
@ -327,21 +327,21 @@
uuid "8.3.2"
zlib "1.0.5"
"@budibase/pro@2.0.34":
version "2.0.34"
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.0.34.tgz#8b8e51bd847eb415f259d71b26c6f89ed2166a49"
integrity sha512-lJQAOw9SBDkLwLsglriGNIuOHMPNrKzLCRCCpETGNuhnRi/kvILck1lk3oyhz3dxllyBb8iDOMleEUBxSAum1Q==
"@budibase/pro@2.0.38":
version "2.0.38"
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.0.38.tgz#c307b0d49fb8a2d94e7ccb89445862645c5bc6b7"
integrity sha512-bR5HzQNcsrf7iYOERm/5XcK2RrEWcx7aR1vFCV+tDLHRq+h1VMo/YVaPCpcrnsgl+cQoccpHacv0fHO/VbIlJw==
dependencies:
"@budibase/backend-core" "2.0.34"
"@budibase/types" "2.0.34"
"@budibase/backend-core" "2.0.38"
"@budibase/types" "2.0.38"
"@koa/router" "8.0.8"
joi "17.6.0"
node-fetch "^2.6.1"
"@budibase/types@2.0.34", "@budibase/types@^2.0.34":
version "2.0.34"
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.0.34.tgz#1a7c483a1577596cc896d5d03f04ebafe037b664"
integrity sha512-pt8/gCRuErKfSv3sVu75bHSjgpPv/bAaMb+Vam1xyp0gY7YUR1yBhllWY0tEIVXroCe0kgn40+fKZOR2Yli0ag==
"@budibase/types@2.0.38", "@budibase/types@^2.0.38":
version "2.0.38"
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.0.38.tgz#eb280a77333a0c4ae064e239534f5dd7a4adf7aa"
integrity sha512-xuFj7gi6v3MxTQSVpQJm5lXXu103yX2fvAipZXisUKSsqlSpr5FFf4+LZ95bcgo8KP8J8GNhpSk+M5sbyR6qMA==
"@cspotcode/source-map-consumer@0.8.0":
version "0.8.0"