@lowdefy/blocks-qr 4.0.0-rc.8 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/blocks/QRScanner/QRScanner.js +3 -3
- package/dist/blocks.js +1 -1
- package/dist/types.js +3 -3
- package/package.json +17 -19
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Copyright 2020-
|
|
2
|
+
Copyright 2020-2024 Lowdefy, Inc
|
|
3
3
|
|
|
4
4
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
you may not use this file except in compliance with the License.
|
|
@@ -45,7 +45,7 @@ let QRScanner = class QRScanner extends React.Component {
|
|
|
45
45
|
if (!this.scanning) {
|
|
46
46
|
this.scanning = true;
|
|
47
47
|
this.html5QrCode?.start({
|
|
48
|
-
facingMode: this.props.properties.facingMode
|
|
48
|
+
facingMode: this.props.properties.facingMode ?? 'environment'
|
|
49
49
|
}, {
|
|
50
50
|
...{
|
|
51
51
|
aspectRatio: 1
|
|
@@ -75,7 +75,7 @@ let QRScanner = class QRScanner extends React.Component {
|
|
|
75
75
|
this.onStop();
|
|
76
76
|
}
|
|
77
77
|
render() {
|
|
78
|
-
const { blockId
|
|
78
|
+
const { blockId, properties, methods } = this.props;
|
|
79
79
|
return /*#__PURE__*/ React.createElement("div", {
|
|
80
80
|
id: blockId,
|
|
81
81
|
className: methods.makeCssClass([
|
package/dist/blocks.js
CHANGED
package/dist/types.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable import/namespace */ /*
|
|
2
|
-
Copyright 2020-
|
|
2
|
+
Copyright 2020-2024 Lowdefy, Inc
|
|
3
3
|
|
|
4
4
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
you may not use this file except in compliance with the License.
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
const icons = {};
|
|
17
17
|
const styles = {};
|
|
18
18
|
Object.keys(blocks).forEach((block)=>{
|
|
19
|
-
icons[block] = blocks[block].meta.icons
|
|
20
|
-
styles[block] = blocks[block].meta.styles
|
|
19
|
+
icons[block] = blocks[block].meta.icons ?? [];
|
|
20
|
+
styles[block] = blocks[block].meta.styles ?? [];
|
|
21
21
|
});
|
|
22
22
|
export default {
|
|
23
23
|
blocks: Object.keys(blocks),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lowdefy/blocks-qr",
|
|
3
|
-
"version": "4.0.0
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Lowdefy qr blocks.",
|
|
6
6
|
"homepage": "https://lowdefy.com",
|
|
@@ -40,36 +40,34 @@
|
|
|
40
40
|
"files": [
|
|
41
41
|
"dist/*"
|
|
42
42
|
],
|
|
43
|
-
"scripts": {
|
|
44
|
-
"build": "swc src --out-dir dist --config-file ../../../../.swcrc --delete-dir-on-start && pnpm copyfiles",
|
|
45
|
-
"clean": "rm -rf dist",
|
|
46
|
-
"copyfiles": "copyfiles -u 1 \"./src/**/*\" dist -e \"./src/**/*.js\" -e \"./src/**/*.yaml\" -e \"./src/**/*.snap\"",
|
|
47
|
-
"prepublishOnly": "pnpm build",
|
|
48
|
-
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js"
|
|
49
|
-
},
|
|
50
43
|
"dependencies": {
|
|
51
|
-
"@lowdefy/block-utils": "4.0.0
|
|
52
|
-
"html5-qrcode": "2.
|
|
44
|
+
"@lowdefy/block-utils": "4.0.0",
|
|
45
|
+
"html5-qrcode": "2.3.8",
|
|
53
46
|
"react": "18.2.0",
|
|
54
47
|
"react-dom": "18.2.0"
|
|
55
48
|
},
|
|
56
49
|
"devDependencies": {
|
|
57
50
|
"@emotion/jest": "11.10.5",
|
|
58
|
-
"@lowdefy/block-dev": "4.0.0
|
|
59
|
-
"@lowdefy/jest-yaml-transform": "4.0.0
|
|
60
|
-
"@swc/cli": "0.1.
|
|
61
|
-
"@swc/core": "1.3.
|
|
62
|
-
"@swc/jest": "0.2.
|
|
51
|
+
"@lowdefy/block-dev": "4.0.0",
|
|
52
|
+
"@lowdefy/jest-yaml-transform": "4.0.0",
|
|
53
|
+
"@swc/cli": "0.1.63",
|
|
54
|
+
"@swc/core": "1.3.99",
|
|
55
|
+
"@swc/jest": "0.2.29",
|
|
63
56
|
"@testing-library/dom": "8.19.1",
|
|
64
57
|
"@testing-library/react": "13.4.0",
|
|
65
58
|
"@testing-library/user-event": "14.4.3",
|
|
66
59
|
"copyfiles": "2.4.1",
|
|
67
|
-
"jest": "28.1.
|
|
68
|
-
"jest-environment-jsdom": "28.1.
|
|
60
|
+
"jest": "28.1.3",
|
|
61
|
+
"jest-environment-jsdom": "28.1.3",
|
|
69
62
|
"jest-serializer-html": "7.1.0"
|
|
70
63
|
},
|
|
71
64
|
"publishConfig": {
|
|
72
65
|
"access": "public"
|
|
73
66
|
},
|
|
74
|
-
"
|
|
75
|
-
|
|
67
|
+
"scripts": {
|
|
68
|
+
"build": "swc src --out-dir dist --config-file ../../../../.swcrc --delete-dir-on-start && pnpm copyfiles",
|
|
69
|
+
"clean": "rm -rf dist",
|
|
70
|
+
"copyfiles": "copyfiles -u 1 \"./src/**/*\" dist -e \"./src/**/*.js\" -e \"./src/**/*.yaml\" -e \"./src/**/*.snap\"",
|
|
71
|
+
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js"
|
|
72
|
+
}
|
|
73
|
+
}
|