diff --git a/lerna.json b/lerna.json
index 587a678788..4049d5d734 100644
--- a/lerna.json
+++ b/lerna.json
@@ -1,5 +1,5 @@
{
- "version": "2.15.5",
+ "version": "2.15.6",
"npmClient": "yarn",
"packages": [
"packages/*",
diff --git a/packages/bbui/src/Actions/position_dropdown.js b/packages/bbui/src/Actions/position_dropdown.js
index f2018272f6..cc169eac09 100644
--- a/packages/bbui/src/Actions/position_dropdown.js
+++ b/packages/bbui/src/Actions/position_dropdown.js
@@ -18,7 +18,6 @@ export default function positionDropdown(element, opts) {
useAnchorWidth,
offset = 5,
customUpdate,
- offsetBelow,
} = opts
if (!anchor) {
return
@@ -48,7 +47,7 @@ export default function positionDropdown(element, opts) {
styles.top = anchorBounds.top - elementBounds.height - offset
styles.maxHeight = maxHeight || 240
} else {
- styles.top = anchorBounds.bottom + (offsetBelow || offset)
+ styles.top = anchorBounds.bottom + offset
styles.maxHeight =
maxHeight || window.innerHeight - anchorBounds.bottom - 20
}
diff --git a/packages/bbui/src/Form/Core/Multiselect.svelte b/packages/bbui/src/Form/Core/Multiselect.svelte
index d5d6515d2d..2243570cd5 100644
--- a/packages/bbui/src/Form/Core/Multiselect.svelte
+++ b/packages/bbui/src/Form/Core/Multiselect.svelte
@@ -15,8 +15,6 @@
export let autoWidth = false
export let searchTerm = null
export let customPopoverHeight
- export let customPopoverOffsetBelow
- export let customPopoverMaxHeight
export let open = false
export let loading
@@ -98,7 +96,5 @@
{sort}
{autoWidth}
{customPopoverHeight}
- {customPopoverOffsetBelow}
- {customPopoverMaxHeight}
{loading}
/>
diff --git a/packages/bbui/src/Form/Core/Picker.svelte b/packages/bbui/src/Form/Core/Picker.svelte
index 94fbe73cf2..cfb1654403 100644
--- a/packages/bbui/src/Form/Core/Picker.svelte
+++ b/packages/bbui/src/Form/Core/Picker.svelte
@@ -37,8 +37,6 @@
export let sort = false
export let searchTerm = null
export let customPopoverHeight
- export let customPopoverOffsetBelow
- export let customPopoverMaxHeight
export let align = "left"
export let footer = null
export let customAnchor = null
@@ -156,9 +154,7 @@
on:close={() => (open = false)}
useAnchorWidth={!autoWidth}
maxWidth={autoWidth ? 400 : null}
- maxHeight={customPopoverMaxHeight}
customHeight={customPopoverHeight}
- offsetBelow={customPopoverOffsetBelow}
>
compareOptionAndValue(option, value)}
diff --git a/packages/bbui/src/Popover/Popover.svelte b/packages/bbui/src/Popover/Popover.svelte
index a68430e973..5066e3aa05 100644
--- a/packages/bbui/src/Popover/Popover.svelte
+++ b/packages/bbui/src/Popover/Popover.svelte
@@ -18,7 +18,6 @@
export let useAnchorWidth = false
export let dismissible = true
export let offset = 5
- export let offsetBelow
export let customHeight
export let animate = true
export let customZindex
@@ -89,7 +88,6 @@
maxWidth,
useAnchorWidth,
offset,
- offsetBelow,
customUpdate: handlePostionUpdate,
}}
use:clickOutside={{
diff --git a/packages/builder/src/components/backend/Datasources/CreateEditRelationship.svelte b/packages/builder/src/components/backend/Datasources/CreateEditRelationship.svelte
index c837247986..f9b688210a 100644
--- a/packages/builder/src/components/backend/Datasources/CreateEditRelationship.svelte
+++ b/packages/builder/src/components/backend/Datasources/CreateEditRelationship.svelte
@@ -88,8 +88,12 @@
hasValidated = false
})
}
+
$: valid =
- getErrorCount(errors) === 0 && allRequiredAttributesSet(relationshipType)
+ getErrorCount(errors) === 0 &&
+ allRequiredAttributesSet(relationshipType) &&
+ fromId &&
+ toId
$: isManyToMany = relationshipType === RelationshipType.MANY_TO_MANY
$: isManyToOne =
relationshipType === RelationshipType.MANY_TO_ONE ||
diff --git a/packages/client/manifest.json b/packages/client/manifest.json
index f4e6c28db3..93df805dba 100644
--- a/packages/client/manifest.json
+++ b/packages/client/manifest.json
@@ -3964,6 +3964,12 @@
"key": "allowManualEntry",
"defaultValue": false
},
+ {
+ "type": "boolean",
+ "label": "Auto confirm",
+ "key": "autoConfirm",
+ "defaultValue": false
+ },
{
"type": "boolean",
"label": "Play sound on scan",
diff --git a/packages/client/src/components/app/forms/CodeScanner.svelte b/packages/client/src/components/app/forms/CodeScanner.svelte
index ff860d216f..2a546eb64c 100644
--- a/packages/client/src/components/app/forms/CodeScanner.svelte
+++ b/packages/client/src/components/app/forms/CodeScanner.svelte
@@ -14,11 +14,13 @@
export let value
export let disabled = false
export let allowManualEntry = false
+ export let autoConfirm = false
export let scanButtonText = "Scan code"
export let beepOnScan = false
export let beepFrequency = 2637
export let customFrequency = 1046
export let preferredCamera = "environment"
+ export let validator
const dispatch = createEventDispatcher()
@@ -41,6 +43,9 @@
beep()
}
dispatch("change", decodedText)
+ if (autoConfirm && !validator?.(decodedText)) {
+ camModal?.hide()
+ }
}
}
@@ -127,7 +132,11 @@
{#if value && !manualMode}
-
+ {#if validator?.(value)}
+
+ {:else}
+
+ {/if}
{value}
{/if}
@@ -183,11 +192,16 @@
{#if cameraEnabled === true}
- {#if value}
+ {#if value && !validator?.(value)}
{value}
+ {:else if value && validator?.(value)}
+
+
+ {value}
+
{:else}
diff --git a/packages/client/src/components/app/forms/CodeScannerField.svelte b/packages/client/src/components/app/forms/CodeScannerField.svelte
index be590106c2..7c9948554a 100644
--- a/packages/client/src/components/app/forms/CodeScannerField.svelte
+++ b/packages/client/src/components/app/forms/CodeScannerField.svelte
@@ -11,6 +11,7 @@
export let defaultValue = ""
export let onChange
export let allowManualEntry
+ export let autoConfirm
export let scanButtonText
export let beepOnScan
export let beepFrequency
@@ -49,11 +50,13 @@
on:change={handleUpdate}
disabled={fieldState.disabled || fieldState.readonly}
{allowManualEntry}
+ {autoConfirm}
scanButtonText={scanText}
{beepOnScan}
{beepFrequency}
{customFrequency}
{preferredCamera}
+ validator={fieldState.validator}
/>
{/if}
diff --git a/packages/client/src/components/app/forms/RelationshipField.svelte b/packages/client/src/components/app/forms/RelationshipField.svelte
index b2380bb845..9d0503be8e 100644
--- a/packages/client/src/components/app/forms/RelationshipField.svelte
+++ b/packages/client/src/components/app/forms/RelationshipField.svelte
@@ -239,7 +239,6 @@
bind:searchTerm
loading={$fetch.loading}
bind:open
- customPopoverMaxHeight={400}
/>
{/if}