merge with master

This commit is contained in:
Martin McKeaveney 2021-12-08 17:20:14 +00:00
commit 40878b02a7
15 changed files with 84 additions and 63 deletions

View File

@ -1,5 +1,5 @@
{
"version": "1.0.8-alpha.0",
"version": "1.0.8",
"npmClient": "yarn",
"packages": [
"packages/*"

View File

@ -1,6 +1,6 @@
{
"name": "@budibase/auth",
"version": "1.0.8-alpha.0",
"version": "1.0.8",
"description": "Authentication middlewares for budibase builder and apps",
"main": "src/index.js",
"author": "Budibase",

View File

@ -1,7 +1,7 @@
{
"name": "@budibase/bbui",
"description": "A UI solution used in the different Budibase projects.",
"version": "1.0.8-alpha.0",
"version": "1.0.8",
"license": "MPL-2.0",
"svelte": "src/index.js",
"module": "dist/bbui.es.js",

View File

@ -63,9 +63,9 @@
const getFilteredOptions = (options, term, getLabel) => {
if (autocomplete && term) {
const lowerCaseTerm = term.toLowerCase()
return options.filter(option =>
getLabel(option)?.toLowerCase().includes(lowerCaseTerm)
)
return options.filter(option => {
return `${getLabel(option)}`.toLowerCase().includes(lowerCaseTerm)
})
}
return options
}

View File

@ -1,6 +1,6 @@
{
"name": "@budibase/builder",
"version": "1.0.8-alpha.0",
"version": "1.0.8",
"license": "GPL-3.0",
"private": true,
"scripts": {
@ -65,10 +65,10 @@
}
},
"dependencies": {
"@budibase/bbui": "^1.0.8-alpha.0",
"@budibase/client": "^1.0.8-alpha.0",
"@budibase/bbui": "^1.0.8",
"@budibase/client": "^1.0.8",
"@budibase/colorpicker": "1.1.2",
"@budibase/string-templates": "^1.0.8-alpha.0",
"@budibase/string-templates": "^1.0.8",
"@sentry/browser": "5.19.1",
"@spectrum-css/page": "^3.0.1",
"@spectrum-css/vars": "^3.0.1",

View File

@ -96,13 +96,16 @@
allSteps[idx].schema?.outputs?.properties ?? {}
)
bindings = bindings.concat(
outputs.map(([name, value]) => ({
label: name,
type: value.type,
description: value.description,
category: idx === 0 ? "Trigger outputs" : `Step ${idx} outputs`,
path: idx === 0 ? `trigger.${name}` : `steps.${idx}.${name}`,
}))
outputs.map(([name, value]) => {
const runtime = idx === 0 ? `trigger.${name}` : `steps.${idx}.${name}`
return {
label: runtime,
type: value.type,
description: value.description,
category: idx === 0 ? "Trigger outputs" : `Step ${idx} outputs`,
path: runtime,
}
})
)
}
return bindings
@ -261,7 +264,6 @@
value={inputData[key]}
on:change={e => onChange(e, key)}
{bindings}
allowJS={false}
/>
</div>
{/if}

View File

@ -17,7 +17,6 @@
queries as queriesStore,
} from "stores/backend"
import { datasources, integrations } from "stores/backend"
import { notifications } from "@budibase/bbui"
import ParameterBuilder from "components/integration/QueryParameterBuilder.svelte"
import IntegrationQueryEditor from "components/integration/index.svelte"
import { makePropSafe as safe } from "@budibase/string-templates"
@ -31,6 +30,7 @@
const arrayTypes = ["attachment", "array"]
let anchorRight, dropdownRight
let drawer
let tmpQueryParams
$: text = value?.label ?? "Choose an option"
$: tables = $tablesStore.list.map(m => ({
@ -105,12 +105,12 @@
}
})
function handleSelected(selected) {
const handleSelected = selected => {
dispatch("change", selected)
dropdownRight.hide()
}
function fetchQueryDefinition(query) {
const fetchQueryDefinition = query => {
const source = $datasources.list.find(
ds => ds._id === query.datasourceId
).source
@ -124,6 +124,19 @@
const getQueryDatasource = query => {
return $datasources.list.find(ds => ds._id === query?.datasourceId)
}
const openQueryParamsDrawer = () => {
tmpQueryParams = value.queryParams
drawer.show()
}
const saveQueryParams = () => {
handleSelected({
...value,
queryParams: tmpQueryParams,
})
drawer.hide()
}
</script>
<div class="container" bind:this={anchorRight}>
@ -134,24 +147,14 @@
on:click={dropdownRight.show}
/>
{#if value?.type === "query"}
<i class="ri-settings-5-line" on:click={drawer.show} />
<i class="ri-settings-5-line" on:click={openQueryParamsDrawer} />
<Drawer title={"Query Parameters"} bind:this={drawer}>
<Button
slot="buttons"
cta
on:click={() => {
notifications.success("Query parameters saved.")
handleSelected(value)
drawer.hide()
}}
>
Save
</Button>
<Button slot="buttons" cta on:click={saveQueryParams}>Save</Button>
<DrawerContent slot="body">
<Layout noPadding>
{#if getQueryParams(value).length > 0}
<ParameterBuilder
bind:customParams={value.queryParams}
bind:customParams={tmpQueryParams}
parameters={getQueryParams(value)}
{bindings}
/>

View File

@ -6,7 +6,7 @@
export let value = []
let drawer
let links = cloneDeep(value)
let links = cloneDeep(value || [])
const dispatch = createEventDispatcher()
const save = () => {

View File

@ -1,6 +1,6 @@
{
"name": "@budibase/cli",
"version": "1.0.8-alpha.0",
"version": "1.0.8",
"description": "Budibase CLI, for developers, self hosting and migrations.",
"main": "src/index.js",
"bin": {

View File

@ -393,13 +393,13 @@
{
"label": "Column",
"value": "column",
"barIcon": "ViewRow",
"barIcon": "ViewColumn",
"barTitle": "Column layout"
},
{
"label": "Row",
"value": "row",
"barIcon": "ViewColumn",
"barIcon": "ViewRow",
"barTitle": "Row layout"
}
],

View File

@ -1,6 +1,6 @@
{
"name": "@budibase/client",
"version": "1.0.8-alpha.0",
"version": "1.0.8",
"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": "^1.0.8-alpha.0",
"@budibase/bbui": "^1.0.8",
"@budibase/standard-components": "^0.9.139",
"@budibase/string-templates": "^1.0.8-alpha.0",
"@budibase/string-templates": "^1.0.8",
"regexparam": "^1.3.0",
"shortid": "^2.2.15",
"svelte-spa-router": "^3.0.5"

View File

@ -21,11 +21,25 @@
$: target = openInNewTab ? "_blank" : "_self"
$: placeholder = $builderStore.inBuilder && !text
$: componentText = getComponentText(text, $builderStore, $component)
$: sanitizedUrl = getSanitizedUrl(url, externalLink, openInNewTab)
// Add color styles to main styles object, otherwise the styleable helper
// overrides the color when it's passed as inline style.
$: styles = enrichStyles($component.styles, color)
const getSanitizedUrl = (url, externalLink, newTab) => {
if (!url) {
return externalLink || newTab ? "#/" : "/"
}
if (externalLink) {
return url
}
if (openInNewTab) {
return `#${url}`
}
return url
}
const getComponentText = (text, builderState, componentState) => {
if (!builderState.inBuilder || componentState.editing) {
return text || ""
@ -65,10 +79,10 @@
{componentText}
</div>
{:else if $builderStore.inBuilder || componentText}
{#if externalLink}
{#if externalLink || openInNewTab}
<a
{target}
href={url || "/"}
href={sanitizedUrl}
use:styleable={styles}
class:placeholder
class:bold
@ -79,18 +93,20 @@
{componentText}
</a>
{:else}
<a
use:linkable
href={url || "/"}
use:styleable={styles}
class:placeholder
class:bold
class:italic
class:underline
class="align--{align || 'left'} size--{size || 'M'}"
>
{componentText}
</a>
{#key sanitizedUrl}
<a
use:linkable
href={sanitizedUrl}
use:styleable={styles}
class:placeholder
class:bold
class:italic
class:underline
class="align--{align || 'left'} size--{size || 'M'}"
>
{componentText}
</a>
{/key}
{/if}
{/if}

View File

@ -1,7 +1,7 @@
{
"name": "@budibase/server",
"email": "hi@budibase.com",
"version": "1.0.8-alpha.0",
"version": "1.0.8",
"description": "Budibase Web Server",
"main": "src/index.ts",
"repository": {
@ -69,9 +69,9 @@
"author": "Budibase",
"license": "GPL-3.0",
"dependencies": {
"@budibase/auth": "^1.0.8-alpha.0",
"@budibase/client": "^1.0.8-alpha.0",
"@budibase/string-templates": "^1.0.8-alpha.0",
"@budibase/auth": "^1.0.8",
"@budibase/client": "^1.0.8",
"@budibase/string-templates": "^1.0.8",
"@bull-board/api": "^3.7.0",
"@bull-board/koa": "^3.7.0",
"@elastic/elasticsearch": "7.10.0",

View File

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

View File

@ -1,7 +1,7 @@
{
"name": "@budibase/worker",
"email": "hi@budibase.com",
"version": "1.0.8-alpha.0",
"version": "1.0.8",
"description": "Budibase background service",
"main": "src/index.js",
"repository": {
@ -29,8 +29,8 @@
"author": "Budibase",
"license": "GPL-3.0",
"dependencies": {
"@budibase/auth": "^1.0.8-alpha.0",
"@budibase/string-templates": "^1.0.8-alpha.0",
"@budibase/auth": "^1.0.8",
"@budibase/string-templates": "^1.0.8",
"@koa/router": "^8.0.0",
"@sentry/node": "^6.0.0",
"@techpass/passport-openidconnect": "^0.3.0",