Merge branch 'develop' of github.com:Budibase/budibase into fix/7865
This commit is contained in:
commit
bf0a788fa1
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"version": "2.1.43-alpha.10",
|
||||
"version": "2.1.43-alpha.12",
|
||||
"npmClient": "yarn",
|
||||
"packages": [
|
||||
"packages/*"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@budibase/backend-core",
|
||||
"version": "2.1.43-alpha.10",
|
||||
"version": "2.1.43-alpha.12",
|
||||
"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.1.43-alpha.10",
|
||||
"@budibase/types": "2.1.43-alpha.12",
|
||||
"@shopify/jest-koa-mocks": "5.0.1",
|
||||
"@techpass/passport-openidconnect": "0.3.2",
|
||||
"aws-sdk": "2.1030.0",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@budibase/bbui",
|
||||
"description": "A UI solution used in the different Budibase projects.",
|
||||
"version": "2.1.43-alpha.10",
|
||||
"version": "2.1.43-alpha.12",
|
||||
"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.1.43-alpha.10",
|
||||
"@budibase/string-templates": "2.1.43-alpha.12",
|
||||
"@spectrum-css/actionbutton": "^1.0.1",
|
||||
"@spectrum-css/actiongroup": "^1.0.1",
|
||||
"@spectrum-css/avatar": "^3.0.2",
|
||||
|
|
|
@ -205,7 +205,10 @@
|
|||
width: 100%;
|
||||
}
|
||||
.spectrum-Popover.auto-width :global(.spectrum-Menu-itemLabel) {
|
||||
max-width: 400px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.spectrum-Picker {
|
||||
width: 100%;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@budibase/builder",
|
||||
"version": "2.1.43-alpha.10",
|
||||
"version": "2.1.43-alpha.12",
|
||||
"license": "GPL-3.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
@ -71,10 +71,10 @@
|
|||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@budibase/bbui": "2.1.43-alpha.10",
|
||||
"@budibase/client": "2.1.43-alpha.10",
|
||||
"@budibase/frontend-core": "2.1.43-alpha.10",
|
||||
"@budibase/string-templates": "2.1.43-alpha.10",
|
||||
"@budibase/bbui": "2.1.43-alpha.12",
|
||||
"@budibase/client": "2.1.43-alpha.12",
|
||||
"@budibase/frontend-core": "2.1.43-alpha.12",
|
||||
"@budibase/string-templates": "2.1.43-alpha.12",
|
||||
"@sentry/browser": "5.19.1",
|
||||
"@spectrum-css/page": "^3.0.1",
|
||||
"@spectrum-css/vars": "^3.0.1",
|
||||
|
|
|
@ -481,6 +481,7 @@ const getSelectedRowsBindings = asset => {
|
|||
block._id + "-table"
|
||||
)}.${makePropSafe("selectedRows")}`,
|
||||
readableBinding: `${block._instanceName}.Selected rows`,
|
||||
category: "Selected rows",
|
||||
}))
|
||||
)
|
||||
}
|
||||
|
@ -1004,7 +1005,10 @@ const bindingReplacement = (
|
|||
* {{ literal [componentId] }}
|
||||
*/
|
||||
const extractLiteralHandlebarsID = value => {
|
||||
return value?.match(/{{\s*literal\s*\[+([^\]]+)].*}}/)?.[1]
|
||||
if (!value || typeof value !== "string") {
|
||||
return null
|
||||
}
|
||||
return value.match(/{{\s*literal\s*\[+([^\]]+)].*}}/)?.[1]
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1049,8 +1049,8 @@ export const getFrontendStore = () => {
|
|||
const updatedSetting = settings.find(setting => setting.key === name)
|
||||
|
||||
if (
|
||||
updatedSetting.type === "dataSource" ||
|
||||
updatedSetting.type === "table"
|
||||
updatedSetting?.type === "dataSource" ||
|
||||
updatedSetting?.type === "table"
|
||||
) {
|
||||
const { schema } = getSchemaForDatasource(null, value)
|
||||
const columnNames = Object.keys(schema || {})
|
||||
|
|
|
@ -38,13 +38,15 @@
|
|||
export let testData
|
||||
export let schemaProperties
|
||||
export let isTestModal = false
|
||||
|
||||
let webhookModal
|
||||
let drawer
|
||||
let tempFilters = lookForFilters(schemaProperties) || []
|
||||
let fillWidth = true
|
||||
let codeBindingOpen = false
|
||||
let inputData
|
||||
|
||||
$: filters = lookForFilters(schemaProperties) || []
|
||||
$: tempFilters = filters
|
||||
$: stepId = block.stepId
|
||||
$: bindings = getAvailableBindings(
|
||||
block || $automationStore.selectedBlock,
|
||||
|
@ -222,16 +224,17 @@
|
|||
{:else if value.customType === "filters"}
|
||||
<ActionButton on:click={drawer.show}>Define filters</ActionButton>
|
||||
<Drawer bind:this={drawer} {fillWidth} title="Filtering">
|
||||
<Button cta slot="buttons" on:click={() => saveFilters(key)}
|
||||
>Save</Button
|
||||
>
|
||||
<Button cta slot="buttons" on:click={() => saveFilters(key)}>
|
||||
Save
|
||||
</Button>
|
||||
<FilterDrawer
|
||||
slot="body"
|
||||
bind:filters={tempFilters}
|
||||
{filters}
|
||||
{bindings}
|
||||
{schemaFields}
|
||||
panel={AutomationBindingPanel}
|
||||
fillWidth
|
||||
on:change={e => (tempFilters = e.detail)}
|
||||
/>
|
||||
</Drawer>
|
||||
{:else if value.customType === "password"}
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
import { API } from "api"
|
||||
|
||||
let hideAutocolumns = true
|
||||
let filters
|
||||
|
||||
$: isUsersTable = $tables.selected?._id === TableNames.USERS
|
||||
$: type = $tables.selected?.type
|
||||
|
@ -36,6 +37,7 @@
|
|||
$: hasCols = checkHasCols(schema)
|
||||
$: hasRows = !!$fetch.rows?.length
|
||||
$: showError($fetch.error)
|
||||
$: id, (filters = null)
|
||||
|
||||
const showError = error => {
|
||||
if (error) {
|
||||
|
@ -102,8 +104,9 @@
|
|||
|
||||
// Fetch data whenever filters change
|
||||
const onFilter = e => {
|
||||
filters = e.detail
|
||||
fetch.update({
|
||||
filter: e.detail,
|
||||
filter: filters,
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -178,6 +181,7 @@
|
|||
{#key id}
|
||||
<TableFilterButton
|
||||
{schema}
|
||||
{filters}
|
||||
on:change={onFilter}
|
||||
disabled={!hasCols}
|
||||
/>
|
||||
|
|
|
@ -8,9 +8,10 @@
|
|||
export let disabled = false
|
||||
|
||||
const dispatch = createEventDispatcher()
|
||||
let modal
|
||||
let tempValue = filters || []
|
||||
|
||||
let modal
|
||||
|
||||
$: tempValue = filters || []
|
||||
$: schemaFields = Object.values(schema || {})
|
||||
</script>
|
||||
|
||||
|
@ -34,8 +35,9 @@
|
|||
<div class="wrapper">
|
||||
<FilterDrawer
|
||||
allowBindings={false}
|
||||
bind:filters={tempValue}
|
||||
{filters}
|
||||
{schemaFields}
|
||||
on:change={e => (tempValue = e.detail)}
|
||||
/>
|
||||
</div>
|
||||
</ModalContent>
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
export let value = ""
|
||||
export let valid
|
||||
export let allowJS = false
|
||||
export let allowHelpers = true
|
||||
|
||||
let helpers = handlebarsCompletions()
|
||||
let getCaretPosition
|
||||
|
@ -85,7 +86,7 @@
|
|||
return helper.label.match(searchRgx) || helper.description.match(searchRgx)
|
||||
})
|
||||
|
||||
$: categoryNames = [...categories.map(cat => cat[0]), "Helpers"]
|
||||
$: categoryNames = getCategoryNames(categories)
|
||||
|
||||
$: codeMirrorHints = bindings?.map(x => `$("${x.readableBinding}")`)
|
||||
|
||||
|
@ -96,6 +97,14 @@
|
|||
}
|
||||
}
|
||||
|
||||
const getCategoryNames = categories => {
|
||||
let names = [...categories.map(cat => cat[0])]
|
||||
if (allowHelpers) {
|
||||
names.push("Helpers")
|
||||
}
|
||||
return names
|
||||
}
|
||||
|
||||
// Adds a JS/HBS helper to the expression
|
||||
const addHelper = (helper, js) => {
|
||||
let tempVal
|
||||
|
@ -343,7 +352,7 @@
|
|||
for more details.
|
||||
</p>
|
||||
{/if}
|
||||
{#if $admin.isDev}
|
||||
{#if $admin.isDev && allowJS}
|
||||
<div class="convert">
|
||||
<Button secondary on:click={convert}>Convert to JS</Button>
|
||||
</div>
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
export let valid
|
||||
export let value = ""
|
||||
export let allowJS = false
|
||||
export let allowHelpers = true
|
||||
|
||||
$: enrichedBindings = enrichBindings(bindings)
|
||||
|
||||
|
@ -25,5 +26,6 @@
|
|||
bindings={enrichedBindings}
|
||||
{value}
|
||||
{allowJS}
|
||||
{allowHelpers}
|
||||
on:change
|
||||
/>
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
export let disabled = false
|
||||
export let fillWidth
|
||||
export let allowJS = true
|
||||
export let allowHelpers = true
|
||||
export let updateOnChange = true
|
||||
export let drawerLeft
|
||||
|
||||
|
@ -77,6 +78,7 @@
|
|||
on:change={event => (tempValue = event.detail)}
|
||||
{bindings}
|
||||
{allowJS}
|
||||
{allowHelpers}
|
||||
/>
|
||||
</Drawer>
|
||||
|
||||
|
|
|
@ -17,22 +17,30 @@
|
|||
import { generate } from "shortid"
|
||||
import { LuceneUtils, Constants } from "@budibase/frontend-core"
|
||||
import { getFields } from "helpers/searchFields"
|
||||
import { createEventDispatcher, onMount } from "svelte"
|
||||
|
||||
const dispatch = createEventDispatcher()
|
||||
const { OperatorOptions } = Constants
|
||||
const { getValidOperatorsForType } = LuceneUtils
|
||||
import { createEventDispatcher } from "svelte"
|
||||
|
||||
export let schemaFields
|
||||
export let filters = []
|
||||
export let bindings = []
|
||||
export let panel = ClientBindingPanel
|
||||
export let allowBindings = true
|
||||
export let allOr = false
|
||||
export let fillWidth = false
|
||||
export let tableId
|
||||
|
||||
$: dispatch("change", filters)
|
||||
const dispatch = createEventDispatcher()
|
||||
const { OperatorOptions } = Constants
|
||||
const { getValidOperatorsForType } = LuceneUtils
|
||||
const KeyedFieldRegex = /\d[0-9]*:/g
|
||||
const behaviourOptions = [
|
||||
{ value: "and", label: "Match all filters" },
|
||||
{ value: "or", label: "Match any filter" },
|
||||
]
|
||||
|
||||
let rawFilters
|
||||
let matchAny = false
|
||||
|
||||
$: parseFilters(filters)
|
||||
$: dispatch("change", enrichFilters(rawFilters, matchAny))
|
||||
$: enrichedSchemaFields = getFields(
|
||||
schemaFields || [],
|
||||
{ allowLinks: true },
|
||||
|
@ -41,14 +49,41 @@
|
|||
$: fieldOptions = enrichedSchemaFields.map(field => field.name) || []
|
||||
$: valueTypeOptions = allowBindings ? ["Value", "Binding"] : ["Value"]
|
||||
|
||||
let behaviourValue
|
||||
const behaviourOptions = [
|
||||
{ value: "and", label: "Match all of the following filters" },
|
||||
{ value: "or", label: "Match any of the following filters" },
|
||||
]
|
||||
// Remove field key prefixes and determine whether to use the "match all"
|
||||
// or "match any" behaviour
|
||||
const parseFilters = filters => {
|
||||
matchAny = filters?.find(filter => filter.operator === "allOr") != null
|
||||
rawFilters = (filters || [])
|
||||
.filter(filter => filter.operator !== "allOr")
|
||||
.map(filter => {
|
||||
const { field } = filter
|
||||
let newFilter = { ...filter }
|
||||
delete newFilter.allOr
|
||||
if (typeof field === "string" && field.match(KeyedFieldRegex) != null) {
|
||||
const parts = field.split(":")
|
||||
parts.shift()
|
||||
newFilter.field = parts.join(":")
|
||||
}
|
||||
return newFilter
|
||||
})
|
||||
}
|
||||
|
||||
// Add field key prefixes and a special metadata filter object to indicate
|
||||
// whether to use the "match all" or "match any" behaviour
|
||||
const enrichFilters = (rawFilters, matchAny) => {
|
||||
let count = 1
|
||||
return rawFilters
|
||||
.filter(filter => filter.field)
|
||||
.map(filter => ({
|
||||
...filter,
|
||||
field: `${count++}:${filter.field}`,
|
||||
}))
|
||||
.concat(matchAny ? [{ operator: "allOr" }] : [])
|
||||
}
|
||||
|
||||
const addFilter = () => {
|
||||
filters = [
|
||||
...filters,
|
||||
rawFilters = [
|
||||
...rawFilters,
|
||||
{
|
||||
id: generate(),
|
||||
field: null,
|
||||
|
@ -60,13 +95,13 @@
|
|||
}
|
||||
|
||||
const removeFilter = id => {
|
||||
filters = filters.filter(field => field.id !== id)
|
||||
rawFilters = rawFilters.filter(field => field.id !== id)
|
||||
}
|
||||
|
||||
const duplicateFilter = id => {
|
||||
const existingFilter = filters.find(filter => filter.id === id)
|
||||
const existingFilter = rawFilters.find(filter => filter.id === id)
|
||||
const duplicate = { ...existingFilter, id: generate() }
|
||||
filters = [...filters, duplicate]
|
||||
rawFilters = [...rawFilters, duplicate]
|
||||
}
|
||||
|
||||
const getSchema = filter => {
|
||||
|
@ -133,32 +168,22 @@
|
|||
const schema = enrichedSchemaFields.find(x => x.name === field)
|
||||
return schema?.constraints?.inclusion || []
|
||||
}
|
||||
|
||||
onMount(() => {
|
||||
behaviourValue = allOr ? "or" : "and"
|
||||
})
|
||||
</script>
|
||||
|
||||
<DrawerContent>
|
||||
<div class="container">
|
||||
<Layout noPadding>
|
||||
<Body size="S">
|
||||
{#if !filters?.length}
|
||||
Add your first filter expression.
|
||||
{:else}
|
||||
Results are filtered to only those which match all of the following
|
||||
constraints.
|
||||
{/if}
|
||||
</Body>
|
||||
{#if filters?.length}
|
||||
{#if !rawFilters?.length}
|
||||
<Body size="S">Add your first filter expression.</Body>
|
||||
{:else}
|
||||
<div class="fields">
|
||||
<Select
|
||||
label="Behaviour"
|
||||
value={behaviourValue}
|
||||
value={matchAny ? "or" : "and"}
|
||||
options={behaviourOptions}
|
||||
getOptionLabel={opt => opt.label}
|
||||
getOptionValue={opt => opt.value}
|
||||
on:change={e => (allOr = e.detail === "or")}
|
||||
on:change={e => (matchAny = e.detail === "or")}
|
||||
placeholder={null}
|
||||
/>
|
||||
</div>
|
||||
|
@ -167,7 +192,7 @@
|
|||
<Label>Filters</Label>
|
||||
</div>
|
||||
<div class="fields">
|
||||
{#each filters as filter, idx}
|
||||
{#each rawFilters as filter, idx}
|
||||
<Select
|
||||
bind:value={filter.field}
|
||||
options={fieldOptions}
|
||||
|
@ -269,7 +294,7 @@
|
|||
column-gap: var(--spacing-l);
|
||||
row-gap: var(--spacing-s);
|
||||
align-items: center;
|
||||
grid-template-columns: 1fr 150px 120px 1fr 16px 16px;
|
||||
grid-template-columns: minmax(150px, 1fr) 170px 120px minmax(150px, 1fr) 16px 16px;
|
||||
}
|
||||
|
||||
.filter-label {
|
||||
|
|
|
@ -8,74 +8,22 @@
|
|||
import FilterDrawer from "./FilterDrawer.svelte"
|
||||
import { currentAsset } from "builderStore"
|
||||
|
||||
const QUERY_START_REGEX = /\d[0-9]*:/g
|
||||
const dispatch = createEventDispatcher()
|
||||
|
||||
export let value = []
|
||||
export let componentInstance
|
||||
export let bindings = []
|
||||
|
||||
let drawer,
|
||||
toSaveFilters = null,
|
||||
allOr,
|
||||
initialAllOr
|
||||
let drawer
|
||||
|
||||
$: initialFilters = correctFilters(value || [])
|
||||
$: tempValue = value
|
||||
$: dataSource = getDatasourceForProvider($currentAsset, componentInstance)
|
||||
$: schema = getSchemaForDatasource($currentAsset, dataSource)?.schema
|
||||
$: schemaFields = Object.values(schema || {})
|
||||
|
||||
function addNumbering(filters) {
|
||||
let count = 1
|
||||
for (let value of filters) {
|
||||
if (value.field && value.field?.match(QUERY_START_REGEX) == null) {
|
||||
value.field = `${count++}:${value.field}`
|
||||
}
|
||||
}
|
||||
return filters
|
||||
}
|
||||
|
||||
function correctFilters(filters) {
|
||||
const corrected = []
|
||||
for (let filter of filters) {
|
||||
let field = filter.field
|
||||
if (filter.operator === "allOr") {
|
||||
initialAllOr = allOr = true
|
||||
continue
|
||||
}
|
||||
if (
|
||||
typeof filter.field === "string" &&
|
||||
filter.field.match(QUERY_START_REGEX) != null
|
||||
) {
|
||||
const parts = field.split(":")
|
||||
const number = parts[0]
|
||||
// it's the new format, remove number
|
||||
if (!isNaN(parseInt(number))) {
|
||||
parts.shift()
|
||||
field = parts.join(":")
|
||||
}
|
||||
}
|
||||
corrected.push({
|
||||
...filter,
|
||||
field,
|
||||
})
|
||||
}
|
||||
return corrected
|
||||
}
|
||||
|
||||
async function saveFilter() {
|
||||
if (!toSaveFilters && allOr !== initialAllOr) {
|
||||
toSaveFilters = initialFilters
|
||||
}
|
||||
const filters = toSaveFilters?.filter(filter => filter.operator !== "allOr")
|
||||
if (allOr && filters) {
|
||||
filters.push({ operator: "allOr" })
|
||||
}
|
||||
// only save if anything was updated
|
||||
if (filters) {
|
||||
dispatch("change", addNumbering(filters))
|
||||
}
|
||||
notifications.success("Filters saved.")
|
||||
dispatch("change", tempValue)
|
||||
notifications.success("Filters saved")
|
||||
drawer.hide()
|
||||
}
|
||||
</script>
|
||||
|
@ -85,13 +33,10 @@
|
|||
<Button cta slot="buttons" on:click={saveFilter}>Save</Button>
|
||||
<FilterDrawer
|
||||
slot="body"
|
||||
filters={initialFilters}
|
||||
filters={value}
|
||||
{bindings}
|
||||
{schemaFields}
|
||||
tableId={dataSource.tableId}
|
||||
bind:allOr
|
||||
on:change={event => {
|
||||
toSaveFilters = event.detail
|
||||
}}
|
||||
on:change={e => (tempValue = e.detail)}
|
||||
/>
|
||||
</Drawer>
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
export let showMenu = false
|
||||
export let bindings = []
|
||||
export let bindingDrawerLeft
|
||||
export let allowHelpers = true
|
||||
|
||||
let fields = Object.entries(object || {}).map(([name, value]) => ({
|
||||
name,
|
||||
|
@ -122,6 +123,7 @@
|
|||
disabled={readOnly}
|
||||
value={field.value}
|
||||
allowJS={false}
|
||||
{allowHelpers}
|
||||
fillWidth={true}
|
||||
drawerLeft={bindingDrawerLeft}
|
||||
/>
|
||||
|
|
|
@ -223,6 +223,7 @@
|
|||
.config {
|
||||
display: grid;
|
||||
grid-gap: var(--spacing-s);
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.config-field {
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
valuePlaceholder="Default"
|
||||
bindings={[...userBindings]}
|
||||
bindingDrawerLeft="260px"
|
||||
allowHelpers={false}
|
||||
on:change
|
||||
/>
|
||||
</div>
|
||||
|
|
|
@ -61,6 +61,13 @@
|
|||
align-items: center;
|
||||
gap: var(--spacing-l);
|
||||
}
|
||||
.header-left {
|
||||
flex: 1 1 auto;
|
||||
width: 0;
|
||||
}
|
||||
.header-left :global(> *) {
|
||||
max-width: 100%;
|
||||
}
|
||||
.header-left :global(.spectrum-Picker) {
|
||||
font-weight: 600;
|
||||
color: var(--spectrum-global-color-gray-900);
|
||||
|
|
|
@ -282,12 +282,16 @@
|
|||
gap: var(--spacing-l);
|
||||
display: grid;
|
||||
align-items: center;
|
||||
grid-template-columns: auto 160px auto 1fr 130px 130px 1fr auto auto;
|
||||
grid-template-columns:
|
||||
auto 150px auto minmax(140px, 1fr) 120px 100px minmax(140px, 1fr)
|
||||
auto auto;
|
||||
border-radius: var(--border-radius-s);
|
||||
transition: background-color ease-in-out 130ms;
|
||||
}
|
||||
.condition.update {
|
||||
grid-template-columns: auto 160px 1fr auto 1fr auto 1fr 130px 130px 1fr auto auto;
|
||||
grid-template-columns:
|
||||
auto 150px minmax(140px, 1fr) auto minmax(140px, 1fr) auto
|
||||
minmax(140px, 1fr) 120px 100px minmax(140px, 1fr) auto auto;
|
||||
}
|
||||
.condition:hover {
|
||||
background-color: var(--spectrum-global-color-gray-100);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@budibase/cli",
|
||||
"version": "2.1.43-alpha.10",
|
||||
"version": "2.1.43-alpha.12",
|
||||
"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.1.43-alpha.10",
|
||||
"@budibase/string-templates": "2.1.43-alpha.10",
|
||||
"@budibase/types": "2.1.43-alpha.10",
|
||||
"@budibase/backend-core": "2.1.43-alpha.12",
|
||||
"@budibase/string-templates": "2.1.43-alpha.12",
|
||||
"@budibase/types": "2.1.43-alpha.12",
|
||||
"axios": "0.21.2",
|
||||
"chalk": "4.1.0",
|
||||
"cli-progress": "3.11.2",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@budibase/client",
|
||||
"version": "2.1.43-alpha.10",
|
||||
"version": "2.1.43-alpha.12",
|
||||
"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.1.43-alpha.10",
|
||||
"@budibase/frontend-core": "2.1.43-alpha.10",
|
||||
"@budibase/string-templates": "2.1.43-alpha.10",
|
||||
"@budibase/bbui": "2.1.43-alpha.12",
|
||||
"@budibase/frontend-core": "2.1.43-alpha.12",
|
||||
"@budibase/string-templates": "2.1.43-alpha.12",
|
||||
"@spectrum-css/button": "^3.0.3",
|
||||
"@spectrum-css/card": "^3.0.3",
|
||||
"@spectrum-css/divider": "^1.0.3",
|
||||
|
|
|
@ -29,6 +29,17 @@
|
|||
// Derive visibility
|
||||
$: open = $sidePanelStore.contentId === $component.id
|
||||
|
||||
// Derive a render key which is only changed whenever this panel is made
|
||||
// visible after being hidden. We need to key the content to avoid showing
|
||||
// stale data when re-revealing a side panel that was closed, but we cannot
|
||||
// hide the content altogether when hidden as this breaks ejection.
|
||||
let renderKey = null
|
||||
$: {
|
||||
if (open) {
|
||||
renderKey = Math.random()
|
||||
}
|
||||
}
|
||||
|
||||
const showInSidePanel = (el, visible) => {
|
||||
const update = visible => {
|
||||
const target = document.getElementById("side-panel-container")
|
||||
|
@ -47,7 +58,10 @@
|
|||
// Apply initial visibility
|
||||
update(visible)
|
||||
|
||||
return { update }
|
||||
return {
|
||||
update,
|
||||
destroy: () => update(false),
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
@ -57,9 +71,9 @@
|
|||
class="side-panel"
|
||||
class:open
|
||||
>
|
||||
{#if $sidePanelStore.open}
|
||||
{#key renderKey}
|
||||
<slot />
|
||||
{/if}
|
||||
{/key}
|
||||
</div>
|
||||
|
||||
<style>
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "@budibase/frontend-core",
|
||||
"version": "2.1.43-alpha.10",
|
||||
"version": "2.1.43-alpha.12",
|
||||
"description": "Budibase frontend core libraries used in builder and client",
|
||||
"author": "Budibase",
|
||||
"license": "MPL-2.0",
|
||||
"svelte": "src/index.js",
|
||||
"dependencies": {
|
||||
"@budibase/bbui": "2.1.43-alpha.10",
|
||||
"@budibase/bbui": "2.1.43-alpha.12",
|
||||
"lodash": "^4.17.21",
|
||||
"svelte": "^3.46.2"
|
||||
}
|
||||
|
|
|
@ -28,11 +28,11 @@ export const OperatorOptions = {
|
|||
},
|
||||
MoreThan: {
|
||||
value: "rangeLow",
|
||||
label: "More than",
|
||||
label: "More than or equal to",
|
||||
},
|
||||
LessThan: {
|
||||
value: "rangeHigh",
|
||||
label: "Less than",
|
||||
label: "Less than or equal to",
|
||||
},
|
||||
Contains: {
|
||||
value: "contains",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@budibase/sdk",
|
||||
"version": "2.1.43-alpha.10",
|
||||
"version": "2.1.43-alpha.12",
|
||||
"description": "Budibase Public API SDK",
|
||||
"author": "Budibase",
|
||||
"license": "MPL-2.0",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@budibase/server",
|
||||
"email": "hi@budibase.com",
|
||||
"version": "2.1.43-alpha.10",
|
||||
"version": "2.1.43-alpha.12",
|
||||
"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.1.43-alpha.10",
|
||||
"@budibase/client": "2.1.43-alpha.10",
|
||||
"@budibase/pro": "2.1.43-alpha.10",
|
||||
"@budibase/string-templates": "2.1.43-alpha.10",
|
||||
"@budibase/types": "2.1.43-alpha.10",
|
||||
"@budibase/backend-core": "2.1.43-alpha.12",
|
||||
"@budibase/client": "2.1.43-alpha.12",
|
||||
"@budibase/pro": "2.1.43-alpha.12",
|
||||
"@budibase/string-templates": "2.1.43-alpha.12",
|
||||
"@budibase/types": "2.1.43-alpha.12",
|
||||
"@bull-board/api": "3.7.0",
|
||||
"@bull-board/koa": "3.9.4",
|
||||
"@elastic/elasticsearch": "7.10.0",
|
||||
|
|
|
@ -1273,12 +1273,12 @@
|
|||
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
|
||||
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
|
||||
|
||||
"@budibase/backend-core@2.1.43-alpha.10":
|
||||
version "2.1.43-alpha.10"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.43-alpha.10.tgz#573647b851993734d83ce201c44eb4c3df2b8141"
|
||||
integrity sha512-1YOwm0n1gydvtqas7xW7oje97LiYxCZ0jGIMoxXk8AK94iXAYW/UYEcc/BdOnEvK0Zz4KEfvZ8tgAvq4VM83uQ==
|
||||
"@budibase/backend-core@2.1.43-alpha.12":
|
||||
version "2.1.43-alpha.12"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.43-alpha.12.tgz#41d9ee3f2fc7b33205b9f85a8274f55bcf372c13"
|
||||
integrity sha512-GrmDsFwsKBzcyCM08PMKim193vlbDutuA1eTm62HNkTRSG+TDejVOATgA0uHqmBXXS5QG39LwcmKEhuL5KtLfw==
|
||||
dependencies:
|
||||
"@budibase/types" "2.1.43-alpha.10"
|
||||
"@budibase/types" "2.1.43-alpha.12"
|
||||
"@shopify/jest-koa-mocks" "5.0.1"
|
||||
"@techpass/passport-openidconnect" "0.3.2"
|
||||
aws-sdk "2.1030.0"
|
||||
|
@ -1360,13 +1360,13 @@
|
|||
svelte-flatpickr "^3.2.3"
|
||||
svelte-portal "^1.0.0"
|
||||
|
||||
"@budibase/pro@2.1.43-alpha.10":
|
||||
version "2.1.43-alpha.10"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.43-alpha.10.tgz#300ba146e2715b9b3d36f4febcde030f01760347"
|
||||
integrity sha512-q9bwYw3xcDD08z9OZVHfqiBKNGjdDQ+c+SEYQRlNrvF9EbGc4WFiPzKDJrNlVSQF+/+oBHxGo6J9mFqrL66sdA==
|
||||
"@budibase/pro@2.1.43-alpha.12":
|
||||
version "2.1.43-alpha.12"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.43-alpha.12.tgz#d9f3c3ce61f7177e3cbdb6b26565779dcfd0c85e"
|
||||
integrity sha512-ZGmw4YdZZx1xBSmS54cUr+njRGJAtH52zDURYJJj3zfzhBtJUvZ5Ryc+m6OVA7PJTCDG5kocbw/n9lEaoeDCnw==
|
||||
dependencies:
|
||||
"@budibase/backend-core" "2.1.43-alpha.10"
|
||||
"@budibase/types" "2.1.43-alpha.10"
|
||||
"@budibase/backend-core" "2.1.43-alpha.12"
|
||||
"@budibase/types" "2.1.43-alpha.12"
|
||||
"@koa/router" "8.0.8"
|
||||
bull "4.10.1"
|
||||
joi "17.6.0"
|
||||
|
@ -1390,10 +1390,10 @@
|
|||
svelte-apexcharts "^1.0.2"
|
||||
svelte-flatpickr "^3.1.0"
|
||||
|
||||
"@budibase/types@2.1.43-alpha.10":
|
||||
version "2.1.43-alpha.10"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.43-alpha.10.tgz#0ee0766d07126a36913836de94d8fcebc77aead3"
|
||||
integrity sha512-APp/srnTGZ1nIgCuOMsm2rEimMjKzKHZYd1QkuRq13dFcuwTG+Gr/soITTWurczAbS9jTo3MfZh859s1uv2e3g==
|
||||
"@budibase/types@2.1.43-alpha.12":
|
||||
version "2.1.43-alpha.12"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.43-alpha.12.tgz#193ca97d4559811e3a2b3e454b53b79c588f7c3f"
|
||||
integrity sha512-lfTjCTnxUA1zbxzht+X/glcGebY9Rm/eLvfVLazRQk1WQMXl740KRaJn5Y7nBVJgusQLGchM5g+Vp5YE5Sd3UA==
|
||||
|
||||
"@bull-board/api@3.7.0":
|
||||
version "3.7.0"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@budibase/string-templates",
|
||||
"version": "2.1.43-alpha.10",
|
||||
"version": "2.1.43-alpha.12",
|
||||
"description": "Handlebars wrapper for Budibase templating.",
|
||||
"main": "src/index.cjs",
|
||||
"module": "dist/bundle.mjs",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@budibase/types",
|
||||
"version": "2.1.43-alpha.10",
|
||||
"version": "2.1.43-alpha.12",
|
||||
"description": "Budibase types",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@budibase/worker",
|
||||
"email": "hi@budibase.com",
|
||||
"version": "2.1.43-alpha.10",
|
||||
"version": "2.1.43-alpha.12",
|
||||
"description": "Budibase background service",
|
||||
"main": "src/index.ts",
|
||||
"repository": {
|
||||
|
@ -36,10 +36,10 @@
|
|||
"author": "Budibase",
|
||||
"license": "GPL-3.0",
|
||||
"dependencies": {
|
||||
"@budibase/backend-core": "2.1.43-alpha.10",
|
||||
"@budibase/pro": "2.1.43-alpha.10",
|
||||
"@budibase/string-templates": "2.1.43-alpha.10",
|
||||
"@budibase/types": "2.1.43-alpha.10",
|
||||
"@budibase/backend-core": "2.1.43-alpha.12",
|
||||
"@budibase/pro": "2.1.43-alpha.12",
|
||||
"@budibase/string-templates": "2.1.43-alpha.12",
|
||||
"@budibase/types": "2.1.43-alpha.12",
|
||||
"@koa/router": "8.0.8",
|
||||
"@sentry/node": "6.17.7",
|
||||
"@techpass/passport-openidconnect": "0.3.2",
|
||||
|
|
|
@ -470,12 +470,12 @@
|
|||
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
|
||||
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
|
||||
|
||||
"@budibase/backend-core@2.1.43-alpha.10":
|
||||
version "2.1.43-alpha.10"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.43-alpha.10.tgz#573647b851993734d83ce201c44eb4c3df2b8141"
|
||||
integrity sha512-1YOwm0n1gydvtqas7xW7oje97LiYxCZ0jGIMoxXk8AK94iXAYW/UYEcc/BdOnEvK0Zz4KEfvZ8tgAvq4VM83uQ==
|
||||
"@budibase/backend-core@2.1.43-alpha.12":
|
||||
version "2.1.43-alpha.12"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.43-alpha.12.tgz#41d9ee3f2fc7b33205b9f85a8274f55bcf372c13"
|
||||
integrity sha512-GrmDsFwsKBzcyCM08PMKim193vlbDutuA1eTm62HNkTRSG+TDejVOATgA0uHqmBXXS5QG39LwcmKEhuL5KtLfw==
|
||||
dependencies:
|
||||
"@budibase/types" "2.1.43-alpha.10"
|
||||
"@budibase/types" "2.1.43-alpha.12"
|
||||
"@shopify/jest-koa-mocks" "5.0.1"
|
||||
"@techpass/passport-openidconnect" "0.3.2"
|
||||
aws-sdk "2.1030.0"
|
||||
|
@ -507,22 +507,22 @@
|
|||
uuid "8.3.2"
|
||||
zlib "1.0.5"
|
||||
|
||||
"@budibase/pro@2.1.43-alpha.10":
|
||||
version "2.1.43-alpha.10"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.43-alpha.10.tgz#300ba146e2715b9b3d36f4febcde030f01760347"
|
||||
integrity sha512-q9bwYw3xcDD08z9OZVHfqiBKNGjdDQ+c+SEYQRlNrvF9EbGc4WFiPzKDJrNlVSQF+/+oBHxGo6J9mFqrL66sdA==
|
||||
"@budibase/pro@2.1.43-alpha.12":
|
||||
version "2.1.43-alpha.12"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.43-alpha.12.tgz#d9f3c3ce61f7177e3cbdb6b26565779dcfd0c85e"
|
||||
integrity sha512-ZGmw4YdZZx1xBSmS54cUr+njRGJAtH52zDURYJJj3zfzhBtJUvZ5Ryc+m6OVA7PJTCDG5kocbw/n9lEaoeDCnw==
|
||||
dependencies:
|
||||
"@budibase/backend-core" "2.1.43-alpha.10"
|
||||
"@budibase/types" "2.1.43-alpha.10"
|
||||
"@budibase/backend-core" "2.1.43-alpha.12"
|
||||
"@budibase/types" "2.1.43-alpha.12"
|
||||
"@koa/router" "8.0.8"
|
||||
bull "4.10.1"
|
||||
joi "17.6.0"
|
||||
node-fetch "^2.6.1"
|
||||
|
||||
"@budibase/types@2.1.43-alpha.10":
|
||||
version "2.1.43-alpha.10"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.43-alpha.10.tgz#0ee0766d07126a36913836de94d8fcebc77aead3"
|
||||
integrity sha512-APp/srnTGZ1nIgCuOMsm2rEimMjKzKHZYd1QkuRq13dFcuwTG+Gr/soITTWurczAbS9jTo3MfZh859s1uv2e3g==
|
||||
"@budibase/types@2.1.43-alpha.12":
|
||||
version "2.1.43-alpha.12"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.43-alpha.12.tgz#193ca97d4559811e3a2b3e454b53b79c588f7c3f"
|
||||
integrity sha512-lfTjCTnxUA1zbxzht+X/glcGebY9Rm/eLvfVLazRQk1WQMXl740KRaJn5Y7nBVJgusQLGchM5g+Vp5YE5Sd3UA==
|
||||
|
||||
"@cspotcode/source-map-support@^0.8.0":
|
||||
version "0.8.1"
|
||||
|
|
Loading…
Reference in New Issue