@operato/scene-label 1.0.0-alpha.2 → 1.0.0-alpha.22

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.
Files changed (34) hide show
  1. package/CHANGELOG.md +158 -13
  2. package/assets/favicon.ico +0 -0
  3. package/assets/images/spinner.png +0 -0
  4. package/dist/barcode-scanner.d.ts +1 -1
  5. package/dist/barcode-scanner.js +22 -2
  6. package/dist/barcode-scanner.js.map +1 -1
  7. package/dist/barcode.d.ts +1 -1
  8. package/dist/barcode.js +1 -1
  9. package/dist/barcode.js.map +1 -1
  10. package/dist/label-printer.d.ts +1 -1
  11. package/dist/label-printer.js +12 -5
  12. package/dist/label-printer.js.map +1 -1
  13. package/helps/scene/component/barcode-scanner.ko.md +19 -1
  14. package/helps/scene/component/barcode-scanner.md +18 -0
  15. package/helps/scene/component/barcode-scanner.zh.md +20 -2
  16. package/helps/scene/component/label-printer.ko.md +6 -4
  17. package/helps/scene/component/label-printer.md +11 -11
  18. package/helps/scene/component/label-printer.zh.md +15 -13
  19. package/logs/.08636eb59927f12972f6774f5947c8507b3564c2-audit.json +15 -0
  20. package/logs/.5e5d741d8b7784a2fbad65eedc0fd46946aaf6f2-audit.json +30 -0
  21. package/logs/application-2022-06-15-23.log +4 -0
  22. package/logs/connections-2022-06-09-23.log +70 -0
  23. package/logs/connections-2022-06-13-11.log +35 -0
  24. package/logs/connections-2022-06-13-12.log +35 -0
  25. package/logs/connections-2022-06-15-23.log +35 -0
  26. package/package.json +7 -7
  27. package/src/barcode-scanner.ts +24 -2
  28. package/src/barcode.ts +1 -1
  29. package/src/label-printer.ts +13 -6
  30. package/translations/en.json +5 -1
  31. package/translations/ko.json +5 -1
  32. package/translations/ms.json +6 -2
  33. package/translations/zh.json +8 -4
  34. package/tsconfig.tsbuildinfo +1 -1
@@ -23,15 +23,15 @@ It is a function that utilizes [WebUSB API] (https://developer.mozilla.org/en-US
23
23
 
24
24
  ## properties
25
25
 
26
- - vendor id
27
- - Set the ID of the printer vendor connected to the USB port.
28
- -For example, Zebra's Vendor ID is '0x0A5F'.
29
- - This is not a required field, and if it is not entered, the Zebra Vendor ID is used by default.
30
- - You can select the target printer from the print connection list that pops up in the browser at the time of printing.
31
-
32
- - board id
33
- - Select the board you want to print.
34
-
26
+ - vendor id (vendorId)
27
+ - Set the ID of the printer vendor connected to the USB port.
28
+ -For example, Zebra's Vendor ID is '0x0A5F'.
29
+ - This is not a required field, and if it is not entered, the Zebra Vendor ID is used by default.
30
+ - You can select the target printer from the print connection list that pops up in the browser at the time of printing.
31
+ - board id (boardId)
32
+ - Select the board you want to print.
33
+ - copies (copies)
34
+ - Set how many copies to print (default value is 1)
35
35
  - value
36
- - The property connected to the value of this component is 'data'.
37
- - If the value is not an object or is empty, it is not printed.
36
+ - The property connected to the value of this component is 'data'.
37
+ - If the value is not an object or is empty, it is not printed.
@@ -1,14 +1,14 @@
1
1
  # label printer
2
2
 
3
- 它是将给定标签板打印到通过USB连接的打印机的组件。
4
- 当前,Zebra的ZPL仅支持通过图像(GRF格式)命令进行打印。
5
- 因此,如果目标打印机必须是Zebra兼容型号,则它必须支持ZPL的图像(GRF格式)命令。
3
+ 它是将给定标签板打印到通过 USB 连接的打印机的组件。
4
+ 当前,Zebra ZPL 仅支持通过图像(GRF 格式)命令进行打印。
5
+ 因此,如果目标打印机必须是 Zebra 兼容型号,则它必须支持 ZPL 的图像(GRF 格式)命令。
6
6
 
7
7
  更改此组件的值或数据时,将激活打印输出功能。
8
8
  打印时,此组件的当前数据(或值)对象将作为目标板的数据进行传输。
9
9
 
10
10
  由于使用浏览器的[WebUSB API](https://developer.mozilla.org/en-US/docs/Web/API/USB)函数进行输出,因此仅当通过HTTPS连接时,输出函数才起作用。
11
- (如果主机是localhost,则输出功能会异常运行。)
11
+ (如果主机是 localhost,则输出功能会异常运行。)
12
12
 
13
13
  ## Browser Compatibility
14
14
 
@@ -23,13 +23,15 @@
23
23
 
24
24
  ## properties
25
25
 
26
- - vendor id(optional)
27
- - 设置连接到USB端口的打印机供应商的ID。
28
- - 例如,Zebra的供应商ID为'0x0A5F'。
29
- - 这不是必填字段,如果未输入,则默认使用Zebra供应商ID。
30
- - 可以从打印时在浏览器中弹出的打印连接列表中选择目标打印机。
31
- - board id
32
- - 选择要打印的Board.
26
+ - 供应商 id (vendorId - optional)
27
+ - 设置连接到 USB 端口的打印机供应商的 ID。
28
+ - 例如,Zebra 的供应商 ID 为'0x0A5F'。
29
+ - 这不是必填字段,如果未输入,则默认使用 Zebra 供应商 ID。
30
+ - 可以从打印时在浏览器中弹出的打印连接列表中选择目标打印机。
31
+ - 看板 id (boardId)
32
+ - 选择要打印的 Board.
33
+ - 印数 (copies)
34
+ - 设置要打印的份数(默认值为 1)
33
35
  - value
34
- - 连接到该组件的Value的属性是“data”。
35
- - 如果value不是对象或为空,则不打印。.
36
+ - 连接到该组件的 Value 的属性是“data”。
37
+ - 如果 value 不是对象或为空,则不打印。.
@@ -0,0 +1,15 @@
1
+ {
2
+ "keep": {
3
+ "days": true,
4
+ "amount": 2
5
+ },
6
+ "auditLog": "logs/.08636eb59927f12972f6774f5947c8507b3564c2-audit.json",
7
+ "files": [
8
+ {
9
+ "date": 1655303853336,
10
+ "name": "logs/application-2022-06-15-23.log",
11
+ "hash": "5fbcab87863293d296cea03660b6f8e0"
12
+ }
13
+ ],
14
+ "hashType": "md5"
15
+ }
@@ -0,0 +1,30 @@
1
+ {
2
+ "keep": {
3
+ "days": true,
4
+ "amount": 14
5
+ },
6
+ "auditLog": "logs/.5e5d741d8b7784a2fbad65eedc0fd46946aaf6f2-audit.json",
7
+ "files": [
8
+ {
9
+ "date": 1654786072046,
10
+ "name": "logs/connections-2022-06-09-23.log",
11
+ "hash": "dc982bdad58359c9b1c76447610d9ceb"
12
+ },
13
+ {
14
+ "date": 1655088636982,
15
+ "name": "logs/connections-2022-06-13-11.log",
16
+ "hash": "3733cb7ff75e5d8102fbacbc79f01624"
17
+ },
18
+ {
19
+ "date": 1655089310214,
20
+ "name": "logs/connections-2022-06-13-12.log",
21
+ "hash": "e83be132f52656658db84ec623d9d32a"
22
+ },
23
+ {
24
+ "date": 1655303856041,
25
+ "name": "logs/connections-2022-06-15-23.log",
26
+ "hash": "5af0f50b481ddb11b0b0ff4cc83003aa"
27
+ }
28
+ ],
29
+ "hashType": "md5"
30
+ }
@@ -0,0 +1,4 @@
1
+ 2022-06-15T23:37:34+09:00 info: File Storage is Ready.
2
+ 2022-06-15T23:37:39+09:00 info: Database connection established
3
+ 2022-06-15T23:37:40+09:00 info: 🚀 Server ready at http://0.0.0.0:3000/graphql
4
+ 2022-06-15T23:37:40+09:00 info: 🚀 Subscriptions ready at ws://0.0.0.0:3000/subscriptions
@@ -0,0 +1,70 @@
1
+ 2022-06-09T23:48:19+09:00 info: Initializing ConnectionManager...
2
+ 2022-06-09T23:48:19+09:00 info: Connector 'echo-back-server' started to ready
3
+ 2022-06-09T23:48:19+09:00 info: Connector 'echo-back' started to ready
4
+ 2022-06-09T23:48:19+09:00 info: Connector 'http-connector' started to ready
5
+ 2022-06-09T23:48:19+09:00 info: Connector 'graphql-connector' started to ready
6
+ 2022-06-09T23:48:19+09:00 info: Connector 'sqlite-connector' started to ready
7
+ 2022-06-09T23:48:19+09:00 info: Connector 'postgresql-connector' started to ready
8
+ 2022-06-09T23:48:19+09:00 info: Connector 'mqtt-connector' started to ready
9
+ 2022-06-09T23:48:19+09:00 info: Connector 'mssql-connector' started to ready
10
+ 2022-06-09T23:48:19+09:00 info: Connector 'oracle-connector' started to ready
11
+ 2022-06-09T23:48:19+09:00 info: Connector 'mysql-connector' started to ready
12
+ 2022-06-09T23:48:19+09:00 info: Connector 'socket-server' started to ready
13
+ 2022-06-09T23:48:19+09:00 info: echo-back-servers are ready
14
+ 2022-06-09T23:48:19+09:00 info: echo-back connections are ready
15
+ 2022-06-09T23:48:19+09:00 info: http-connector connections are ready
16
+ 2022-06-09T23:48:19+09:00 info: graphql-connector connections are ready
17
+ 2022-06-09T23:48:19+09:00 info: sqlite-connector connections are ready
18
+ 2022-06-09T23:48:19+09:00 info: postgresql-connector connections are ready
19
+ 2022-06-09T23:48:19+09:00 info: mqtt-connector connections are ready
20
+ 2022-06-09T23:48:19+09:00 info: mssql-connector connections are ready
21
+ 2022-06-09T23:48:19+09:00 info: oracle-connector connections are ready
22
+ 2022-06-09T23:48:19+09:00 info: mysql-connector connections are ready
23
+ 2022-06-09T23:48:19+09:00 info: socket servers are ready
24
+ 2022-06-09T23:48:19+09:00 info: All connector for 'echo-back-server' ready
25
+ 2022-06-09T23:48:19+09:00 info: All connector for 'echo-back' ready
26
+ 2022-06-09T23:48:19+09:00 info: All connector for 'http-connector' ready
27
+ 2022-06-09T23:48:19+09:00 info: All connector for 'graphql-connector' ready
28
+ 2022-06-09T23:48:19+09:00 info: All connector for 'sqlite-connector' ready
29
+ 2022-06-09T23:48:19+09:00 info: All connector for 'postgresql-connector' ready
30
+ 2022-06-09T23:48:19+09:00 info: All connector for 'mqtt-connector' ready
31
+ 2022-06-09T23:48:19+09:00 info: All connector for 'mssql-connector' ready
32
+ 2022-06-09T23:48:19+09:00 info: All connector for 'oracle-connector' ready
33
+ 2022-06-09T23:48:19+09:00 info: All connector for 'mysql-connector' ready
34
+ 2022-06-09T23:48:19+09:00 info: All connector for 'socket-server' ready
35
+ 2022-06-09T23:48:19+09:00 info: ConnectionManager initialization done:
36
+ 2022-06-09T23:59:55+09:00 info: Initializing ConnectionManager...
37
+ 2022-06-09T23:59:55+09:00 info: Connector 'echo-back-server' started to ready
38
+ 2022-06-09T23:59:55+09:00 info: Connector 'echo-back' started to ready
39
+ 2022-06-09T23:59:55+09:00 info: Connector 'http-connector' started to ready
40
+ 2022-06-09T23:59:55+09:00 info: Connector 'graphql-connector' started to ready
41
+ 2022-06-09T23:59:55+09:00 info: Connector 'sqlite-connector' started to ready
42
+ 2022-06-09T23:59:55+09:00 info: Connector 'postgresql-connector' started to ready
43
+ 2022-06-09T23:59:55+09:00 info: Connector 'mqtt-connector' started to ready
44
+ 2022-06-09T23:59:55+09:00 info: Connector 'mssql-connector' started to ready
45
+ 2022-06-09T23:59:55+09:00 info: Connector 'oracle-connector' started to ready
46
+ 2022-06-09T23:59:55+09:00 info: Connector 'mysql-connector' started to ready
47
+ 2022-06-09T23:59:55+09:00 info: Connector 'socket-server' started to ready
48
+ 2022-06-09T23:59:55+09:00 info: echo-back-servers are ready
49
+ 2022-06-09T23:59:55+09:00 info: echo-back connections are ready
50
+ 2022-06-09T23:59:55+09:00 info: http-connector connections are ready
51
+ 2022-06-09T23:59:55+09:00 info: graphql-connector connections are ready
52
+ 2022-06-09T23:59:55+09:00 info: sqlite-connector connections are ready
53
+ 2022-06-09T23:59:55+09:00 info: postgresql-connector connections are ready
54
+ 2022-06-09T23:59:55+09:00 info: mqtt-connector connections are ready
55
+ 2022-06-09T23:59:55+09:00 info: mssql-connector connections are ready
56
+ 2022-06-09T23:59:55+09:00 info: oracle-connector connections are ready
57
+ 2022-06-09T23:59:55+09:00 info: mysql-connector connections are ready
58
+ 2022-06-09T23:59:55+09:00 info: socket servers are ready
59
+ 2022-06-09T23:59:55+09:00 info: All connector for 'echo-back-server' ready
60
+ 2022-06-09T23:59:55+09:00 info: All connector for 'echo-back' ready
61
+ 2022-06-09T23:59:55+09:00 info: All connector for 'http-connector' ready
62
+ 2022-06-09T23:59:55+09:00 info: All connector for 'graphql-connector' ready
63
+ 2022-06-09T23:59:55+09:00 info: All connector for 'sqlite-connector' ready
64
+ 2022-06-09T23:59:55+09:00 info: All connector for 'postgresql-connector' ready
65
+ 2022-06-09T23:59:55+09:00 info: All connector for 'mqtt-connector' ready
66
+ 2022-06-09T23:59:55+09:00 info: All connector for 'mssql-connector' ready
67
+ 2022-06-09T23:59:55+09:00 info: All connector for 'oracle-connector' ready
68
+ 2022-06-09T23:59:55+09:00 info: All connector for 'mysql-connector' ready
69
+ 2022-06-09T23:59:55+09:00 info: All connector for 'socket-server' ready
70
+ 2022-06-09T23:59:55+09:00 info: ConnectionManager initialization done:
@@ -0,0 +1,35 @@
1
+ 2022-06-13T11:50:42+09:00 info: Initializing ConnectionManager...
2
+ 2022-06-13T11:50:42+09:00 info: Connector 'echo-back-server' started to ready
3
+ 2022-06-13T11:50:42+09:00 info: Connector 'echo-back' started to ready
4
+ 2022-06-13T11:50:42+09:00 info: Connector 'http-connector' started to ready
5
+ 2022-06-13T11:50:42+09:00 info: Connector 'graphql-connector' started to ready
6
+ 2022-06-13T11:50:42+09:00 info: Connector 'sqlite-connector' started to ready
7
+ 2022-06-13T11:50:42+09:00 info: Connector 'postgresql-connector' started to ready
8
+ 2022-06-13T11:50:42+09:00 info: Connector 'mqtt-connector' started to ready
9
+ 2022-06-13T11:50:42+09:00 info: Connector 'mssql-connector' started to ready
10
+ 2022-06-13T11:50:42+09:00 info: Connector 'oracle-connector' started to ready
11
+ 2022-06-13T11:50:42+09:00 info: Connector 'mysql-connector' started to ready
12
+ 2022-06-13T11:50:42+09:00 info: Connector 'socket-server' started to ready
13
+ 2022-06-13T11:50:42+09:00 info: echo-back-servers are ready
14
+ 2022-06-13T11:50:42+09:00 info: echo-back connections are ready
15
+ 2022-06-13T11:50:42+09:00 info: http-connector connections are ready
16
+ 2022-06-13T11:50:42+09:00 info: graphql-connector connections are ready
17
+ 2022-06-13T11:50:42+09:00 info: sqlite-connector connections are ready
18
+ 2022-06-13T11:50:42+09:00 info: postgresql-connector connections are ready
19
+ 2022-06-13T11:50:42+09:00 info: mqtt-connector connections are ready
20
+ 2022-06-13T11:50:42+09:00 info: mssql-connector connections are ready
21
+ 2022-06-13T11:50:42+09:00 info: oracle-connector connections are ready
22
+ 2022-06-13T11:50:42+09:00 info: mysql-connector connections are ready
23
+ 2022-06-13T11:50:42+09:00 info: socket servers are ready
24
+ 2022-06-13T11:50:42+09:00 info: All connector for 'echo-back-server' ready
25
+ 2022-06-13T11:50:42+09:00 info: All connector for 'echo-back' ready
26
+ 2022-06-13T11:50:42+09:00 info: All connector for 'http-connector' ready
27
+ 2022-06-13T11:50:42+09:00 info: All connector for 'graphql-connector' ready
28
+ 2022-06-13T11:50:42+09:00 info: All connector for 'sqlite-connector' ready
29
+ 2022-06-13T11:50:42+09:00 info: All connector for 'postgresql-connector' ready
30
+ 2022-06-13T11:50:42+09:00 info: All connector for 'mqtt-connector' ready
31
+ 2022-06-13T11:50:42+09:00 info: All connector for 'mssql-connector' ready
32
+ 2022-06-13T11:50:42+09:00 info: All connector for 'oracle-connector' ready
33
+ 2022-06-13T11:50:42+09:00 info: All connector for 'mysql-connector' ready
34
+ 2022-06-13T11:50:42+09:00 info: All connector for 'socket-server' ready
35
+ 2022-06-13T11:50:42+09:00 info: ConnectionManager initialization done:
@@ -0,0 +1,35 @@
1
+ 2022-06-13T12:01:55+09:00 info: Initializing ConnectionManager...
2
+ 2022-06-13T12:01:55+09:00 info: Connector 'echo-back-server' started to ready
3
+ 2022-06-13T12:01:55+09:00 info: Connector 'echo-back' started to ready
4
+ 2022-06-13T12:01:55+09:00 info: Connector 'http-connector' started to ready
5
+ 2022-06-13T12:01:55+09:00 info: Connector 'graphql-connector' started to ready
6
+ 2022-06-13T12:01:55+09:00 info: Connector 'sqlite-connector' started to ready
7
+ 2022-06-13T12:01:55+09:00 info: Connector 'postgresql-connector' started to ready
8
+ 2022-06-13T12:01:55+09:00 info: Connector 'mqtt-connector' started to ready
9
+ 2022-06-13T12:01:55+09:00 info: Connector 'mssql-connector' started to ready
10
+ 2022-06-13T12:01:55+09:00 info: Connector 'oracle-connector' started to ready
11
+ 2022-06-13T12:01:55+09:00 info: Connector 'mysql-connector' started to ready
12
+ 2022-06-13T12:01:55+09:00 info: Connector 'socket-server' started to ready
13
+ 2022-06-13T12:01:55+09:00 info: echo-back-servers are ready
14
+ 2022-06-13T12:01:55+09:00 info: echo-back connections are ready
15
+ 2022-06-13T12:01:55+09:00 info: http-connector connections are ready
16
+ 2022-06-13T12:01:55+09:00 info: graphql-connector connections are ready
17
+ 2022-06-13T12:01:55+09:00 info: sqlite-connector connections are ready
18
+ 2022-06-13T12:01:55+09:00 info: postgresql-connector connections are ready
19
+ 2022-06-13T12:01:55+09:00 info: mqtt-connector connections are ready
20
+ 2022-06-13T12:01:55+09:00 info: mssql-connector connections are ready
21
+ 2022-06-13T12:01:55+09:00 info: oracle-connector connections are ready
22
+ 2022-06-13T12:01:55+09:00 info: mysql-connector connections are ready
23
+ 2022-06-13T12:01:55+09:00 info: socket servers are ready
24
+ 2022-06-13T12:01:55+09:00 info: All connector for 'echo-back-server' ready
25
+ 2022-06-13T12:01:55+09:00 info: All connector for 'echo-back' ready
26
+ 2022-06-13T12:01:55+09:00 info: All connector for 'http-connector' ready
27
+ 2022-06-13T12:01:55+09:00 info: All connector for 'graphql-connector' ready
28
+ 2022-06-13T12:01:55+09:00 info: All connector for 'sqlite-connector' ready
29
+ 2022-06-13T12:01:55+09:00 info: All connector for 'postgresql-connector' ready
30
+ 2022-06-13T12:01:55+09:00 info: All connector for 'mqtt-connector' ready
31
+ 2022-06-13T12:01:55+09:00 info: All connector for 'mssql-connector' ready
32
+ 2022-06-13T12:01:55+09:00 info: All connector for 'oracle-connector' ready
33
+ 2022-06-13T12:01:55+09:00 info: All connector for 'mysql-connector' ready
34
+ 2022-06-13T12:01:55+09:00 info: All connector for 'socket-server' ready
35
+ 2022-06-13T12:01:55+09:00 info: ConnectionManager initialization done:
@@ -0,0 +1,35 @@
1
+ 2022-06-15T23:37:40+09:00 info: Initializing ConnectionManager...
2
+ 2022-06-15T23:37:40+09:00 info: Connector 'echo-back-server' started to ready
3
+ 2022-06-15T23:37:40+09:00 info: Connector 'echo-back' started to ready
4
+ 2022-06-15T23:37:40+09:00 info: Connector 'http-connector' started to ready
5
+ 2022-06-15T23:37:40+09:00 info: Connector 'graphql-connector' started to ready
6
+ 2022-06-15T23:37:40+09:00 info: Connector 'sqlite-connector' started to ready
7
+ 2022-06-15T23:37:40+09:00 info: Connector 'postgresql-connector' started to ready
8
+ 2022-06-15T23:37:40+09:00 info: Connector 'mqtt-connector' started to ready
9
+ 2022-06-15T23:37:40+09:00 info: Connector 'mssql-connector' started to ready
10
+ 2022-06-15T23:37:40+09:00 info: Connector 'oracle-connector' started to ready
11
+ 2022-06-15T23:37:40+09:00 info: Connector 'mysql-connector' started to ready
12
+ 2022-06-15T23:37:40+09:00 info: Connector 'socket-server' started to ready
13
+ 2022-06-15T23:37:40+09:00 info: echo-back-servers are ready
14
+ 2022-06-15T23:37:40+09:00 info: echo-back connections are ready
15
+ 2022-06-15T23:37:40+09:00 info: http-connector connections are ready
16
+ 2022-06-15T23:37:40+09:00 info: graphql-connector connections are ready
17
+ 2022-06-15T23:37:40+09:00 info: sqlite-connector connections are ready
18
+ 2022-06-15T23:37:40+09:00 info: postgresql-connector connections are ready
19
+ 2022-06-15T23:37:40+09:00 info: mqtt-connector connections are ready
20
+ 2022-06-15T23:37:40+09:00 info: mssql-connector connections are ready
21
+ 2022-06-15T23:37:40+09:00 info: oracle-connector connections are ready
22
+ 2022-06-15T23:37:40+09:00 info: mysql-connector connections are ready
23
+ 2022-06-15T23:37:40+09:00 info: socket servers are ready
24
+ 2022-06-15T23:37:40+09:00 info: All connector for 'echo-back-server' ready
25
+ 2022-06-15T23:37:40+09:00 info: All connector for 'echo-back' ready
26
+ 2022-06-15T23:37:40+09:00 info: All connector for 'http-connector' ready
27
+ 2022-06-15T23:37:40+09:00 info: All connector for 'graphql-connector' ready
28
+ 2022-06-15T23:37:40+09:00 info: All connector for 'sqlite-connector' ready
29
+ 2022-06-15T23:37:40+09:00 info: All connector for 'postgresql-connector' ready
30
+ 2022-06-15T23:37:40+09:00 info: All connector for 'mqtt-connector' ready
31
+ 2022-06-15T23:37:40+09:00 info: All connector for 'mssql-connector' ready
32
+ 2022-06-15T23:37:40+09:00 info: All connector for 'oracle-connector' ready
33
+ 2022-06-15T23:37:40+09:00 info: All connector for 'mysql-connector' ready
34
+ 2022-06-15T23:37:40+09:00 info: All connector for 'socket-server' ready
35
+ 2022-06-15T23:37:40+09:00 info: ConnectionManager initialization done:
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@operato/scene-label",
3
3
  "description": "Barcode Label component for things-scene",
4
- "version": "1.0.0-alpha.2",
4
+ "version": "1.0.0-alpha.22",
5
5
  "things-scene": true,
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -26,15 +26,15 @@
26
26
  "migration": "things-factory-migration"
27
27
  },
28
28
  "dependencies": {
29
- "@hatiolab/things-scene": "^2.7.34",
30
- "@operato/input": "^1.0.0-alpha.14",
29
+ "@hatiolab/things-scene": "^3.0.13",
30
+ "@operato/input": "^1.0.0-beta.33",
31
31
  "bwip-js": "^3.0.4"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@hatiolab/prettier-config": "^1.0.0",
35
- "@operato/board": "^1.0.0-alpha.14",
36
- "@things-factory/builder": "^5.0.0-alpha.5",
37
- "@things-factory/operato-board": "^5.0.0-alpha.5",
35
+ "@operato/board": "^1.0.0-beta.33",
36
+ "@things-factory/builder": "^5.0.0-zeta.1",
37
+ "@things-factory/operato-board": "^5.0.0-zeta.1",
38
38
  "@types/codemirror": "^5.60.5",
39
39
  "@types/w3c-web-usb": "^1.0.5",
40
40
  "@typescript-eslint/eslint-plugin": "^4.33.0",
@@ -61,5 +61,5 @@
61
61
  "prettier --write"
62
62
  ]
63
63
  },
64
- "gitHead": "5cdd6fef45cb25cbc17638b400443d93592a6136"
64
+ "gitHead": "5d982a9a5803854d809093925be1c1888ff9eff8"
65
65
  }
@@ -9,14 +9,30 @@ const NATURE: ComponentNature = {
9
9
  mutable: false,
10
10
  resizable: true,
11
11
  rotatable: true,
12
- properties: [],
12
+ properties: [
13
+ {
14
+ type: 'checkbox',
15
+ label: 'without-enter',
16
+ name: 'withoutEnter'
17
+ },
18
+ {
19
+ type: 'checkbox',
20
+ label: 'english-only',
21
+ name: 'englishOnly'
22
+ },
23
+ {
24
+ type: 'checkbox',
25
+ label: 'select-after-change',
26
+ name: 'selectAfterChange'
27
+ }
28
+ ],
13
29
  help: 'scene/component/barcode-scanner'
14
30
  }
15
31
 
16
32
  export default class BarcodeScanner extends HTMLOverlayElement {
17
33
  private _data: any
18
34
 
19
- static get nature() {
35
+ get nature() {
20
36
  return NATURE
21
37
  }
22
38
 
@@ -55,6 +71,12 @@ export default class BarcodeScanner extends HTMLOverlayElement {
55
71
  }
56
72
 
57
73
  setElementProperties(input: OxInputBarcode) {
74
+ const { withoutEnter = false, englishOnly = false, selectAfterChange = false } = this.state
75
+
76
+ input.withoutEnter = withoutEnter
77
+ input.englishOnly = englishOnly
78
+ input.selectAfterChange = selectAfterChange
79
+
58
80
  input.value = this._data = this.text
59
81
  }
60
82
 
package/src/barcode.ts CHANGED
@@ -243,7 +243,7 @@ export default class Barcode extends RectPath(Shape) {
243
243
  private _canvas?: HTMLCanvasElement
244
244
  private _image: any
245
245
 
246
- static get nature() {
246
+ get nature() {
247
247
  return NATURE
248
248
  }
249
249
 
@@ -39,6 +39,11 @@ const NATURE: ComponentNature = {
39
39
  type: 'board-selector',
40
40
  label: 'board id',
41
41
  name: 'boardId'
42
+ },
43
+ {
44
+ type: 'number',
45
+ label: 'copies',
46
+ name: 'copies'
42
47
  }
43
48
  ],
44
49
  'value-property': 'data',
@@ -49,10 +54,6 @@ export default class LabelPrinter extends RectPath(Shape) {
49
54
  private static _image: HTMLImageElement
50
55
  private printer?: USBPrinter | BrowserPrinter
51
56
 
52
- static get nature() {
53
- return NATURE
54
- }
55
-
56
57
  static get image() {
57
58
  if (!LabelPrinter._image) {
58
59
  LabelPrinter._image = new Image()
@@ -62,6 +63,10 @@ export default class LabelPrinter extends RectPath(Shape) {
62
63
  return LabelPrinter._image
63
64
  }
64
65
 
66
+ get nature() {
67
+ return NATURE
68
+ }
69
+
65
70
  dispose() {
66
71
  super.dispose()
67
72
  }
@@ -98,7 +103,7 @@ export default class LabelPrinter extends RectPath(Shape) {
98
103
  return
99
104
  }
100
105
 
101
- var { directPrinter, boardId, vendorId } = this.state
106
+ var { directPrinter, boardId, vendorId, copies = 1 } = this.state
102
107
 
103
108
  var searchParams = new URLSearchParams()
104
109
  for (var key in data) {
@@ -126,7 +131,9 @@ export default class LabelPrinter extends RectPath(Shape) {
126
131
  : new BrowserPrinter()
127
132
  }
128
133
 
129
- await this.printer.print(command)
134
+ for (var i = 0; i < copies; i++) {
135
+ await this.printer.print(command)
136
+ }
130
137
  } catch (err) {
131
138
  throw new Error(err as string)
132
139
  }
@@ -5,5 +5,9 @@
5
5
  "label.paddingwidth": "padding-w",
6
6
  "label.paddingheight": "padding-h",
7
7
  "label.vendor id": "vendor id",
8
- "label.board id": "board id"
8
+ "label.board id": "board id",
9
+ "label.copies": "copies",
10
+ "label.without-enter": "without enter key",
11
+ "label.english-only": "english input only",
12
+ "label.select-after-change": "select over change"
9
13
  }
@@ -5,5 +5,9 @@
5
5
  "label.paddingwidth": "패딩폭",
6
6
  "label.paddingheight": "패딩높이",
7
7
  "label.vendor id": "공급자 ID",
8
- "label.board id": "보드 ID"
8
+ "label.board id": "보드 ID",
9
+ "label.copies": "프린트 매수",
10
+ "label.without-enter": "스캔시 엔터키 붙이지않음",
11
+ "label.english-only": "영어만 입력받음",
12
+ "label.select-after-change": "변경후 전체 선택"
9
13
  }
@@ -5,5 +5,9 @@
5
5
  "label.paddingwidth": "padding-w",
6
6
  "label.paddingheight": "padding-h",
7
7
  "label.vendor id": "penjual id",
8
- "label.board id": "board id"
9
- }
8
+ "label.board id": "board id",
9
+ "label.copies": "copies",
10
+ "label.without-enter": "[ms] without enter key",
11
+ "label.english-only": "[ms] english input only",
12
+ "label.select-after-change": "[ms] select over change"
13
+ }
@@ -1,9 +1,13 @@
1
1
  {
2
- "label.direct-printer": "[zh] direct printer",
3
- "label.monochrome": "[zh] monochrome",
2
+ "label.direct-printer": "direct printer",
3
+ "label.monochrome": "单色",
4
4
  "label.symbol": "符号",
5
5
  "label.paddingwidth": "间隔-w",
6
6
  "label.paddingheight": "间隔-h",
7
7
  "label.vendor id": "供应商 id",
8
- "label.board id": "看板 id"
9
- }
8
+ "label.board id": "看板 id",
9
+ "label.copies": "印数",
10
+ "label.without-enter": "没有回车键",
11
+ "label.english-only": "仅英文输入",
12
+ "label.select-after-change": "选择过度变化"
13
+ }