@operato/scene-manufacturing 7.0.3 → 7.0.4
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 -1
- package/cache/translations/system/ko.json +1 -1
- 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 +20 -0
- package/logs/.5e5d741d8b7784a2fbad65eedc0fd46946aaf6f2-audit.json +20 -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-07-06-11.log +23 -0
- package/logs/application-2024-07-06-12.log +105 -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/logs/connections-2024-07-06-12.log +50 -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 +5 -1
- package/translations/ko.json +5 -1
- package/translations/ms.json +5 -1
- package/translations/zh.json +5 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/src/tact-timer.svg +0 -33
|
@@ -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:
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
2024-07-06T12:16:03+09:00 info: Initializing ConnectionManager...
|
|
2
|
+
2024-07-06T12:16:03+09:00 info: Connector 'echo-back-server' started to ready
|
|
3
|
+
2024-07-06T12:16:03+09:00 info: Connector 'echo-back' started to ready
|
|
4
|
+
2024-07-06T12:16:03+09:00 info: Connector 'http-connector' started to ready
|
|
5
|
+
2024-07-06T12:16:03+09:00 info: Connector 'graphql-connector' started to ready
|
|
6
|
+
2024-07-06T12:16:03+09:00 info: Connector 'sqlite-connector' started to ready
|
|
7
|
+
2024-07-06T12:16:03+09:00 info: Connector 'postgresql-connector' started to ready
|
|
8
|
+
2024-07-06T12:16:03+09:00 info: Connector 'mqtt-connector' started to ready
|
|
9
|
+
2024-07-06T12:16:03+09:00 info: Connector 'mssql-connector' started to ready
|
|
10
|
+
2024-07-06T12:16:03+09:00 info: Connector 'oracle-connector' started to ready
|
|
11
|
+
2024-07-06T12:16:03+09:00 info: Connector 'mysql-connector' started to ready
|
|
12
|
+
2024-07-06T12:16:03+09:00 info: Connector 'socket-server' started to ready
|
|
13
|
+
2024-07-06T12:16:03+09:00 info: Connector 'operato-connector' started to ready
|
|
14
|
+
2024-07-06T12:16:03+09:00 info: Connector 'email-connector' started to ready
|
|
15
|
+
2024-07-06T12:16:03+09:00 info: Connector 'influxdb-connector' started to ready
|
|
16
|
+
2024-07-06T12:16:03+09:00 info: Connector 'msgraph-connector' started to ready
|
|
17
|
+
2024-07-06T12:16:03+09:00 info: Connector 'proxy-connector' started to ready
|
|
18
|
+
2024-07-06T12:16:03+09:00 info: echo-back-servers are ready
|
|
19
|
+
2024-07-06T12:16:03+09:00 info: echo-back connections are ready
|
|
20
|
+
2024-07-06T12:16:03+09:00 info: http-connector connections are ready
|
|
21
|
+
2024-07-06T12:16:03+09:00 info: graphql-connector connections are ready
|
|
22
|
+
2024-07-06T12:16:03+09:00 info: sqlite-connector connections are ready
|
|
23
|
+
2024-07-06T12:16:03+09:00 info: postgresql-connector connections are ready
|
|
24
|
+
2024-07-06T12:16:03+09:00 info: mqtt-connector connections are ready
|
|
25
|
+
2024-07-06T12:16:03+09:00 info: mssql-connector connections are ready
|
|
26
|
+
2024-07-06T12:16:03+09:00 info: oracle-connector connections are ready
|
|
27
|
+
2024-07-06T12:16:03+09:00 info: mysql-connector connections are ready
|
|
28
|
+
2024-07-06T12:16:03+09:00 info: socket servers are ready
|
|
29
|
+
2024-07-06T12:16:03+09:00 info: operato-connector connections are ready
|
|
30
|
+
2024-07-06T12:16:03+09:00 info: email connections are ready
|
|
31
|
+
2024-07-06T12:16:03+09:00 info: influxdb connections are ready
|
|
32
|
+
2024-07-06T12:16:03+09:00 info: msgraph-connector connections are ready
|
|
33
|
+
2024-07-06T12:16:03+09:00 info: proxy-connector connections are ready
|
|
34
|
+
2024-07-06T12:16:03+09:00 info: All connector for 'echo-back-server' ready
|
|
35
|
+
2024-07-06T12:16:03+09:00 info: All connector for 'echo-back' ready
|
|
36
|
+
2024-07-06T12:16:03+09:00 info: All connector for 'http-connector' ready
|
|
37
|
+
2024-07-06T12:16:03+09:00 info: All connector for 'graphql-connector' ready
|
|
38
|
+
2024-07-06T12:16:03+09:00 info: All connector for 'sqlite-connector' ready
|
|
39
|
+
2024-07-06T12:16:03+09:00 info: All connector for 'postgresql-connector' ready
|
|
40
|
+
2024-07-06T12:16:03+09:00 info: All connector for 'mqtt-connector' ready
|
|
41
|
+
2024-07-06T12:16:03+09:00 info: All connector for 'mssql-connector' ready
|
|
42
|
+
2024-07-06T12:16:03+09:00 info: All connector for 'oracle-connector' ready
|
|
43
|
+
2024-07-06T12:16:03+09:00 info: All connector for 'mysql-connector' ready
|
|
44
|
+
2024-07-06T12:16:03+09:00 info: All connector for 'socket-server' ready
|
|
45
|
+
2024-07-06T12:16:03+09:00 info: All connector for 'operato-connector' ready
|
|
46
|
+
2024-07-06T12:16:03+09:00 info: All connector for 'email-connector' ready
|
|
47
|
+
2024-07-06T12:16:03+09:00 info: All connector for 'influxdb-connector' ready
|
|
48
|
+
2024-07-06T12:16:03+09:00 info: All connector for 'msgraph-connector' ready
|
|
49
|
+
2024-07-06T12:16:03+09:00 info: All connector for 'proxy-connector' ready
|
|
50
|
+
2024-07-06T12:16:03+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": "7.0.
|
|
4
|
+
"version": "7.0.4",
|
|
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": "653d9c4eb1e79b3607ba16fdce17577fd6eb7895"
|
|
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)
|
|
@@ -13,6 +13,15 @@ export default {
|
|
|
13
13
|
height: 40,
|
|
14
14
|
fontSize: 80,
|
|
15
15
|
lineWidth: 1,
|
|
16
|
-
round: 10
|
|
16
|
+
round: 10,
|
|
17
|
+
showProgress: true,
|
|
18
|
+
showTimer: true,
|
|
19
|
+
progressDirection: 'decrease',
|
|
20
|
+
increaseProgressColor: 'green',
|
|
21
|
+
decreaseProgressColor: 'red',
|
|
22
|
+
increaseFontColor: 'navy',
|
|
23
|
+
decreaseFontColor: 'orange',
|
|
24
|
+
underThresholdColor: 'yellow',
|
|
25
|
+
progressThreshold: 30
|
|
17
26
|
}
|
|
18
27
|
}
|
package/translations/en.json
CHANGED
|
@@ -8,5 +8,9 @@
|
|
|
8
8
|
"label.progress-direction": "Progress Direction",
|
|
9
9
|
"label.progress-threshold": "Progress Threshold",
|
|
10
10
|
"label.tact-time": "Tact Time",
|
|
11
|
-
"label.under-threshold-color": "Under Threshold Color"
|
|
11
|
+
"label.under-threshold-color": "Under Threshold Color",
|
|
12
|
+
"label.show-progress": "show progress",
|
|
13
|
+
"label.show-timer": "show timer",
|
|
14
|
+
"label.start-time": "start time",
|
|
15
|
+
"label.end-time": "end time"
|
|
12
16
|
}
|
package/translations/ja.json
CHANGED
|
@@ -8,5 +8,9 @@
|
|
|
8
8
|
"label.progress-direction": "進行方向",
|
|
9
9
|
"label.progress-threshold": "進行閾値",
|
|
10
10
|
"label.tact-time": "標準所要時間",
|
|
11
|
-
"label.under-threshold-color": "閾値以下の色"
|
|
11
|
+
"label.under-threshold-color": "閾値以下の色",
|
|
12
|
+
"label.show-progress": "進捗を表示",
|
|
13
|
+
"label.show-timer": "タイマーを表示",
|
|
14
|
+
"label.start-time": "開始時間",
|
|
15
|
+
"label.end-time": "終了時間"
|
|
12
16
|
}
|
package/translations/ko.json
CHANGED
|
@@ -8,5 +8,9 @@
|
|
|
8
8
|
"label.progress-direction": "진행 방향",
|
|
9
9
|
"label.progress-threshold": "진행 임계값",
|
|
10
10
|
"label.tact-time": "tact time",
|
|
11
|
-
"label.under-threshold-color": "임계이하 색상"
|
|
11
|
+
"label.under-threshold-color": "임계이하 색상",
|
|
12
|
+
"label.show-progress": "진행색상 보이기",
|
|
13
|
+
"label.show-timer": "타이머 보이기",
|
|
14
|
+
"label.start-time": "시작 시간",
|
|
15
|
+
"label.end-time": "완료 시간"
|
|
12
16
|
}
|
package/translations/ms.json
CHANGED
|
@@ -8,5 +8,9 @@
|
|
|
8
8
|
"label.progress-direction": "arah kemajuan",
|
|
9
9
|
"label.progress-threshold": "ambang kemajuan",
|
|
10
10
|
"label.tact-time": "masa standard",
|
|
11
|
-
"label.under-threshold-color": "warna bawah ambang"
|
|
11
|
+
"label.under-threshold-color": "warna bawah ambang",
|
|
12
|
+
"label.show-progress": "tunjuk kemajuan",
|
|
13
|
+
"label.show-timer": "tunjuk pemasa",
|
|
14
|
+
"label.start-time": "masa mula",
|
|
15
|
+
"label.end-time": "masa tamat"
|
|
12
16
|
}
|
package/translations/zh.json
CHANGED
|
@@ -8,5 +8,9 @@
|
|
|
8
8
|
"label.progress-direction": "进度方向",
|
|
9
9
|
"label.progress-threshold": "进度阈值",
|
|
10
10
|
"label.tact-time": "标准耗时",
|
|
11
|
-
"label.under-threshold-color": "低于阈值颜色"
|
|
11
|
+
"label.under-threshold-color": "低于阈值颜色",
|
|
12
|
+
"label.show-progress": "显示进度",
|
|
13
|
+
"label.show-timer": "显示计时器",
|
|
14
|
+
"label.start-time": "开始时间",
|
|
15
|
+
"label.end-time": "完成时间"
|
|
12
16
|
}
|