Merge branch 'master' into fix/group-ui-issues
This commit is contained in:
commit
2de5dc8698
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
|
||||
"version": "3.4.17",
|
||||
"version": "3.4.18",
|
||||
"npmClient": "yarn",
|
||||
"concurrency": 20,
|
||||
"command": {
|
||||
|
|
|
@ -90,7 +90,7 @@
|
|||
$: requestEval(runtimeExpression, context, snippets)
|
||||
$: bindingHelpers = new BindingHelpers(getCaretPosition, insertAtPos)
|
||||
|
||||
$: bindingOptions = bindingsToCompletions(bindings, editorMode)
|
||||
$: bindingOptions = bindingsToCompletions(enrichedBindings, editorMode)
|
||||
$: helperOptions = allowHelpers ? getHelperCompletions(editorMode) : []
|
||||
$: snippetsOptions =
|
||||
usingJS && useSnippets && snippets?.length ? snippets : []
|
||||
|
|
|
@ -4492,6 +4492,12 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"label": "Zoom level",
|
||||
"key": "defaultZoom",
|
||||
"defaultValue": "1"
|
||||
},
|
||||
{
|
||||
"type": "event",
|
||||
"label": "On change",
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
"apexcharts": "^3.48.0",
|
||||
"dayjs": "^1.10.8",
|
||||
"downloadjs": "1.4.7",
|
||||
"html5-qrcode": "^2.2.1",
|
||||
"html5-qrcode": "^2.3.8",
|
||||
"leaflet": "^1.7.1",
|
||||
"sanitize-html": "^2.13.0",
|
||||
"screenfull": "^6.0.1",
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
export let beepFrequency = 2637
|
||||
export let customFrequency = 1046
|
||||
export let preferredCamera = "environment"
|
||||
export let defaultZoom = 1
|
||||
export let validator
|
||||
|
||||
const dispatch = createEventDispatcher()
|
||||
|
@ -58,6 +59,14 @@
|
|||
html5QrCode
|
||||
.start(cameraSetting, cameraConfig, onScanSuccess)
|
||||
.then(() => {
|
||||
if (defaultZoom > 1) {
|
||||
const cameraOptions =
|
||||
html5QrCode.getRunningTrackCameraCapabilities()
|
||||
const zoom = cameraOptions.zoomFeature()
|
||||
if (zoom.isSupported()) {
|
||||
zoom.apply(defaultZoom)
|
||||
}
|
||||
}
|
||||
resolve({ initialised: true })
|
||||
})
|
||||
.catch(err => {
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
export let beepFrequency
|
||||
export let customFrequency
|
||||
export let preferredCamera
|
||||
export let defaultZoom
|
||||
export let helpText = null
|
||||
|
||||
let fieldState
|
||||
|
@ -56,6 +57,7 @@
|
|||
{beepFrequency}
|
||||
{customFrequency}
|
||||
{preferredCamera}
|
||||
{defaultZoom}
|
||||
validator={fieldState.validator}
|
||||
/>
|
||||
{/if}
|
||||
|
|
|
@ -1,11 +1,3 @@
|
|||
// Directly mock the AWS SDK
|
||||
jest.mock("@aws-sdk/s3-request-presigner", () => ({
|
||||
getSignedUrl: jest.fn(() => {
|
||||
return `http://example.com`
|
||||
}),
|
||||
}))
|
||||
jest.mock("@aws-sdk/client-s3")
|
||||
|
||||
import { Datasource, SourceName } from "@budibase/types"
|
||||
import { setEnv } from "../../../environment"
|
||||
import { getRequest, getConfig, afterAll as _afterAll } from "./utilities"
|
||||
|
@ -92,7 +84,17 @@ describe("/static", () => {
|
|||
.set(config.defaultHeaders())
|
||||
.expect("Content-Type", /json/)
|
||||
.expect(200)
|
||||
expect(res.body.signedUrl).toEqual("http://example.com")
|
||||
|
||||
expect(res.body.signedUrl).toStartWith(
|
||||
"https://foo.s3.eu-west-1.amazonaws.com/bar?"
|
||||
)
|
||||
expect(res.body.signedUrl).toContain("X-Amz-Algorithm=AWS4-HMAC-SHA256")
|
||||
expect(res.body.signedUrl).toContain("X-Amz-Credential=bb")
|
||||
expect(res.body.signedUrl).toContain("X-Amz-Date=")
|
||||
expect(res.body.signedUrl).toContain("X-Amz-Signature=")
|
||||
expect(res.body.signedUrl).toContain("X-Amz-Expires=900")
|
||||
expect(res.body.signedUrl).toContain("X-Amz-SignedHeaders=host")
|
||||
|
||||
expect(res.body.publicUrl).toEqual(
|
||||
`https://${bucket}.s3.eu-west-1.amazonaws.com/${key}`
|
||||
)
|
||||
|
|
|
@ -12789,10 +12789,10 @@ html-tag@^2.0.0:
|
|||
is-self-closing "^1.0.1"
|
||||
kind-of "^6.0.0"
|
||||
|
||||
html5-qrcode@^2.2.1:
|
||||
version "2.3.7"
|
||||
resolved "https://registry.yarnpkg.com/html5-qrcode/-/html5-qrcode-2.3.7.tgz#09ed2ca7473a47bd551088c15fcfcb7cb409a5be"
|
||||
integrity sha512-Jmlok9Ynm49hgVXkdupWryf8o430proIFoQsRl1LmTg4Rq461W72omylR9yw9tsEMtswMEw3wacUM5y0agOBQA==
|
||||
html5-qrcode@^2.3.8:
|
||||
version "2.3.8"
|
||||
resolved "https://registry.yarnpkg.com/html5-qrcode/-/html5-qrcode-2.3.8.tgz#0b0cdf7a9926cfd4be530e13a51db47592adfa0d"
|
||||
integrity sha512-jsr4vafJhwoLVEDW3n1KvPnCCXWaQfRng0/EEYk1vNcQGcG/htAdhJX0be8YyqMoSz7+hZvOZSTAepsabiuhiQ==
|
||||
|
||||
htmlparser2@^8.0.0:
|
||||
version "8.0.1"
|
||||
|
|
Loading…
Reference in New Issue