diff --git a/packages/client/manifest.json b/packages/client/manifest.json
index 5ccb31409d..acb05d58bc 100644
--- a/packages/client/manifest.json
+++ b/packages/client/manifest.json
@@ -3168,24 +3168,39 @@
"section"
],
"settings": [
- {
- "type": "text",
- "label": "Label",
- "key": "label",
- "defaultValue": true
- },
{
"type": "field/code",
"label": "Field",
"key": "field",
"required": true
},
+ {
+ "type": "text",
+ "label": "Label",
+ "key": "label"
+ },
+ {
+ "type": "text",
+ "label": "Button",
+ "key": "scanButtonText"
+ },
+ {
+ "type": "text",
+ "label": "Default value",
+ "key": "defaultValue"
+ },
{
"type": "boolean",
"label": "Disabled",
"key": "disabled",
"defaultValue": false
},
+ {
+ "type": "boolean",
+ "label": "Allow manual entry",
+ "key": "allowManualEntry",
+ "defaultValue": false
+ },
{
"type": "validation/string",
"label": "Validation",
diff --git a/packages/client/rollup.config.js b/packages/client/rollup.config.js
index 5206b63884..be94ace90c 100644
--- a/packages/client/rollup.config.js
+++ b/packages/client/rollup.config.js
@@ -27,6 +27,15 @@ export default {
file: `./dist/budibase-client.js`,
},
],
+ onwarn(warning, warn) {
+ if (
+ warning.code === "THIS_IS_UNDEFINED" ||
+ warning.code === "CIRCULAR_DEPENDENCY"
+ ) {
+ return
+ }
+ warn(warning)
+ },
plugins: [
alias({
entries: [
diff --git a/packages/client/src/components/app/CodeScanner.svelte b/packages/client/src/components/app/CodeScanner.svelte
index 7203b30aef..3215875faa 100644
--- a/packages/client/src/components/app/CodeScanner.svelte
+++ b/packages/client/src/components/app/CodeScanner.svelte
@@ -1,123 +1,189 @@
- {#if code}
-
+ {#if value && !manualMode}
+
- {code}
+ {value}
{/if}
-
+
+ {#if allowManualEntry && manualMode}
+
+ {
+ dispatch("change", value)
+ }}
+ />
+
+ {/if}
+
+ {#if value}
+
{
+ dispatch("change", "")
+ }}
+ {disabled}
+ >
+ Clear
+
+ {:else}
+
{
+ showReaderModal()
+ }}
+ {disabled}
+ >
+ {scanButtonText}
+
+ {/if}
-