@operato/scene-manufacturing 1.3.17 → 1.3.18
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/CHANGELOG.md +9 -0
- package/cache/translations/system/en.json +1 -0
- package/cache/translations/system/ko.json +1 -0
- package/db.sqlite +0 -0
- package/dist/tact-timer.d.ts +7 -3
- package/dist/tact-timer.js +102 -21
- package/dist/tact-timer.js.map +1 -1
- package/dist/templates/index.d.ts +9 -0
- package/dist/templates/tact-timer.d.ts +9 -0
- package/dist/templates/tact-timer.js +10 -1
- package/dist/templates/tact-timer.js.map +1 -1
- package/helps/scene/component/manufacturing/tact-timer.ja.md +50 -16
- package/helps/scene/component/manufacturing/tact-timer.ko.md +61 -24
- package/helps/scene/component/manufacturing/tact-timer.md +52 -15
- package/helps/scene/component/manufacturing/tact-timer.ms.md +49 -12
- package/helps/scene/component/manufacturing/tact-timer.zh.md +50 -13
- package/icons/tact-timer-mask.svg +33 -0
- package/logs/.08636eb59927f12972f6774f5947c8507b3564c2-audit.json +23 -3
- package/logs/.5e5d741d8b7784a2fbad65eedc0fd46946aaf6f2-audit.json +25 -0
- package/logs/application-2024-07-05-08.log +105 -0
- package/logs/application-2024-07-05-12.log +105 -0
- package/logs/application-2024-07-06-01.log +105 -0
- package/logs/application-2024-07-06-03.log +105 -0
- package/logs/{application-2024-06-27-22.log → application-2024-07-06-11.log} +8 -9
- package/logs/connections-2024-07-05-08.log +50 -0
- package/logs/connections-2024-07-05-12.log +50 -0
- package/logs/connections-2024-07-06-01.log +50 -0
- package/logs/connections-2024-07-06-03.log +50 -0
- package/logs/connections-2024-07-06-11.log +47 -0
- package/package.json +2 -2
- package/src/tact-timer.ts +108 -27
- package/src/templates/tact-timer.ts +10 -1
- package/translations/en.json +5 -1
- package/translations/ja.json +6 -2
- package/translations/ko.json +5 -1
- package/translations/ms.json +6 -2
- package/translations/zh.json +6 -2
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
2024-07-06T03:38:24+09:00 info: File Storage is Ready.
|
|
2
|
+
2024-07-06T03:38:25+09:00 error: Error: Cannot find module 'oracledb'
|
|
3
|
+
Require stack:
|
|
4
|
+
- /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/engine/connector/oracle-connector.js
|
|
5
|
+
- /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/engine/connector/index.js
|
|
6
|
+
- /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/engine/index.js
|
|
7
|
+
- /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/index.js
|
|
8
|
+
- /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/env/lib/module-loader.js
|
|
9
|
+
- /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/env/index.js
|
|
10
|
+
- /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/shell/dist-server/server-dev.js
|
|
11
|
+
- /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/shell/bin/things-factory-dev
|
|
12
|
+
at Module._resolveFilename (node:internal/modules/cjs/loader:1145:15)
|
|
13
|
+
at Module._load (node:internal/modules/cjs/loader:986:27)
|
|
14
|
+
at Module.require (node:internal/modules/cjs/loader:1233:19)
|
|
15
|
+
at require (node:internal/modules/helpers:179:18)
|
|
16
|
+
at Object.<anonymous> (/Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/engine/connector/oracle-connector.js:7:20)
|
|
17
|
+
at Module._compile (node:internal/modules/cjs/loader:1358:14)
|
|
18
|
+
at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
|
|
19
|
+
at Module.load (node:internal/modules/cjs/loader:1208:32)
|
|
20
|
+
at Module._load (node:internal/modules/cjs/loader:1024:12)
|
|
21
|
+
at Module.require (node:internal/modules/cjs/loader:1233:19)
|
|
22
|
+
at require (node:internal/modules/helpers:179:18)
|
|
23
|
+
at Object.<anonymous> (/Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/engine/connector/index.js:11:1)
|
|
24
|
+
at Module._compile (node:internal/modules/cjs/loader:1358:14)
|
|
25
|
+
at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
|
|
26
|
+
at Module.load (node:internal/modules/cjs/loader:1208:32)
|
|
27
|
+
at Module._load (node:internal/modules/cjs/loader:1024:12)
|
|
28
|
+
2024-07-06T03:38:25+09:00 error: Error: Cannot find module 'oracledb'
|
|
29
|
+
Require stack:
|
|
30
|
+
- /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/engine/task/oracle-procedure.js
|
|
31
|
+
- /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/engine/task/index.js
|
|
32
|
+
- /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/engine/index.js
|
|
33
|
+
- /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/index.js
|
|
34
|
+
- /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/env/lib/module-loader.js
|
|
35
|
+
- /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/env/index.js
|
|
36
|
+
- /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/shell/dist-server/server-dev.js
|
|
37
|
+
- /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/shell/bin/things-factory-dev
|
|
38
|
+
at Module._resolveFilename (node:internal/modules/cjs/loader:1145:15)
|
|
39
|
+
at Module._load (node:internal/modules/cjs/loader:986:27)
|
|
40
|
+
at Module.require (node:internal/modules/cjs/loader:1233:19)
|
|
41
|
+
at require (node:internal/modules/helpers:179:18)
|
|
42
|
+
at Object.<anonymous> (/Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/engine/task/oracle-procedure.js:9:20)
|
|
43
|
+
at Module._compile (node:internal/modules/cjs/loader:1358:14)
|
|
44
|
+
at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
|
|
45
|
+
at Module.load (node:internal/modules/cjs/loader:1208:32)
|
|
46
|
+
at Module._load (node:internal/modules/cjs/loader:1024:12)
|
|
47
|
+
at Module.require (node:internal/modules/cjs/loader:1233:19)
|
|
48
|
+
at require (node:internal/modules/helpers:179:18)
|
|
49
|
+
at Object.<anonymous> (/Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/engine/task/index.js:42:1)
|
|
50
|
+
at Module._compile (node:internal/modules/cjs/loader:1358:14)
|
|
51
|
+
at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
|
|
52
|
+
at Module.load (node:internal/modules/cjs/loader:1208:32)
|
|
53
|
+
at Module._load (node:internal/modules/cjs/loader:1024:12)
|
|
54
|
+
2024-07-06T03:38:25+09:00 error: Error: Cannot find module '@thiagoelg/node-printer'
|
|
55
|
+
Require stack:
|
|
56
|
+
- /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/board-service/dist-server/controllers/print.js
|
|
57
|
+
- /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/board-service/dist-server/controllers/index.js
|
|
58
|
+
- /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/board-service/dist-server/index.js
|
|
59
|
+
- /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/env/lib/module-loader.js
|
|
60
|
+
- /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/env/index.js
|
|
61
|
+
- /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/shell/dist-server/server-dev.js
|
|
62
|
+
- /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/shell/bin/things-factory-dev
|
|
63
|
+
at Module._resolveFilename (node:internal/modules/cjs/loader:1145:15)
|
|
64
|
+
at Module._load (node:internal/modules/cjs/loader:986:27)
|
|
65
|
+
at Module.require (node:internal/modules/cjs/loader:1233:19)
|
|
66
|
+
at require (node:internal/modules/helpers:179:18)
|
|
67
|
+
at Object.<anonymous> (/Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/board-service/dist-server/controllers/print.js:10:17)
|
|
68
|
+
at Module._compile (node:internal/modules/cjs/loader:1358:14)
|
|
69
|
+
at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
|
|
70
|
+
at Module.load (node:internal/modules/cjs/loader:1208:32)
|
|
71
|
+
at Module._load (node:internal/modules/cjs/loader:1024:12)
|
|
72
|
+
at Module.require (node:internal/modules/cjs/loader:1233:19)
|
|
73
|
+
at require (node:internal/modules/helpers:179:18)
|
|
74
|
+
at Object.<anonymous> (/Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/board-service/dist-server/controllers/index.js:4:17)
|
|
75
|
+
at Module._compile (node:internal/modules/cjs/loader:1358:14)
|
|
76
|
+
at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
|
|
77
|
+
at Module.load (node:internal/modules/cjs/loader:1208:32)
|
|
78
|
+
at Module._load (node:internal/modules/cjs/loader:1024:12)
|
|
79
|
+
2024-07-06T03:38:26+09:00 error: Error: Cannot find module '@thiagoelg/node-printer'
|
|
80
|
+
Require stack:
|
|
81
|
+
- /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/print-service/dist-server/middlewares/index.js
|
|
82
|
+
- /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/print-service/dist-server/index.js
|
|
83
|
+
- /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/env/lib/module-loader.js
|
|
84
|
+
- /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/env/index.js
|
|
85
|
+
- /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/shell/dist-server/server-dev.js
|
|
86
|
+
- /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/shell/bin/things-factory-dev
|
|
87
|
+
at Module._resolveFilename (node:internal/modules/cjs/loader:1145:15)
|
|
88
|
+
at Module._load (node:internal/modules/cjs/loader:986:27)
|
|
89
|
+
at Module.require (node:internal/modules/cjs/loader:1233:19)
|
|
90
|
+
at require (node:internal/modules/helpers:179:18)
|
|
91
|
+
at Object.<anonymous> (/Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/print-service/dist-server/middlewares/index.js:8:19)
|
|
92
|
+
at Module._compile (node:internal/modules/cjs/loader:1358:14)
|
|
93
|
+
at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
|
|
94
|
+
at Module.load (node:internal/modules/cjs/loader:1208:32)
|
|
95
|
+
at Module._load (node:internal/modules/cjs/loader:1024:12)
|
|
96
|
+
at Module.require (node:internal/modules/cjs/loader:1233:19)
|
|
97
|
+
at require (node:internal/modules/helpers:179:18)
|
|
98
|
+
at Object.<anonymous> (/Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/print-service/dist-server/index.js:4:22)
|
|
99
|
+
at Module._compile (node:internal/modules/cjs/loader:1358:14)
|
|
100
|
+
at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
|
|
101
|
+
at Module.load (node:internal/modules/cjs/loader:1208:32)
|
|
102
|
+
at Module._load (node:internal/modules/cjs/loader:1024:12)
|
|
103
|
+
2024-07-06T03:38:26+09:00 info: Default DataSource established
|
|
104
|
+
2024-07-06T03:38:27+09:00 info: 🚀 Server ready at http://0.0.0.0:3000/graphql
|
|
105
|
+
2024-07-06T03:38:27+09:00 info: 🚀 Subscriptions ready at ws://0.0.0.0:3000/graphql
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
2024-
|
|
2
|
-
2024-
|
|
3
|
-
2024-
|
|
4
|
-
2024-
|
|
1
|
+
2024-07-06T11:10:36+09:00 info: File Storage is Ready.
|
|
2
|
+
2024-07-06T11:10:36+09:00 error: oracledb module loading failed
|
|
3
|
+
2024-07-06T11:10:37+09:00 error: oracledb module loading failed
|
|
4
|
+
2024-07-06T11:10:37+09:00 error: Cannot find module '@thiagoelg/node-printer'
|
|
5
5
|
Require stack:
|
|
6
6
|
- /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/board-service/dist-server/controllers/print.js
|
|
7
7
|
- /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/board-service/dist-server/controllers/index.js
|
|
@@ -10,7 +10,7 @@ Require stack:
|
|
|
10
10
|
- /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/env/index.js
|
|
11
11
|
- /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/shell/dist-server/server-dev.js
|
|
12
12
|
- /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/shell/bin/things-factory-dev
|
|
13
|
-
2024-
|
|
13
|
+
2024-07-06T11:10:37+09:00 error: Cannot find module '@thiagoelg/node-printer'
|
|
14
14
|
Require stack:
|
|
15
15
|
- /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/print-service/dist-server/middlewares/index.js
|
|
16
16
|
- /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/print-service/dist-server/index.js
|
|
@@ -18,7 +18,6 @@ Require stack:
|
|
|
18
18
|
- /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/env/index.js
|
|
19
19
|
- /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/shell/dist-server/server-dev.js
|
|
20
20
|
- /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/shell/bin/things-factory-dev
|
|
21
|
-
2024-
|
|
22
|
-
2024-
|
|
23
|
-
2024-
|
|
24
|
-
2024-06-27T22:55:44+09:00 error: connect ECONNREFUSED 127.0.0.1:3000
|
|
21
|
+
2024-07-06T11:10:38+09:00 info: Default DataSource established
|
|
22
|
+
2024-07-06T11:10:39+09:00 info: 🚀 Server ready at http://0.0.0.0:3000/graphql
|
|
23
|
+
2024-07-06T11:10:39+09:00 info: 🚀 Subscriptions ready at ws://0.0.0.0:3000/graphql
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
2024-07-05T08:53:01+09:00 info: Initializing ConnectionManager...
|
|
2
|
+
2024-07-05T08:53:01+09:00 info: Connector 'echo-back-server' started to ready
|
|
3
|
+
2024-07-05T08:53:01+09:00 info: Connector 'echo-back' started to ready
|
|
4
|
+
2024-07-05T08:53:01+09:00 info: Connector 'http-connector' started to ready
|
|
5
|
+
2024-07-05T08:53:01+09:00 info: Connector 'graphql-connector' started to ready
|
|
6
|
+
2024-07-05T08:53:01+09:00 info: Connector 'sqlite-connector' started to ready
|
|
7
|
+
2024-07-05T08:53:01+09:00 info: Connector 'postgresql-connector' started to ready
|
|
8
|
+
2024-07-05T08:53:01+09:00 info: Connector 'mqtt-connector' started to ready
|
|
9
|
+
2024-07-05T08:53:01+09:00 info: Connector 'mssql-connector' started to ready
|
|
10
|
+
2024-07-05T08:53:01+09:00 info: Connector 'oracle-connector' started to ready
|
|
11
|
+
2024-07-05T08:53:01+09:00 info: Connector 'mysql-connector' started to ready
|
|
12
|
+
2024-07-05T08:53:01+09:00 info: Connector 'socket-server' started to ready
|
|
13
|
+
2024-07-05T08:53:01+09:00 info: Connector 'operato-connector' started to ready
|
|
14
|
+
2024-07-05T08:53:01+09:00 info: Connector 'email-connector' started to ready
|
|
15
|
+
2024-07-05T08:53:01+09:00 info: Connector 'influxdb-connector' started to ready
|
|
16
|
+
2024-07-05T08:53:01+09:00 info: Connector 'msgraph-connector' started to ready
|
|
17
|
+
2024-07-05T08:53:01+09:00 info: Connector 'proxy-connector' started to ready
|
|
18
|
+
2024-07-05T08:53:01+09:00 info: echo-back-servers are ready
|
|
19
|
+
2024-07-05T08:53:01+09:00 info: echo-back connections are ready
|
|
20
|
+
2024-07-05T08:53:01+09:00 info: http-connector connections are ready
|
|
21
|
+
2024-07-05T08:53:01+09:00 info: graphql-connector connections are ready
|
|
22
|
+
2024-07-05T08:53:01+09:00 info: sqlite-connector connections are ready
|
|
23
|
+
2024-07-05T08:53:01+09:00 info: postgresql-connector connections are ready
|
|
24
|
+
2024-07-05T08:53:01+09:00 info: mqtt-connector connections are ready
|
|
25
|
+
2024-07-05T08:53:01+09:00 info: mssql-connector connections are ready
|
|
26
|
+
2024-07-05T08:53:01+09:00 info: oracle-connector connections are ready
|
|
27
|
+
2024-07-05T08:53:01+09:00 info: mysql-connector connections are ready
|
|
28
|
+
2024-07-05T08:53:01+09:00 info: socket servers are ready
|
|
29
|
+
2024-07-05T08:53:01+09:00 info: operato-connector connections are ready
|
|
30
|
+
2024-07-05T08:53:01+09:00 info: email connections are ready
|
|
31
|
+
2024-07-05T08:53:01+09:00 info: influxdb connections are ready
|
|
32
|
+
2024-07-05T08:53:01+09:00 info: msgraph-connector connections are ready
|
|
33
|
+
2024-07-05T08:53:01+09:00 info: proxy-connector connections are ready
|
|
34
|
+
2024-07-05T08:53:01+09:00 info: All connector for 'echo-back-server' ready
|
|
35
|
+
2024-07-05T08:53:01+09:00 info: All connector for 'echo-back' ready
|
|
36
|
+
2024-07-05T08:53:01+09:00 info: All connector for 'http-connector' ready
|
|
37
|
+
2024-07-05T08:53:01+09:00 info: All connector for 'graphql-connector' ready
|
|
38
|
+
2024-07-05T08:53:01+09:00 info: All connector for 'sqlite-connector' ready
|
|
39
|
+
2024-07-05T08:53:01+09:00 info: All connector for 'postgresql-connector' ready
|
|
40
|
+
2024-07-05T08:53:01+09:00 info: All connector for 'mqtt-connector' ready
|
|
41
|
+
2024-07-05T08:53:01+09:00 info: All connector for 'mssql-connector' ready
|
|
42
|
+
2024-07-05T08:53:01+09:00 info: All connector for 'oracle-connector' ready
|
|
43
|
+
2024-07-05T08:53:01+09:00 info: All connector for 'mysql-connector' ready
|
|
44
|
+
2024-07-05T08:53:01+09:00 info: All connector for 'socket-server' ready
|
|
45
|
+
2024-07-05T08:53:01+09:00 info: All connector for 'operato-connector' ready
|
|
46
|
+
2024-07-05T08:53:01+09:00 info: All connector for 'email-connector' ready
|
|
47
|
+
2024-07-05T08:53:01+09:00 info: All connector for 'influxdb-connector' ready
|
|
48
|
+
2024-07-05T08:53:01+09:00 info: All connector for 'msgraph-connector' ready
|
|
49
|
+
2024-07-05T08:53:01+09:00 info: All connector for 'proxy-connector' ready
|
|
50
|
+
2024-07-05T08:53:01+09:00 info: ConnectionManager initialization done:
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
2024-07-05T12:41:28+09:00 info: Initializing ConnectionManager...
|
|
2
|
+
2024-07-05T12:41:28+09:00 info: Connector 'echo-back-server' started to ready
|
|
3
|
+
2024-07-05T12:41:28+09:00 info: Connector 'echo-back' started to ready
|
|
4
|
+
2024-07-05T12:41:28+09:00 info: Connector 'http-connector' started to ready
|
|
5
|
+
2024-07-05T12:41:28+09:00 info: Connector 'graphql-connector' started to ready
|
|
6
|
+
2024-07-05T12:41:28+09:00 info: Connector 'sqlite-connector' started to ready
|
|
7
|
+
2024-07-05T12:41:28+09:00 info: Connector 'postgresql-connector' started to ready
|
|
8
|
+
2024-07-05T12:41:28+09:00 info: Connector 'mqtt-connector' started to ready
|
|
9
|
+
2024-07-05T12:41:28+09:00 info: Connector 'mssql-connector' started to ready
|
|
10
|
+
2024-07-05T12:41:28+09:00 info: Connector 'oracle-connector' started to ready
|
|
11
|
+
2024-07-05T12:41:28+09:00 info: Connector 'mysql-connector' started to ready
|
|
12
|
+
2024-07-05T12:41:28+09:00 info: Connector 'socket-server' started to ready
|
|
13
|
+
2024-07-05T12:41:28+09:00 info: Connector 'operato-connector' started to ready
|
|
14
|
+
2024-07-05T12:41:28+09:00 info: Connector 'email-connector' started to ready
|
|
15
|
+
2024-07-05T12:41:28+09:00 info: Connector 'influxdb-connector' started to ready
|
|
16
|
+
2024-07-05T12:41:28+09:00 info: Connector 'msgraph-connector' started to ready
|
|
17
|
+
2024-07-05T12:41:28+09:00 info: Connector 'proxy-connector' started to ready
|
|
18
|
+
2024-07-05T12:41:28+09:00 info: echo-back-servers are ready
|
|
19
|
+
2024-07-05T12:41:28+09:00 info: echo-back connections are ready
|
|
20
|
+
2024-07-05T12:41:28+09:00 info: http-connector connections are ready
|
|
21
|
+
2024-07-05T12:41:28+09:00 info: graphql-connector connections are ready
|
|
22
|
+
2024-07-05T12:41:28+09:00 info: sqlite-connector connections are ready
|
|
23
|
+
2024-07-05T12:41:28+09:00 info: postgresql-connector connections are ready
|
|
24
|
+
2024-07-05T12:41:28+09:00 info: mqtt-connector connections are ready
|
|
25
|
+
2024-07-05T12:41:28+09:00 info: mssql-connector connections are ready
|
|
26
|
+
2024-07-05T12:41:28+09:00 info: oracle-connector connections are ready
|
|
27
|
+
2024-07-05T12:41:28+09:00 info: mysql-connector connections are ready
|
|
28
|
+
2024-07-05T12:41:28+09:00 info: socket servers are ready
|
|
29
|
+
2024-07-05T12:41:28+09:00 info: operato-connector connections are ready
|
|
30
|
+
2024-07-05T12:41:28+09:00 info: email connections are ready
|
|
31
|
+
2024-07-05T12:41:28+09:00 info: influxdb connections are ready
|
|
32
|
+
2024-07-05T12:41:28+09:00 info: msgraph-connector connections are ready
|
|
33
|
+
2024-07-05T12:41:28+09:00 info: proxy-connector connections are ready
|
|
34
|
+
2024-07-05T12:41:28+09:00 info: All connector for 'echo-back-server' ready
|
|
35
|
+
2024-07-05T12:41:28+09:00 info: All connector for 'echo-back' ready
|
|
36
|
+
2024-07-05T12:41:28+09:00 info: All connector for 'http-connector' ready
|
|
37
|
+
2024-07-05T12:41:28+09:00 info: All connector for 'graphql-connector' ready
|
|
38
|
+
2024-07-05T12:41:28+09:00 info: All connector for 'sqlite-connector' ready
|
|
39
|
+
2024-07-05T12:41:28+09:00 info: All connector for 'postgresql-connector' ready
|
|
40
|
+
2024-07-05T12:41:28+09:00 info: All connector for 'mqtt-connector' ready
|
|
41
|
+
2024-07-05T12:41:28+09:00 info: All connector for 'mssql-connector' ready
|
|
42
|
+
2024-07-05T12:41:28+09:00 info: All connector for 'oracle-connector' ready
|
|
43
|
+
2024-07-05T12:41:28+09:00 info: All connector for 'mysql-connector' ready
|
|
44
|
+
2024-07-05T12:41:28+09:00 info: All connector for 'socket-server' ready
|
|
45
|
+
2024-07-05T12:41:28+09:00 info: All connector for 'operato-connector' ready
|
|
46
|
+
2024-07-05T12:41:28+09:00 info: All connector for 'email-connector' ready
|
|
47
|
+
2024-07-05T12:41:28+09:00 info: All connector for 'influxdb-connector' ready
|
|
48
|
+
2024-07-05T12:41:28+09:00 info: All connector for 'msgraph-connector' ready
|
|
49
|
+
2024-07-05T12:41:28+09:00 info: All connector for 'proxy-connector' ready
|
|
50
|
+
2024-07-05T12:41:28+09:00 info: ConnectionManager initialization done:
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
2024-07-06T01:43:31+09:00 info: Initializing ConnectionManager...
|
|
2
|
+
2024-07-06T01:43:31+09:00 info: Connector 'echo-back-server' started to ready
|
|
3
|
+
2024-07-06T01:43:31+09:00 info: Connector 'echo-back' started to ready
|
|
4
|
+
2024-07-06T01:43:31+09:00 info: Connector 'http-connector' started to ready
|
|
5
|
+
2024-07-06T01:43:31+09:00 info: Connector 'graphql-connector' started to ready
|
|
6
|
+
2024-07-06T01:43:31+09:00 info: Connector 'sqlite-connector' started to ready
|
|
7
|
+
2024-07-06T01:43:31+09:00 info: Connector 'postgresql-connector' started to ready
|
|
8
|
+
2024-07-06T01:43:31+09:00 info: Connector 'mqtt-connector' started to ready
|
|
9
|
+
2024-07-06T01:43:31+09:00 info: Connector 'mssql-connector' started to ready
|
|
10
|
+
2024-07-06T01:43:31+09:00 info: Connector 'oracle-connector' started to ready
|
|
11
|
+
2024-07-06T01:43:31+09:00 info: Connector 'mysql-connector' started to ready
|
|
12
|
+
2024-07-06T01:43:31+09:00 info: Connector 'socket-server' started to ready
|
|
13
|
+
2024-07-06T01:43:31+09:00 info: Connector 'operato-connector' started to ready
|
|
14
|
+
2024-07-06T01:43:31+09:00 info: Connector 'email-connector' started to ready
|
|
15
|
+
2024-07-06T01:43:31+09:00 info: Connector 'influxdb-connector' started to ready
|
|
16
|
+
2024-07-06T01:43:31+09:00 info: Connector 'msgraph-connector' started to ready
|
|
17
|
+
2024-07-06T01:43:31+09:00 info: Connector 'proxy-connector' started to ready
|
|
18
|
+
2024-07-06T01:43:31+09:00 info: echo-back-servers are ready
|
|
19
|
+
2024-07-06T01:43:31+09:00 info: echo-back connections are ready
|
|
20
|
+
2024-07-06T01:43:31+09:00 info: http-connector connections are ready
|
|
21
|
+
2024-07-06T01:43:31+09:00 info: graphql-connector connections are ready
|
|
22
|
+
2024-07-06T01:43:31+09:00 info: sqlite-connector connections are ready
|
|
23
|
+
2024-07-06T01:43:31+09:00 info: postgresql-connector connections are ready
|
|
24
|
+
2024-07-06T01:43:31+09:00 info: mqtt-connector connections are ready
|
|
25
|
+
2024-07-06T01:43:31+09:00 info: mssql-connector connections are ready
|
|
26
|
+
2024-07-06T01:43:31+09:00 info: oracle-connector connections are ready
|
|
27
|
+
2024-07-06T01:43:31+09:00 info: mysql-connector connections are ready
|
|
28
|
+
2024-07-06T01:43:31+09:00 info: socket servers are ready
|
|
29
|
+
2024-07-06T01:43:31+09:00 info: operato-connector connections are ready
|
|
30
|
+
2024-07-06T01:43:31+09:00 info: email connections are ready
|
|
31
|
+
2024-07-06T01:43:31+09:00 info: influxdb connections are ready
|
|
32
|
+
2024-07-06T01:43:31+09:00 info: msgraph-connector connections are ready
|
|
33
|
+
2024-07-06T01:43:31+09:00 info: proxy-connector connections are ready
|
|
34
|
+
2024-07-06T01:43:31+09:00 info: All connector for 'echo-back-server' ready
|
|
35
|
+
2024-07-06T01:43:31+09:00 info: All connector for 'echo-back' ready
|
|
36
|
+
2024-07-06T01:43:31+09:00 info: All connector for 'http-connector' ready
|
|
37
|
+
2024-07-06T01:43:31+09:00 info: All connector for 'graphql-connector' ready
|
|
38
|
+
2024-07-06T01:43:31+09:00 info: All connector for 'sqlite-connector' ready
|
|
39
|
+
2024-07-06T01:43:31+09:00 info: All connector for 'postgresql-connector' ready
|
|
40
|
+
2024-07-06T01:43:31+09:00 info: All connector for 'mqtt-connector' ready
|
|
41
|
+
2024-07-06T01:43:31+09:00 info: All connector for 'mssql-connector' ready
|
|
42
|
+
2024-07-06T01:43:31+09:00 info: All connector for 'oracle-connector' ready
|
|
43
|
+
2024-07-06T01:43:31+09:00 info: All connector for 'mysql-connector' ready
|
|
44
|
+
2024-07-06T01:43:31+09:00 info: All connector for 'socket-server' ready
|
|
45
|
+
2024-07-06T01:43:31+09:00 info: All connector for 'operato-connector' ready
|
|
46
|
+
2024-07-06T01:43:31+09:00 info: All connector for 'email-connector' ready
|
|
47
|
+
2024-07-06T01:43:31+09:00 info: All connector for 'influxdb-connector' ready
|
|
48
|
+
2024-07-06T01:43:31+09:00 info: All connector for 'msgraph-connector' ready
|
|
49
|
+
2024-07-06T01:43:31+09:00 info: All connector for 'proxy-connector' ready
|
|
50
|
+
2024-07-06T01:43:31+09:00 info: ConnectionManager initialization done:
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
2024-07-06T03:38:27+09:00 info: Initializing ConnectionManager...
|
|
2
|
+
2024-07-06T03:38:27+09:00 info: Connector 'echo-back-server' started to ready
|
|
3
|
+
2024-07-06T03:38:27+09:00 info: Connector 'echo-back' started to ready
|
|
4
|
+
2024-07-06T03:38:27+09:00 info: Connector 'http-connector' started to ready
|
|
5
|
+
2024-07-06T03:38:27+09:00 info: Connector 'graphql-connector' started to ready
|
|
6
|
+
2024-07-06T03:38:27+09:00 info: Connector 'sqlite-connector' started to ready
|
|
7
|
+
2024-07-06T03:38:27+09:00 info: Connector 'postgresql-connector' started to ready
|
|
8
|
+
2024-07-06T03:38:27+09:00 info: Connector 'mqtt-connector' started to ready
|
|
9
|
+
2024-07-06T03:38:27+09:00 info: Connector 'mssql-connector' started to ready
|
|
10
|
+
2024-07-06T03:38:27+09:00 info: Connector 'oracle-connector' started to ready
|
|
11
|
+
2024-07-06T03:38:27+09:00 info: Connector 'mysql-connector' started to ready
|
|
12
|
+
2024-07-06T03:38:27+09:00 info: Connector 'socket-server' started to ready
|
|
13
|
+
2024-07-06T03:38:27+09:00 info: Connector 'operato-connector' started to ready
|
|
14
|
+
2024-07-06T03:38:27+09:00 info: Connector 'email-connector' started to ready
|
|
15
|
+
2024-07-06T03:38:27+09:00 info: Connector 'influxdb-connector' started to ready
|
|
16
|
+
2024-07-06T03:38:27+09:00 info: Connector 'msgraph-connector' started to ready
|
|
17
|
+
2024-07-06T03:38:27+09:00 info: Connector 'proxy-connector' started to ready
|
|
18
|
+
2024-07-06T03:38:27+09:00 info: echo-back-servers are ready
|
|
19
|
+
2024-07-06T03:38:27+09:00 info: echo-back connections are ready
|
|
20
|
+
2024-07-06T03:38:27+09:00 info: http-connector connections are ready
|
|
21
|
+
2024-07-06T03:38:27+09:00 info: graphql-connector connections are ready
|
|
22
|
+
2024-07-06T03:38:27+09:00 info: sqlite-connector connections are ready
|
|
23
|
+
2024-07-06T03:38:27+09:00 info: postgresql-connector connections are ready
|
|
24
|
+
2024-07-06T03:38:27+09:00 info: mqtt-connector connections are ready
|
|
25
|
+
2024-07-06T03:38:27+09:00 info: mssql-connector connections are ready
|
|
26
|
+
2024-07-06T03:38:27+09:00 info: oracle-connector connections are ready
|
|
27
|
+
2024-07-06T03:38:27+09:00 info: mysql-connector connections are ready
|
|
28
|
+
2024-07-06T03:38:27+09:00 info: socket servers are ready
|
|
29
|
+
2024-07-06T03:38:27+09:00 info: operato-connector connections are ready
|
|
30
|
+
2024-07-06T03:38:27+09:00 info: email connections are ready
|
|
31
|
+
2024-07-06T03:38:27+09:00 info: influxdb connections are ready
|
|
32
|
+
2024-07-06T03:38:27+09:00 info: msgraph-connector connections are ready
|
|
33
|
+
2024-07-06T03:38:27+09:00 info: proxy-connector connections are ready
|
|
34
|
+
2024-07-06T03:38:27+09:00 info: All connector for 'echo-back-server' ready
|
|
35
|
+
2024-07-06T03:38:27+09:00 info: All connector for 'echo-back' ready
|
|
36
|
+
2024-07-06T03:38:27+09:00 info: All connector for 'http-connector' ready
|
|
37
|
+
2024-07-06T03:38:27+09:00 info: All connector for 'graphql-connector' ready
|
|
38
|
+
2024-07-06T03:38:27+09:00 info: All connector for 'sqlite-connector' ready
|
|
39
|
+
2024-07-06T03:38:27+09:00 info: All connector for 'postgresql-connector' ready
|
|
40
|
+
2024-07-06T03:38:27+09:00 info: All connector for 'mqtt-connector' ready
|
|
41
|
+
2024-07-06T03:38:27+09:00 info: All connector for 'mssql-connector' ready
|
|
42
|
+
2024-07-06T03:38:27+09:00 info: All connector for 'oracle-connector' ready
|
|
43
|
+
2024-07-06T03:38:27+09:00 info: All connector for 'mysql-connector' ready
|
|
44
|
+
2024-07-06T03:38:27+09:00 info: All connector for 'socket-server' ready
|
|
45
|
+
2024-07-06T03:38:27+09:00 info: All connector for 'operato-connector' ready
|
|
46
|
+
2024-07-06T03:38:27+09:00 info: All connector for 'email-connector' ready
|
|
47
|
+
2024-07-06T03:38:27+09:00 info: All connector for 'influxdb-connector' ready
|
|
48
|
+
2024-07-06T03:38:27+09:00 info: All connector for 'msgraph-connector' ready
|
|
49
|
+
2024-07-06T03:38:27+09:00 info: All connector for 'proxy-connector' ready
|
|
50
|
+
2024-07-06T03:38:27+09:00 info: ConnectionManager initialization done:
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
2024-07-06T11:10:39+09:00 info: Initializing ConnectionManager...
|
|
2
|
+
2024-07-06T11:10:39+09:00 info: Connector 'echo-back-server' started to ready
|
|
3
|
+
2024-07-06T11:10:39+09:00 info: Connector 'echo-back' started to ready
|
|
4
|
+
2024-07-06T11:10:39+09:00 info: Connector 'http-connector' started to ready
|
|
5
|
+
2024-07-06T11:10:39+09:00 info: Connector 'graphql-connector' started to ready
|
|
6
|
+
2024-07-06T11:10:39+09:00 info: Connector 'sqlite-connector' started to ready
|
|
7
|
+
2024-07-06T11:10:39+09:00 info: Connector 'postgresql-connector' started to ready
|
|
8
|
+
2024-07-06T11:10:39+09:00 info: Connector 'mqtt-connector' started to ready
|
|
9
|
+
2024-07-06T11:10:39+09:00 info: Connector 'mssql-connector' started to ready
|
|
10
|
+
2024-07-06T11:10:39+09:00 info: Connector 'oracle-connector' started to ready
|
|
11
|
+
2024-07-06T11:10:39+09:00 info: Connector 'mysql-connector' started to ready
|
|
12
|
+
2024-07-06T11:10:39+09:00 info: Connector 'socket-server' started to ready
|
|
13
|
+
2024-07-06T11:10:39+09:00 info: Connector 'operato-connector' started to ready
|
|
14
|
+
2024-07-06T11:10:39+09:00 info: Connector 'email-connector' started to ready
|
|
15
|
+
2024-07-06T11:10:39+09:00 info: Connector 'influxdb-connector' started to ready
|
|
16
|
+
2024-07-06T11:10:39+09:00 info: Connector 'msgraph-connector' started to ready
|
|
17
|
+
2024-07-06T11:10:39+09:00 info: echo-back-servers are ready
|
|
18
|
+
2024-07-06T11:10:39+09:00 info: echo-back connections are ready
|
|
19
|
+
2024-07-06T11:10:39+09:00 info: http-connector connections are ready
|
|
20
|
+
2024-07-06T11:10:39+09:00 info: graphql-connector connections are ready
|
|
21
|
+
2024-07-06T11:10:39+09:00 info: sqlite-connector connections are ready
|
|
22
|
+
2024-07-06T11:10:39+09:00 info: postgresql-connector connections are ready
|
|
23
|
+
2024-07-06T11:10:39+09:00 info: mqtt-connector connections are ready
|
|
24
|
+
2024-07-06T11:10:39+09:00 info: mssql-connector connections are ready
|
|
25
|
+
2024-07-06T11:10:39+09:00 info: oracle-connector connections are ready
|
|
26
|
+
2024-07-06T11:10:39+09:00 info: mysql-connector connections are ready
|
|
27
|
+
2024-07-06T11:10:39+09:00 info: socket servers are ready
|
|
28
|
+
2024-07-06T11:10:39+09:00 info: graphql-connector connections are ready
|
|
29
|
+
2024-07-06T11:10:39+09:00 info: email connections are ready
|
|
30
|
+
2024-07-06T11:10:39+09:00 info: influxdb connections are ready
|
|
31
|
+
2024-07-06T11:10:39+09:00 info: msgraph-connector connections are ready
|
|
32
|
+
2024-07-06T11:10:39+09:00 info: All connector for 'echo-back-server' ready
|
|
33
|
+
2024-07-06T11:10:39+09:00 info: All connector for 'echo-back' ready
|
|
34
|
+
2024-07-06T11:10:39+09:00 info: All connector for 'http-connector' ready
|
|
35
|
+
2024-07-06T11:10:39+09:00 info: All connector for 'graphql-connector' ready
|
|
36
|
+
2024-07-06T11:10:39+09:00 info: All connector for 'sqlite-connector' ready
|
|
37
|
+
2024-07-06T11:10:39+09:00 info: All connector for 'postgresql-connector' ready
|
|
38
|
+
2024-07-06T11:10:39+09:00 info: All connector for 'mqtt-connector' ready
|
|
39
|
+
2024-07-06T11:10:39+09:00 info: All connector for 'mssql-connector' ready
|
|
40
|
+
2024-07-06T11:10:39+09:00 info: All connector for 'oracle-connector' ready
|
|
41
|
+
2024-07-06T11:10:39+09:00 info: All connector for 'mysql-connector' ready
|
|
42
|
+
2024-07-06T11:10:39+09:00 info: All connector for 'socket-server' ready
|
|
43
|
+
2024-07-06T11:10:39+09:00 info: All connector for 'operato-connector' ready
|
|
44
|
+
2024-07-06T11:10:39+09:00 info: All connector for 'email-connector' ready
|
|
45
|
+
2024-07-06T11:10:39+09:00 info: All connector for 'influxdb-connector' ready
|
|
46
|
+
2024-07-06T11:10:39+09:00 info: All connector for 'msgraph-connector' ready
|
|
47
|
+
2024-07-06T11:10:39+09:00 info: ConnectionManager initialization done:
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@operato/scene-manufacturing",
|
|
3
3
|
"description": "Things scene components for manufacturing industry",
|
|
4
|
-
"version": "1.3.
|
|
4
|
+
"version": "1.3.18",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"things-scene": true,
|
|
7
7
|
"author": "heartyoh",
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"prettier --write"
|
|
58
58
|
]
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "1599159c208863007d7f2d2b174c2cc4845653f7"
|
|
61
61
|
}
|
package/src/tact-timer.ts
CHANGED
|
@@ -1,21 +1,24 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright © HatioLab Inc. All rights reserved.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
1
|
import { Component, ComponentNature, Properties, RectPath, Shape } from '@hatiolab/things-scene'
|
|
6
|
-
|
|
7
2
|
import format from './libs/format'
|
|
8
3
|
|
|
4
|
+
const mask = new URL('../icons/tact-timer-mask.svg', import.meta.url).href
|
|
5
|
+
|
|
9
6
|
const NATURE: ComponentNature = {
|
|
10
7
|
mutable: false,
|
|
11
8
|
resizable: true,
|
|
12
9
|
rotatable: true,
|
|
13
10
|
properties: [
|
|
14
11
|
{
|
|
15
|
-
type: '
|
|
16
|
-
label: '
|
|
17
|
-
name: '
|
|
18
|
-
placeholder: '
|
|
12
|
+
type: 'string',
|
|
13
|
+
label: 'start-time',
|
|
14
|
+
name: 'startTime',
|
|
15
|
+
placeholder: 'YYYYMMDDhhmmss'
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
type: 'string',
|
|
19
|
+
label: 'end-time',
|
|
20
|
+
name: 'endTime',
|
|
21
|
+
placeholder: 'YYYYMMDDhhmmss'
|
|
19
22
|
},
|
|
20
23
|
{
|
|
21
24
|
type: 'string',
|
|
@@ -71,14 +74,35 @@ const NATURE: ComponentNature = {
|
|
|
71
74
|
type: 'boolean',
|
|
72
75
|
label: 'auto-start',
|
|
73
76
|
name: 'autoStart'
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
type: 'boolean',
|
|
80
|
+
label: 'show-progress',
|
|
81
|
+
name: 'showProgress'
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
type: 'boolean',
|
|
85
|
+
label: 'show-timer',
|
|
86
|
+
name: 'showTimer'
|
|
74
87
|
}
|
|
75
88
|
],
|
|
76
|
-
'value-property': 'tactTime',
|
|
77
89
|
help: 'scene/component/manufacturing/tact-timer'
|
|
78
90
|
}
|
|
79
91
|
|
|
80
92
|
export default class TactTimer extends RectPath(Shape) {
|
|
81
|
-
|
|
93
|
+
static MASK: HTMLImageElement
|
|
94
|
+
|
|
95
|
+
static get mask() {
|
|
96
|
+
if (!TactTimer.MASK) {
|
|
97
|
+
TactTimer.MASK = new Image()
|
|
98
|
+
TactTimer.MASK.src = mask
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
return TactTimer.MASK
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
private _start: number = 0
|
|
105
|
+
private _due: number = 0
|
|
82
106
|
|
|
83
107
|
get nature() {
|
|
84
108
|
return NATURE
|
|
@@ -97,12 +121,19 @@ export default class TactTimer extends RectPath(Shape) {
|
|
|
97
121
|
}
|
|
98
122
|
|
|
99
123
|
start() {
|
|
100
|
-
|
|
101
|
-
this.
|
|
124
|
+
const { startTime, endTime } = this.state
|
|
125
|
+
const start = this.parseTime(startTime)
|
|
126
|
+
const end = this.parseTime(endTime)
|
|
127
|
+
|
|
128
|
+
if (start && end) {
|
|
129
|
+
this._due = end.getTime()
|
|
130
|
+
this._start = start.getTime()
|
|
131
|
+
this.counting()
|
|
132
|
+
}
|
|
102
133
|
}
|
|
103
134
|
|
|
104
135
|
onchange(after: Properties) {
|
|
105
|
-
if ('
|
|
136
|
+
if ('startTime' in after || 'endTime' in after) {
|
|
106
137
|
this.start()
|
|
107
138
|
}
|
|
108
139
|
}
|
|
@@ -113,10 +144,15 @@ export default class TactTimer extends RectPath(Shape) {
|
|
|
113
144
|
}
|
|
114
145
|
|
|
115
146
|
requestAnimationFrame(() => {
|
|
147
|
+
const { showTimer } = this.state
|
|
116
148
|
const countdown = this.countdown
|
|
117
149
|
|
|
118
|
-
|
|
119
|
-
|
|
150
|
+
if (showTimer) {
|
|
151
|
+
const text = format(Math.abs(countdown), this.getState('format'))
|
|
152
|
+
this.text = text
|
|
153
|
+
} else {
|
|
154
|
+
this.text = ''
|
|
155
|
+
}
|
|
120
156
|
|
|
121
157
|
this.setState('data', this.countdown)
|
|
122
158
|
|
|
@@ -128,7 +164,6 @@ export default class TactTimer extends RectPath(Shape) {
|
|
|
128
164
|
|
|
129
165
|
render(context: CanvasRenderingContext2D) {
|
|
130
166
|
var {
|
|
131
|
-
tactTime,
|
|
132
167
|
top,
|
|
133
168
|
left,
|
|
134
169
|
height,
|
|
@@ -141,11 +176,14 @@ export default class TactTimer extends RectPath(Shape) {
|
|
|
141
176
|
decreaseProgressColor = 'transparent',
|
|
142
177
|
underThresholdColor = 'transparent',
|
|
143
178
|
progressDirection = 'increase',
|
|
144
|
-
progressThreshold = 0
|
|
179
|
+
progressThreshold = 0,
|
|
180
|
+
showProgress,
|
|
181
|
+
showTimer
|
|
145
182
|
} = this.state
|
|
146
183
|
|
|
147
184
|
const increase = this.countdown > 0
|
|
148
|
-
const
|
|
185
|
+
const totalDuration = (this._due - this._start) / 1000
|
|
186
|
+
const underThreshold = this.countdown / totalDuration < progressThreshold / 100
|
|
149
187
|
|
|
150
188
|
// progress의 색상
|
|
151
189
|
context.beginPath()
|
|
@@ -156,7 +194,11 @@ export default class TactTimer extends RectPath(Shape) {
|
|
|
156
194
|
// value의 색상
|
|
157
195
|
context.beginPath()
|
|
158
196
|
|
|
159
|
-
|
|
197
|
+
if (!showProgress) {
|
|
198
|
+
return
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
var progress = Math.abs((this.countdown / totalDuration) * 100)
|
|
160
202
|
|
|
161
203
|
if (!isNaN(progress)) {
|
|
162
204
|
progress = width - (width * progress) / 100
|
|
@@ -178,6 +220,7 @@ export default class TactTimer extends RectPath(Shape) {
|
|
|
178
220
|
context.beginPath()
|
|
179
221
|
}
|
|
180
222
|
|
|
223
|
+
this.drawImage(context, TactTimer.mask, left, top, width, height)
|
|
181
224
|
context.roundRect(left, top, width, height, round)
|
|
182
225
|
|
|
183
226
|
this.setState('fontColor', (increase ? increaseFontColor : decreaseFontColor) || fontColor)
|
|
@@ -188,20 +231,58 @@ export default class TactTimer extends RectPath(Shape) {
|
|
|
188
231
|
this.drawText(context)
|
|
189
232
|
}
|
|
190
233
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
234
|
+
parseTime(timeString: string): Date | undefined {
|
|
235
|
+
if (!timeString || timeString.length !== 14) {
|
|
236
|
+
return undefined
|
|
237
|
+
}
|
|
238
|
+
const year = parseInt(timeString.slice(0, 4), 10)
|
|
239
|
+
const month = parseInt(timeString.slice(4, 6), 10) - 1
|
|
240
|
+
const day = parseInt(timeString.slice(6, 8), 10)
|
|
241
|
+
const hour = parseInt(timeString.slice(8, 10), 10)
|
|
242
|
+
const minute = parseInt(timeString.slice(10, 12), 10)
|
|
243
|
+
const second = parseInt(timeString.slice(12, 14), 10)
|
|
244
|
+
|
|
245
|
+
return new Date(year, month, day, hour, minute, second)
|
|
197
246
|
}
|
|
198
247
|
|
|
199
|
-
get countdown() {
|
|
248
|
+
get countdown(): number {
|
|
200
249
|
const due = this._due || 0
|
|
201
250
|
const now = Date.now()
|
|
202
251
|
|
|
203
252
|
return Math.round((due - now) / 1000)
|
|
204
253
|
}
|
|
254
|
+
|
|
255
|
+
get value() {
|
|
256
|
+
const { startTime, endTime } = this.state
|
|
257
|
+
return [startTime, endTime]
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
set value(v) {
|
|
261
|
+
if (v instanceof Array) {
|
|
262
|
+
const [startTime, endTime] = v
|
|
263
|
+
this.setState({
|
|
264
|
+
startTime,
|
|
265
|
+
endTime
|
|
266
|
+
})
|
|
267
|
+
} else if (typeof v == 'object') {
|
|
268
|
+
const { startTime, endTime } = v
|
|
269
|
+
this.setState({
|
|
270
|
+
startTime,
|
|
271
|
+
endTime
|
|
272
|
+
})
|
|
273
|
+
} else if (typeof v == 'string') {
|
|
274
|
+
const [startTime, endTime] = (v as string).split(/[-+/%$#_,]+/)
|
|
275
|
+
this.setState({
|
|
276
|
+
startTime,
|
|
277
|
+
endTime
|
|
278
|
+
})
|
|
279
|
+
} else {
|
|
280
|
+
this.setState({
|
|
281
|
+
startTime: undefined,
|
|
282
|
+
endTime: undefined
|
|
283
|
+
})
|
|
284
|
+
}
|
|
285
|
+
}
|
|
205
286
|
}
|
|
206
287
|
|
|
207
288
|
Component.register('tact-timer', TactTimer)
|