@operato/scene-manufacturing 1.3.20 → 1.3.27
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 +18 -0
- package/db.sqlite +0 -0
- package/dist/tact-timer.d.ts +3 -0
- package/dist/tact-timer.js +36 -20
- package/dist/tact-timer.js.map +1 -1
- package/helps/scene/component/manufacturing/tact-timer.ja.md +39 -39
- package/helps/scene/component/manufacturing/tact-timer.ko.md +8 -8
- package/helps/scene/component/manufacturing/tact-timer.md +38 -38
- package/helps/scene/component/manufacturing/tact-timer.ms.md +45 -42
- package/helps/scene/component/manufacturing/tact-timer.zh.md +45 -45
- package/logs/.08636eb59927f12972f6774f5947c8507b3564c2-audit.json +11 -6
- package/logs/.5e5d741d8b7784a2fbad65eedc0fd46946aaf6f2-audit.json +9 -39
- package/logs/application-2024-10-12-15.log +105 -0
- package/logs/application-2024-10-12-16.log +105 -0
- package/logs/{application-2024-07-11-13.log → application-2024-10-13-01.log} +8 -8
- package/logs/connections-2024-10-12-15.log +50 -0
- package/logs/connections-2024-10-12-16.log +50 -0
- package/logs/connections-2024-10-13-01.log +47 -0
- package/package.json +2 -2
- package/src/tact-timer.ts +44 -23
- package/translations/en.json +11 -10
- package/translations/ja.json +10 -9
- package/translations/ko.json +5 -4
- package/translations/ms.json +9 -8
- package/translations/zh.json +9 -8
- package/tsconfig.tsbuildinfo +1 -1
- package/cache/translations/system/en.json +0 -1
- package/cache/translations/system/ko.json +0 -1
- package/icons/tact-timer-mask.svg +0 -37
- package/logs/application-2024-07-11-12.log +0 -23
- package/logs/connections-2024-06-27-22.log +0 -47
- package/logs/connections-2024-07-05-08.log +0 -50
- package/logs/connections-2024-07-05-12.log +0 -50
- package/logs/connections-2024-07-06-01.log +0 -50
- package/logs/connections-2024-07-06-03.log +0 -50
- package/logs/connections-2024-07-06-11.log +0 -47
- package/logs/connections-2024-07-06-12.log +0 -50
- package/logs/connections-2024-07-11-12.log +0 -47
- package/logs/connections-2024-07-11-13.log +0 -47
package/src/tact-timer.ts
CHANGED
|
@@ -40,23 +40,23 @@ const NATURE: ComponentNature = {
|
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
42
|
type: 'color',
|
|
43
|
-
label: '
|
|
44
|
-
name: '
|
|
43
|
+
label: 'before-due-progress-color',
|
|
44
|
+
name: 'beforeDueProgressColor'
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
47
|
type: 'color',
|
|
48
|
-
label: '
|
|
49
|
-
name: '
|
|
48
|
+
label: 'over-due-progress-color',
|
|
49
|
+
name: 'overDueProgressColor'
|
|
50
50
|
},
|
|
51
51
|
{
|
|
52
52
|
type: 'color',
|
|
53
|
-
label: '
|
|
54
|
-
name: '
|
|
53
|
+
label: 'before-due-font-color',
|
|
54
|
+
name: 'beforeDueFontColor'
|
|
55
55
|
},
|
|
56
56
|
{
|
|
57
57
|
type: 'color',
|
|
58
|
-
label: '
|
|
59
|
-
name: '
|
|
58
|
+
label: 'over-due-font-color',
|
|
59
|
+
name: 'overDueFontColor'
|
|
60
60
|
},
|
|
61
61
|
{
|
|
62
62
|
type: 'color',
|
|
@@ -107,29 +107,34 @@ export default class TactTimer extends RectPath(Shape) {
|
|
|
107
107
|
return
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
-
const { autoStart } = this.state
|
|
110
|
+
const { autoStart, started } = this.state
|
|
111
111
|
|
|
112
|
-
if (autoStart) {
|
|
112
|
+
if (autoStart || started) {
|
|
113
113
|
this.start()
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
start() {
|
|
118
|
-
const { startTime, endTime } = this.state
|
|
118
|
+
const { startTime, endTime, hidden } = this.state
|
|
119
119
|
const start = this.parseTime(startTime)
|
|
120
120
|
const end = this.parseTime(endTime)
|
|
121
121
|
|
|
122
|
-
if (start && end) {
|
|
122
|
+
if (start && end && !hidden) {
|
|
123
123
|
this._due = end.getTime()
|
|
124
124
|
this._start = start.getTime()
|
|
125
125
|
this.counting()
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
+
stop() {
|
|
130
|
+
this.started = false
|
|
131
|
+
}
|
|
132
|
+
|
|
129
133
|
onchange(after: Properties) {
|
|
130
|
-
if ('startTime' in after || 'endTime' in after) {
|
|
134
|
+
if ('startTime' in after || 'endTime' in after || 'hidden' in after) {
|
|
131
135
|
this.start()
|
|
132
136
|
}
|
|
137
|
+
|
|
133
138
|
if ('maskColor' in after) {
|
|
134
139
|
delete this.imageElement
|
|
135
140
|
}
|
|
@@ -148,14 +153,17 @@ export default class TactTimer extends RectPath(Shape) {
|
|
|
148
153
|
}
|
|
149
154
|
|
|
150
155
|
counting() {
|
|
151
|
-
|
|
156
|
+
const { hidden, started } = this.state
|
|
157
|
+
if (this.disposed || hidden || !started) {
|
|
152
158
|
return
|
|
153
159
|
}
|
|
154
160
|
|
|
155
161
|
requestAnimationFrame(() => {
|
|
156
|
-
const { showTimer } = this.state
|
|
162
|
+
const { showTimer, beforeDueFontColor, overDueFontColor, fontColor } = this.state
|
|
157
163
|
const countdown = this.countdown
|
|
158
164
|
|
|
165
|
+
this.setState('fontColor', (this.countdown > 0 ? beforeDueFontColor : overDueFontColor) || fontColor)
|
|
166
|
+
|
|
159
167
|
if (showTimer) {
|
|
160
168
|
const text = format(Math.abs(countdown), this.getState('format'))
|
|
161
169
|
this.text = text
|
|
@@ -180,10 +188,10 @@ export default class TactTimer extends RectPath(Shape) {
|
|
|
180
188
|
round = 0,
|
|
181
189
|
fontColor,
|
|
182
190
|
maskColor,
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
191
|
+
beforeDueFontColor,
|
|
192
|
+
overDueFontColor,
|
|
193
|
+
beforeDueProgressColor = 'transparent',
|
|
194
|
+
overDueProgressColor = 'transparent',
|
|
187
195
|
underThresholdColor = 'transparent',
|
|
188
196
|
progressDirection = 'increase',
|
|
189
197
|
progressThreshold = 0,
|
|
@@ -222,19 +230,19 @@ export default class TactTimer extends RectPath(Shape) {
|
|
|
222
230
|
context.fillStyle = increase
|
|
223
231
|
? underThreshold
|
|
224
232
|
? underThresholdColor
|
|
225
|
-
:
|
|
226
|
-
:
|
|
233
|
+
: beforeDueProgressColor
|
|
234
|
+
: overDueProgressColor
|
|
227
235
|
context.fill()
|
|
228
236
|
|
|
229
237
|
context.beginPath()
|
|
230
238
|
}
|
|
231
239
|
|
|
232
240
|
const image = this.getImageElement()
|
|
233
|
-
this.drawImage(context, image!, left, top, width, height)
|
|
241
|
+
this.drawImage(context, image!, left - 2, top - 2, width + 4, height + 4)
|
|
234
242
|
|
|
235
243
|
context.roundRect(left, top, width, height, round)
|
|
236
244
|
|
|
237
|
-
this.setState('fontColor', (increase ?
|
|
245
|
+
this.setState('fontColor', (increase ? beforeDueFontColor : overDueFontColor) || fontColor)
|
|
238
246
|
}
|
|
239
247
|
|
|
240
248
|
postrender(context: CanvasRenderingContext2D) {
|
|
@@ -294,6 +302,19 @@ export default class TactTimer extends RectPath(Shape) {
|
|
|
294
302
|
})
|
|
295
303
|
}
|
|
296
304
|
}
|
|
305
|
+
|
|
306
|
+
get started() {
|
|
307
|
+
return this.getState('started')
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
set started(started) {
|
|
311
|
+
if (this.started !== started) {
|
|
312
|
+
this.setState('started', started)
|
|
313
|
+
if (started) {
|
|
314
|
+
this.start()
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
}
|
|
297
318
|
}
|
|
298
319
|
|
|
299
320
|
Component.register('tact-timer', TactTimer)
|
package/translations/en.json
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
"label.
|
|
4
|
-
"label.
|
|
5
|
-
"label.
|
|
6
|
-
"label.
|
|
7
|
-
"label.
|
|
8
|
-
"label.progress-
|
|
9
|
-
"label.
|
|
10
|
-
"label.
|
|
11
|
-
"label.
|
|
2
|
+
"component.tact-timer": "tact timer",
|
|
3
|
+
"label.before-due-progress-color": "before due progress color",
|
|
4
|
+
"label.before-due-font-color": "before due font color",
|
|
5
|
+
"label.over-due-progress-color": "over due progress color",
|
|
6
|
+
"label.over-due-font-color": "over due font color",
|
|
7
|
+
"label.format": "format",
|
|
8
|
+
"label.progress-direction": "progress direction",
|
|
9
|
+
"label.progress-threshold": "progress threshold",
|
|
10
|
+
"label.tact-time": "tact time",
|
|
11
|
+
"label.under-threshold-color": "under threshold color",
|
|
12
|
+
"label.show-progress": "show progress color",
|
|
12
13
|
"label.show-timer": "show timer",
|
|
13
14
|
"label.start-time": "start time",
|
|
14
15
|
"label.end-time": "end time",
|
package/translations/ja.json
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
"label.
|
|
2
|
+
"component.tact-timer": "工程標準時間タイマー",
|
|
3
|
+
"label.before-due-progress-color": "期限前進行色",
|
|
4
|
+
"label.before-due-font-color": "期限前フォント色",
|
|
5
|
+
"label.over-due-progress-color": "期限後進行色",
|
|
6
|
+
"label.over-due-font-color": "期限後フォント色",
|
|
4
7
|
"label.format": "フォーマット",
|
|
5
|
-
"label.increase-font-color": "フォント色の増加",
|
|
6
|
-
"label.increase-progress-color": "進行色の増加",
|
|
7
8
|
"label.progress-direction": "進行方向",
|
|
8
|
-
"label.progress-threshold": "
|
|
9
|
-
"label.tact-time": "
|
|
10
|
-
"label.under-threshold-color": "
|
|
11
|
-
"label.show-progress": "
|
|
9
|
+
"label.progress-threshold": "進行しきい値",
|
|
10
|
+
"label.tact-time": "tact time",
|
|
11
|
+
"label.under-threshold-color": "しきい値以下の色",
|
|
12
|
+
"label.show-progress": "進行色を表示",
|
|
12
13
|
"label.show-timer": "タイマーを表示",
|
|
13
14
|
"label.start-time": "開始時間",
|
|
14
15
|
"label.end-time": "終了時間",
|
|
15
|
-
"label.tact-timer-mask-color": "
|
|
16
|
+
"label.tact-timer-mask-color": "マスク色"
|
|
16
17
|
}
|
package/translations/ko.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
"label.
|
|
2
|
+
"component.tact-timer": "공정표준시간 타이머",
|
|
3
|
+
"label.before-due-progress-color": "만기이전 진행색상",
|
|
4
|
+
"label.before-due-font-color": "만기이전 폰트색상",
|
|
5
|
+
"label.over-due-progress-color": "만기이후 진행색상",
|
|
6
|
+
"label.over-due-font-color": "만기이후 폰트색상",
|
|
4
7
|
"label.format": "포맷",
|
|
5
|
-
"label.increase-font-color": "증가 폰트색상",
|
|
6
|
-
"label.increase-progress-color": "증가 진행색상",
|
|
7
8
|
"label.progress-direction": "진행 방향",
|
|
8
9
|
"label.progress-threshold": "진행 임계값",
|
|
9
10
|
"label.tact-time": "tact time",
|
package/translations/ms.json
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
"label.
|
|
2
|
+
"component.tact-timer": "pemasa masa standard proses",
|
|
3
|
+
"label.before-due-progress-color": "warna kemajuan sebelum tarikh akhir",
|
|
4
|
+
"label.before-due-font-color": "warna fon sebelum tarikh akhir",
|
|
5
|
+
"label.over-due-progress-color": "warna kemajuan selepas tarikh akhir",
|
|
6
|
+
"label.over-due-font-color": "warna fon selepas tarikh akhir",
|
|
4
7
|
"label.format": "format",
|
|
5
|
-
"label.increase-font-color": "warna fon meningkat",
|
|
6
|
-
"label.increase-progress-color": "warna kemajuan meningkat",
|
|
7
8
|
"label.progress-direction": "arah kemajuan",
|
|
8
9
|
"label.progress-threshold": "ambang kemajuan",
|
|
9
|
-
"label.tact-time": "
|
|
10
|
-
"label.under-threshold-color": "warna bawah ambang",
|
|
11
|
-
"label.show-progress": "
|
|
12
|
-
"label.show-timer": "
|
|
10
|
+
"label.tact-time": "tact time",
|
|
11
|
+
"label.under-threshold-color": "warna di bawah ambang",
|
|
12
|
+
"label.show-progress": "tunjukkan warna kemajuan",
|
|
13
|
+
"label.show-timer": "tunjukkan pemasa",
|
|
13
14
|
"label.start-time": "masa mula",
|
|
14
15
|
"label.end-time": "masa tamat",
|
|
15
16
|
"label.tact-timer-mask-color": "warna topeng"
|
package/translations/zh.json
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
"label.
|
|
2
|
+
"component.tact-timer": "工艺标准时间计时器",
|
|
3
|
+
"label.before-due-progress-color": "到期前进度颜色",
|
|
4
|
+
"label.before-due-font-color": "到期前字体颜色",
|
|
5
|
+
"label.over-due-progress-color": "到期后进度颜色",
|
|
6
|
+
"label.over-due-font-color": "到期后字体颜色",
|
|
4
7
|
"label.format": "格式",
|
|
5
|
-
"label.increase-font-color": "增加字体颜色",
|
|
6
|
-
"label.increase-progress-color": "增加进度颜色",
|
|
7
8
|
"label.progress-direction": "进度方向",
|
|
8
9
|
"label.progress-threshold": "进度阈值",
|
|
9
|
-
"label.tact-time": "
|
|
10
|
+
"label.tact-time": "tact time",
|
|
10
11
|
"label.under-threshold-color": "低于阈值颜色",
|
|
11
|
-
"label.show-progress": "
|
|
12
|
+
"label.show-progress": "显示进度颜色",
|
|
12
13
|
"label.show-timer": "显示计时器",
|
|
13
14
|
"label.start-time": "开始时间",
|
|
14
|
-
"label.end-time": "
|
|
15
|
-
"label.tact-timer-mask-color": "
|
|
15
|
+
"label.end-time": "结束时间",
|
|
16
|
+
"label.tact-timer-mask-color": "掩码颜色"
|
|
16
17
|
}
|