@operato/scene-manufacturing 1.3.18 → 1.3.20

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 CHANGED
@@ -3,6 +3,24 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.3.20](https://github.com/things-scene/operato-scene/compare/v1.3.19...v1.3.20) (2024-07-11)
7
+
8
+
9
+ ### :bug: Bug Fix
10
+
11
+ * make tact-timer mask color settable ([29ac68c](https://github.com/things-scene/operato-scene/commit/29ac68cd91885d001494ded3843688aad20bbc21))
12
+
13
+
14
+
15
+ ## [1.3.19](https://github.com/things-scene/operato-scene/compare/v1.3.18...v1.3.19) (2024-07-06)
16
+
17
+
18
+ ### :bug: Bug Fix
19
+
20
+ * delete cached files ([722167b](https://github.com/things-scene/operato-scene/commit/722167b37aa7665a9911a06f8ced52ec54ef0c96))
21
+
22
+
23
+
6
24
  ## [1.3.18](https://github.com/things-scene/operato-scene/compare/v1.3.17...v1.3.18) (2024-07-06)
7
25
 
8
26
 
package/db.sqlite CHANGED
Binary file
@@ -0,0 +1 @@
1
+ export declare const MASK: string;
@@ -0,0 +1,35 @@
1
+ export const MASK = `
2
+ <svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 0 95 23">
3
+ <defs>
4
+ <style>
5
+ .cls-1 {
6
+ fill: url(#linear-gradient);
7
+ }
8
+
9
+ .cls-1, .cls-2 {
10
+ stroke-width: 0px;
11
+ }
12
+
13
+ .cls-2 {
14
+ fill: {{fillColor}};
15
+ }
16
+ </style>
17
+ <linearGradient id="linear-gradient" x1="47.4" y1="85.6" x2="47.4" y2="95" gradientTransform="translate(0 -74)" gradientUnits="userSpaceOnUse">
18
+ <stop offset="0" stop-color="#000" stop-opacity="0"/>
19
+ <stop offset=".9" stop-color="#000" stop-opacity=".2"/>
20
+ </linearGradient>
21
+ </defs>
22
+ <rect class="cls-1" x="1.4" y="11.6" width="92.1" height="9.5" rx="2.6" ry="2.6"/>
23
+ <path class="cls-2" d="M95,0H0v23h95V0ZM92.5,17.9c0,1.4-1.2,2.6-2.6,2.6H5.1c-1.4,0-2.6-1.2-2.6-2.6V5.1c0-1.4,1.2-2.6,2.6-2.6h84.8c1.4,0,2.6,1.2,2.6,2.6v12.8Z"/>
24
+ <path class="cls-2" d="M47.9,3.1c0-.6.7-.6.7-.6v-.7h-2.5v.7s.7,0,.7.6v16.7s0,.7-.7.8v.6h2.5v-.6c-.7-.1-.7-.8-.7-.8V3.1Z"/>
25
+ <path class="cls-2" d="M38.6,3.1c0-.6.7-.6.7-.6v-.7h-2.5v.7s.7,0,.7.6v16.7s0,.7-.7.8v.6h2.5v-.6c-.7-.1-.7-.8-.7-.8V3.1Z"/>
26
+ <path class="cls-2" d="M29.3,3.1c0-.6.7-.6.7-.6v-.7h-2.5v.7s.7,0,.7.6v16.7s0,.7-.7.8v.6h2.5v-.6c-.7-.1-.7-.8-.7-.8V3.1Z"/>
27
+ <path class="cls-2" d="M19.9,3.1c0-.6.7-.6.7-.6v-.7h-2.5v.7s.7,0,.7.6v16.7s0,.7-.7.8v.6h2.5v-.6c-.7-.1-.7-.8-.7-.8V3.1Z"/>
28
+ <path class="cls-2" d="M11,3.1c0-.6.7-.6.7-.6v-.7h-2.5v.7s.7,0,.7.6v16.7s0,.7-.7.8v.6h2.5v-.6c-.7-.1-.7-.8-.7-.8V3.1Z"/>
29
+ <path class="cls-2" d="M84.9,3.1c0-.6.7-.6.7-.6v-.7h-2.5v.7s.7,0,.7.6v16.7s0,.7-.7.8v.6h2.5v-.6c-.7-.1-.7-.8-.7-.8V3.1Z"/>
30
+ <path class="cls-2" d="M75.6,3.1c0-.6.7-.6.7-.6v-.7h-2.5v.7s.7,0,.7.6v16.7s0,.7-.7.8v.6h2.5v-.6c-.7-.1-.7-.8-.7-.8V3.1Z"/>
31
+ <path class="cls-2" d="M66.4,3.1c0-.6.7-.6.7-.6v-.7h-2.5v.7s.7,0,.7.6v16.7s0,.7-.7.8v.6h2.5v-.6c-.7-.1-.7-.8-.7-.8V3.1Z"/>
32
+ <path class="cls-2" d="M57.2,3.1c0-.6.7-.6.7-.6v-.7h-2.5v.7s.7,0,.7.6v16.7s0,.7-.7.8v.6h2.5v-.6c-.7-.1-.7-.8-.7-.8V3.1Z"/>
33
+ </svg>
34
+ `;
35
+ //# sourceMappingURL=tact-timer-mask.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tact-timer-mask.js","sourceRoot":"","sources":["../src/tact-timer-mask.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,IAAI,GAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiC3B,CAAA","sourcesContent":["export const MASK: string = `\n<svg id=\"Layer_1\" data-name=\"Layer 1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"1.1\" viewBox=\"0 0 95 23\">\n <defs>\n <style>\n .cls-1 {\n fill: url(#linear-gradient);\n }\n\n .cls-1, .cls-2 {\n stroke-width: 0px;\n }\n\n .cls-2 {\n fill: {{fillColor}};\n }\n </style>\n <linearGradient id=\"linear-gradient\" x1=\"47.4\" y1=\"85.6\" x2=\"47.4\" y2=\"95\" gradientTransform=\"translate(0 -74)\" gradientUnits=\"userSpaceOnUse\">\n <stop offset=\"0\" stop-color=\"#000\" stop-opacity=\"0\"/>\n <stop offset=\".9\" stop-color=\"#000\" stop-opacity=\".2\"/>\n </linearGradient>\n </defs>\n <rect class=\"cls-1\" x=\"1.4\" y=\"11.6\" width=\"92.1\" height=\"9.5\" rx=\"2.6\" ry=\"2.6\"/>\n <path class=\"cls-2\" d=\"M95,0H0v23h95V0ZM92.5,17.9c0,1.4-1.2,2.6-2.6,2.6H5.1c-1.4,0-2.6-1.2-2.6-2.6V5.1c0-1.4,1.2-2.6,2.6-2.6h84.8c1.4,0,2.6,1.2,2.6,2.6v12.8Z\"/>\n <path class=\"cls-2\" d=\"M47.9,3.1c0-.6.7-.6.7-.6v-.7h-2.5v.7s.7,0,.7.6v16.7s0,.7-.7.8v.6h2.5v-.6c-.7-.1-.7-.8-.7-.8V3.1Z\"/>\n <path class=\"cls-2\" d=\"M38.6,3.1c0-.6.7-.6.7-.6v-.7h-2.5v.7s.7,0,.7.6v16.7s0,.7-.7.8v.6h2.5v-.6c-.7-.1-.7-.8-.7-.8V3.1Z\"/>\n <path class=\"cls-2\" d=\"M29.3,3.1c0-.6.7-.6.7-.6v-.7h-2.5v.7s.7,0,.7.6v16.7s0,.7-.7.8v.6h2.5v-.6c-.7-.1-.7-.8-.7-.8V3.1Z\"/>\n <path class=\"cls-2\" d=\"M19.9,3.1c0-.6.7-.6.7-.6v-.7h-2.5v.7s.7,0,.7.6v16.7s0,.7-.7.8v.6h2.5v-.6c-.7-.1-.7-.8-.7-.8V3.1Z\"/>\n <path class=\"cls-2\" d=\"M11,3.1c0-.6.7-.6.7-.6v-.7h-2.5v.7s.7,0,.7.6v16.7s0,.7-.7.8v.6h2.5v-.6c-.7-.1-.7-.8-.7-.8V3.1Z\"/>\n <path class=\"cls-2\" d=\"M84.9,3.1c0-.6.7-.6.7-.6v-.7h-2.5v.7s.7,0,.7.6v16.7s0,.7-.7.8v.6h2.5v-.6c-.7-.1-.7-.8-.7-.8V3.1Z\"/>\n <path class=\"cls-2\" d=\"M75.6,3.1c0-.6.7-.6.7-.6v-.7h-2.5v.7s.7,0,.7.6v16.7s0,.7-.7.8v.6h2.5v-.6c-.7-.1-.7-.8-.7-.8V3.1Z\"/>\n <path class=\"cls-2\" d=\"M66.4,3.1c0-.6.7-.6.7-.6v-.7h-2.5v.7s.7,0,.7.6v16.7s0,.7-.7.8v.6h2.5v-.6c-.7-.1-.7-.8-.7-.8V3.1Z\"/>\n <path class=\"cls-2\" d=\"M57.2,3.1c0-.6.7-.6.7-.6v-.7h-2.5v.7s.7,0,.7.6v16.7s0,.7-.7.8v.6h2.5v-.6c-.7-.1-.7-.8-.7-.8V3.1Z\"/>\n</svg>\n`\n"]}
@@ -1,14 +1,14 @@
1
1
  import { ComponentNature, Properties, Shape } from '@hatiolab/things-scene';
2
2
  declare const TactTimer_base: typeof Shape;
3
3
  export default class TactTimer extends TactTimer_base {
4
- static MASK: HTMLImageElement;
5
- static get mask(): HTMLImageElement;
6
4
  private _start;
7
5
  private _due;
6
+ private imageElement?;
8
7
  get nature(): ComponentNature;
9
8
  ready(): void;
10
9
  start(): void;
11
10
  onchange(after: Properties): void;
11
+ getImageElement(): HTMLImageElement | undefined;
12
12
  counting(): void;
13
13
  render(context: CanvasRenderingContext2D): void;
14
14
  postrender(context: CanvasRenderingContext2D): void;
@@ -1,6 +1,6 @@
1
1
  import { Component, RectPath, Shape } from '@hatiolab/things-scene';
2
2
  import format from './libs/format';
3
- const mask = new URL('../icons/tact-timer-mask.svg', import.meta.url).href;
3
+ import { MASK } from './tact-timer-mask';
4
4
  const NATURE = {
5
5
  mutable: false,
6
6
  resizable: true,
@@ -32,6 +32,11 @@ const NATURE = {
32
32
  options: ['', 'increase', 'decrease']
33
33
  }
34
34
  },
35
+ {
36
+ type: 'color',
37
+ label: 'tact-timer-mask-color',
38
+ name: 'maskColor'
39
+ },
35
40
  {
36
41
  type: 'color',
37
42
  label: 'increase-progress-color',
@@ -92,13 +97,6 @@ export default class TactTimer extends RectPath(Shape) {
92
97
  this._start = 0;
93
98
  this._due = 0;
94
99
  }
95
- static get mask() {
96
- if (!TactTimer.MASK) {
97
- TactTimer.MASK = new Image();
98
- TactTimer.MASK.src = mask;
99
- }
100
- return TactTimer.MASK;
101
- }
102
100
  get nature() {
103
101
  return NATURE;
104
102
  }
@@ -125,6 +123,18 @@ export default class TactTimer extends RectPath(Shape) {
125
123
  if ('startTime' in after || 'endTime' in after) {
126
124
  this.start();
127
125
  }
126
+ if ('maskColor' in after) {
127
+ delete this.imageElement;
128
+ }
129
+ }
130
+ getImageElement() {
131
+ if (!this.imageElement) {
132
+ const { maskColor = 'black' } = this.state;
133
+ this.imageElement = new Image();
134
+ this.imageElement.src =
135
+ 'data:image/svg+xml;charset=UTF-8;base64,' + btoa(MASK.replace(/{{fillColor}}/g, maskColor));
136
+ }
137
+ return this.imageElement;
128
138
  }
129
139
  counting() {
130
140
  if (this.disposed) {
@@ -147,7 +157,7 @@ export default class TactTimer extends RectPath(Shape) {
147
157
  });
148
158
  }
149
159
  render(context) {
150
- var { top, left, height, width, round = 0, fontColor, increaseFontColor, decreaseFontColor, increaseProgressColor = 'transparent', decreaseProgressColor = 'transparent', underThresholdColor = 'transparent', progressDirection = 'increase', progressThreshold = 0, showProgress, showTimer } = this.state;
160
+ var { top, left, height, width, round = 0, fontColor, maskColor, increaseFontColor, decreaseFontColor, increaseProgressColor = 'transparent', decreaseProgressColor = 'transparent', underThresholdColor = 'transparent', progressDirection = 'increase', progressThreshold = 0, showProgress } = this.state;
151
161
  const increase = this.countdown > 0;
152
162
  const totalDuration = (this._due - this._start) / 1000;
153
163
  const underThreshold = this.countdown / totalDuration < progressThreshold / 100;
@@ -179,7 +189,8 @@ export default class TactTimer extends RectPath(Shape) {
179
189
  context.fill();
180
190
  context.beginPath();
181
191
  }
182
- this.drawImage(context, TactTimer.mask, left, top, width, height);
192
+ const image = this.getImageElement();
193
+ this.drawImage(context, image, left, top, width, height);
183
194
  context.roundRect(left, top, width, height, round);
184
195
  this.setState('fontColor', (increase ? increaseFontColor : decreaseFontColor) || fontColor);
185
196
  }
@@ -1 +1 @@
1
- {"version":3,"file":"tact-timer.js","sourceRoot":"","sources":["../src/tact-timer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA+B,QAAQ,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AAChG,OAAO,MAAM,MAAM,eAAe,CAAA;AAElC,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,8BAA8B,EAAE,MAAM,CAA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AAO,CAAC,IAAI,QAAQ,EAAE,CAAC;YAChC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,CAAC,CAAA;YAChC,IAAI,CAAC,QAAQ,CAAC;gBACZ,SAAS;gBACT,OAAO;aACR,CAAC,CAAA;QACJ,CAAC;aAAM,IAAI,OAAO,CAAC,IAAI,QAAQ,EAAE,CAAC;YAChC,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,GAAI,CAAY,CAAC,KAAK,CAAC,aAAa,CAAC,CAAA;YAC/D,IAAI,CAAC,QAAQ,CAAC;gBACZ,SAAS;gBACT,OAAO;aACR,CAAC,CAAA;QACJ,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,QAAQ,CAAC;gBACZ,SAAS,EAAE,SAAS;gBACpB,OAAO,EAAE,SAAS;aACnB,CAAC,CAAA;QACJ,CAAC;IACH,CAAC;CACF;AAED,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,SAAS,CAAC,CAAA","sourcesContent":["import { Component, ComponentNature, Properties, RectPath, Shape } from '@hatiolab/things-scene'\nimport format from './libs/format'\n\nconst mask = new URL('../icons/tact-timer-mask.svg', import.meta.url).href\n\nconst NATURE: ComponentNature = {\n mutable: false,\n resizable: true,\n rotatable: true,\n properties: [\n {\n type: 'string',\n label: 'start-time',\n name: 'startTime',\n placeholder: 'YYYYMMDDhhmmss'\n },\n {\n type: 'string',\n label: 'end-time',\n name: 'endTime',\n placeholder: 'YYYYMMDDhhmmss'\n },\n {\n type: 'string',\n label: 'format',\n name: 'format',\n placeholder: 'hh:mm:ss'\n },\n {\n type: 'select',\n label: 'progress-direction',\n name: 'progressDirection',\n property: {\n options: ['', 'increase', 'decrease']\n }\n },\n {\n type: 'color',\n label: 'increase-progress-color',\n name: 'increaseProgressColor'\n },\n {\n type: 'color',\n label: 'decrease-progress-color',\n name: 'decreaseProgressColor'\n },\n {\n type: 'color',\n label: 'increase-font-color',\n name: 'increaseFontColor'\n },\n {\n type: 'color',\n label: 'decrese-font-color',\n name: 'decreaseFontColor'\n },\n {\n type: 'color',\n label: 'under-threshold-color',\n name: 'underThresholdColor'\n },\n {\n type: 'number',\n label: 'progress-threshold',\n name: 'progressThreshold',\n placeholder: '%'\n },\n {\n type: 'number',\n label: 'round',\n name: 'round'\n },\n {\n type: 'boolean',\n label: 'auto-start',\n name: 'autoStart'\n },\n {\n type: 'boolean',\n label: 'show-progress',\n name: 'showProgress'\n },\n {\n type: 'boolean',\n label: 'show-timer',\n name: 'showTimer'\n }\n ],\n help: 'scene/component/manufacturing/tact-timer'\n}\n\nexport default class TactTimer extends RectPath(Shape) {\n static MASK: HTMLImageElement\n\n static get mask() {\n if (!TactTimer.MASK) {\n TactTimer.MASK = new Image()\n TactTimer.MASK.src = mask\n }\n\n return TactTimer.MASK\n }\n\n private _start: number = 0\n private _due: number = 0\n\n get nature() {\n return NATURE\n }\n\n ready() {\n if (!this.app.isViewMode) {\n return\n }\n\n const { autoStart } = this.state\n\n if (autoStart) {\n this.start()\n }\n }\n\n start() {\n const { startTime, endTime } = this.state\n const start = this.parseTime(startTime)\n const end = this.parseTime(endTime)\n\n if (start && end) {\n this._due = end.getTime()\n this._start = start.getTime()\n this.counting()\n }\n }\n\n onchange(after: Properties) {\n if ('startTime' in after || 'endTime' in after) {\n this.start()\n }\n }\n\n counting() {\n if (this.disposed) {\n return\n }\n\n requestAnimationFrame(() => {\n const { showTimer } = this.state\n const countdown = this.countdown\n\n if (showTimer) {\n const text = format(Math.abs(countdown), this.getState('format'))\n this.text = text\n } else {\n this.text = ''\n }\n\n this.setState('data', this.countdown)\n\n setTimeout(() => {\n this.counting()\n }, 1000)\n })\n }\n\n render(context: CanvasRenderingContext2D) {\n var {\n top,\n left,\n height,\n width,\n round = 0,\n fontColor,\n increaseFontColor,\n decreaseFontColor,\n increaseProgressColor = 'transparent',\n decreaseProgressColor = 'transparent',\n underThresholdColor = 'transparent',\n progressDirection = 'increase',\n progressThreshold = 0,\n showProgress,\n showTimer\n } = this.state\n\n const increase = this.countdown > 0\n const totalDuration = (this._due - this._start) / 1000\n const underThreshold = this.countdown / totalDuration < progressThreshold / 100\n\n // progress의 색상\n context.beginPath()\n context.roundRect(left, top, width, height, round)\n context.clip()\n this.drawFill(context)\n\n // value의 색상\n context.beginPath()\n\n if (!showProgress) {\n return\n }\n\n var progress = Math.abs((this.countdown / totalDuration) * 100)\n\n if (!isNaN(progress)) {\n progress = width - (width * progress) / 100\n progress = Math.max(Math.min(progress, width), 0)\n\n if (progressDirection == 'increase') {\n context.rect(left, top, progress, height)\n } else {\n context.rect(left + progress, top, width - progress, height)\n }\n\n context.fillStyle = increase\n ? underThreshold\n ? underThresholdColor\n : increaseProgressColor\n : decreaseProgressColor\n context.fill()\n\n context.beginPath()\n }\n\n this.drawImage(context, TactTimer.mask, left, top, width, height)\n context.roundRect(left, top, width, height, round)\n\n this.setState('fontColor', (increase ? increaseFontColor : decreaseFontColor) || fontColor)\n }\n\n postrender(context: CanvasRenderingContext2D) {\n this.drawStroke(context)\n this.drawText(context)\n }\n\n parseTime(timeString: string): Date | undefined {\n if (!timeString || timeString.length !== 14) {\n return undefined\n }\n const year = parseInt(timeString.slice(0, 4), 10)\n const month = parseInt(timeString.slice(4, 6), 10) - 1\n const day = parseInt(timeString.slice(6, 8), 10)\n const hour = parseInt(timeString.slice(8, 10), 10)\n const minute = parseInt(timeString.slice(10, 12), 10)\n const second = parseInt(timeString.slice(12, 14), 10)\n\n return new Date(year, month, day, hour, minute, second)\n }\n\n get countdown(): number {\n const due = this._due || 0\n const now = Date.now()\n\n return Math.round((due - now) / 1000)\n }\n\n get value() {\n const { startTime, endTime } = this.state\n return [startTime, endTime]\n }\n\n set value(v) {\n if (v instanceof Array) {\n const [startTime, endTime] = v\n this.setState({\n startTime,\n endTime\n })\n } else if (typeof v == 'object') {\n const { startTime, endTime } = v\n this.setState({\n startTime,\n endTime\n })\n } else if (typeof v == 'string') {\n const [startTime, endTime] = (v as string).split(/[-+/%$#_,]+/)\n this.setState({\n startTime,\n endTime\n })\n } else {\n this.setState({\n startTime: undefined,\n endTime: undefined\n })\n }\n }\n}\n\nComponent.register('tact-timer', TactTimer)\n"]}
1
+ {"version":3,"file":"tact-timer.js","sourceRoot":"","sources":["../src/tact-timer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA+B,QAAQ,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AAChG,OAAO,MAAM,MAAM,eAAe,CAAA;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAA;AAExC,MAAM,MAAM,GAAoB;IAC9B,OAAO,EAAE,KAAK;IACd,SAAS,EAAE,IAAI;IACf,SAAS,EAAE,IAAI;IACf,UAAU,EAAE;QACV;YACE,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,YAAY;YACnB,IAAI,EAAE,WAAW;YACjB,WAAW,EAAE,gBAAgB;SAC9B;QACD;YACE,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,UAAU;YACjB,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,gBAAgB;SAC9B;QACD;YACE,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,QAAQ;YACf,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,UAAU;SACxB;QACD;YACE,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,oBAAoB;YAC3B,IAAI,EAAE,mBAAmB;YACzB,QAAQ,EAAE;gBACR,OAAO,EAAE,CAAC,EAAE,EAAE,UAAU,EAAE,UAAU,CAAC;aACtC;SACF;QACD;YACE,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,uBAAuB;YAC9B,IAAI,EAAE,WAAW;SAClB;QACD;YACE,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,yBAAyB;YAChC,IAAI,EAAE,uBAAuB;SAC9B;QACD;YACE,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,yBAAyB;YAChC,IAAI,EAAE,uBAAuB;SAC9B;QACD;YACE,IAAI,EAAE,OAAO;YACb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AS,CAAC,CAAA","sourcesContent":["import { Component, ComponentNature, Properties, RectPath, Shape } from '@hatiolab/things-scene'\nimport format from './libs/format'\nimport { MASK } from './tact-timer-mask'\n\nconst NATURE: ComponentNature = {\n mutable: false,\n resizable: true,\n rotatable: true,\n properties: [\n {\n type: 'string',\n label: 'start-time',\n name: 'startTime',\n placeholder: 'YYYYMMDDhhmmss'\n },\n {\n type: 'string',\n label: 'end-time',\n name: 'endTime',\n placeholder: 'YYYYMMDDhhmmss'\n },\n {\n type: 'string',\n label: 'format',\n name: 'format',\n placeholder: 'hh:mm:ss'\n },\n {\n type: 'select',\n label: 'progress-direction',\n name: 'progressDirection',\n property: {\n options: ['', 'increase', 'decrease']\n }\n },\n {\n type: 'color',\n label: 'tact-timer-mask-color',\n name: 'maskColor'\n },\n {\n type: 'color',\n label: 'increase-progress-color',\n name: 'increaseProgressColor'\n },\n {\n type: 'color',\n label: 'decrease-progress-color',\n name: 'decreaseProgressColor'\n },\n {\n type: 'color',\n label: 'increase-font-color',\n name: 'increaseFontColor'\n },\n {\n type: 'color',\n label: 'decrese-font-color',\n name: 'decreaseFontColor'\n },\n {\n type: 'color',\n label: 'under-threshold-color',\n name: 'underThresholdColor'\n },\n {\n type: 'number',\n label: 'progress-threshold',\n name: 'progressThreshold',\n placeholder: '%'\n },\n {\n type: 'number',\n label: 'round',\n name: 'round'\n },\n {\n type: 'boolean',\n label: 'auto-start',\n name: 'autoStart'\n },\n {\n type: 'boolean',\n label: 'show-progress',\n name: 'showProgress'\n },\n {\n type: 'boolean',\n label: 'show-timer',\n name: 'showTimer'\n }\n ],\n help: 'scene/component/manufacturing/tact-timer'\n}\n\nexport default class TactTimer extends RectPath(Shape) {\n private _start: number = 0\n private _due: number = 0\n private imageElement?: HTMLImageElement\n\n get nature() {\n return NATURE\n }\n\n ready() {\n if (!this.app.isViewMode) {\n return\n }\n\n const { autoStart } = this.state\n\n if (autoStart) {\n this.start()\n }\n }\n\n start() {\n const { startTime, endTime } = this.state\n const start = this.parseTime(startTime)\n const end = this.parseTime(endTime)\n\n if (start && end) {\n this._due = end.getTime()\n this._start = start.getTime()\n this.counting()\n }\n }\n\n onchange(after: Properties) {\n if ('startTime' in after || 'endTime' in after) {\n this.start()\n }\n if ('maskColor' in after) {\n delete this.imageElement\n }\n }\n\n getImageElement(): HTMLImageElement | undefined {\n if (!this.imageElement) {\n const { maskColor = 'black' } = this.state\n\n this.imageElement = new Image()\n this.imageElement.src =\n 'data:image/svg+xml;charset=UTF-8;base64,' + btoa(MASK.replace(/{{fillColor}}/g, maskColor))\n }\n\n return this.imageElement\n }\n\n counting() {\n if (this.disposed) {\n return\n }\n\n requestAnimationFrame(() => {\n const { showTimer } = this.state\n const countdown = this.countdown\n\n if (showTimer) {\n const text = format(Math.abs(countdown), this.getState('format'))\n this.text = text\n } else {\n this.text = ''\n }\n\n this.setState('data', this.countdown)\n\n setTimeout(() => {\n this.counting()\n }, 1000)\n })\n }\n\n render(context: CanvasRenderingContext2D) {\n var {\n top,\n left,\n height,\n width,\n round = 0,\n fontColor,\n maskColor,\n increaseFontColor,\n decreaseFontColor,\n increaseProgressColor = 'transparent',\n decreaseProgressColor = 'transparent',\n underThresholdColor = 'transparent',\n progressDirection = 'increase',\n progressThreshold = 0,\n showProgress\n } = this.state\n\n const increase = this.countdown > 0\n const totalDuration = (this._due - this._start) / 1000\n const underThreshold = this.countdown / totalDuration < progressThreshold / 100\n\n // progress의 색상\n context.beginPath()\n context.roundRect(left, top, width, height, round)\n context.clip()\n this.drawFill(context)\n\n // value의 색상\n context.beginPath()\n\n if (!showProgress) {\n return\n }\n\n var progress = Math.abs((this.countdown / totalDuration) * 100)\n\n if (!isNaN(progress)) {\n progress = width - (width * progress) / 100\n progress = Math.max(Math.min(progress, width), 0)\n\n if (progressDirection == 'increase') {\n context.rect(left, top, progress, height)\n } else {\n context.rect(left + progress, top, width - progress, height)\n }\n\n context.fillStyle = increase\n ? underThreshold\n ? underThresholdColor\n : increaseProgressColor\n : decreaseProgressColor\n context.fill()\n\n context.beginPath()\n }\n\n const image = this.getImageElement()\n this.drawImage(context, image!, left, top, width, height)\n\n context.roundRect(left, top, width, height, round)\n\n this.setState('fontColor', (increase ? increaseFontColor : decreaseFontColor) || fontColor)\n }\n\n postrender(context: CanvasRenderingContext2D) {\n this.drawStroke(context)\n this.drawText(context)\n }\n\n parseTime(timeString: string): Date | undefined {\n if (!timeString || timeString.length !== 14) {\n return undefined\n }\n const year = parseInt(timeString.slice(0, 4), 10)\n const month = parseInt(timeString.slice(4, 6), 10) - 1\n const day = parseInt(timeString.slice(6, 8), 10)\n const hour = parseInt(timeString.slice(8, 10), 10)\n const minute = parseInt(timeString.slice(10, 12), 10)\n const second = parseInt(timeString.slice(12, 14), 10)\n\n return new Date(year, month, day, hour, minute, second)\n }\n\n get countdown(): number {\n const due = this._due || 0\n const now = Date.now()\n\n return Math.round((due - now) / 1000)\n }\n\n get value() {\n const { startTime, endTime } = this.state\n return [startTime, endTime]\n }\n\n set value(v) {\n if (v instanceof Array) {\n const [startTime, endTime] = v\n this.setState({\n startTime,\n endTime\n })\n } else if (typeof v == 'object') {\n const { startTime, endTime } = v\n this.setState({\n startTime,\n endTime\n })\n } else if (typeof v == 'string') {\n const [startTime, endTime] = (v as string).split(/[-+/%$#_,]+/)\n this.setState({\n startTime,\n endTime\n })\n } else {\n this.setState({\n startTime: undefined,\n endTime: undefined\n })\n }\n }\n}\n\nComponent.register('tact-timer', TactTimer)\n"]}
@@ -2,6 +2,10 @@
2
2
  <svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 0 95 23">
3
3
  <defs>
4
4
  <style>
5
+ :root {
6
+ --mask-fill-color: #000;
7
+ }
8
+
5
9
  .cls-1 {
6
10
  fill: url(#linear-gradient);
7
11
  }
@@ -11,7 +15,7 @@
11
15
  }
12
16
 
13
17
  .cls-2 {
14
- fill: #000;
18
+ fill: var(--mask-fill-color);
15
19
  }
16
20
  </style>
17
21
  <linearGradient id="linear-gradient" x1="47.4" y1="85.6" x2="47.4" y2="95" gradientTransform="translate(0 -74)" gradientUnits="userSpaceOnUse">
@@ -6,29 +6,14 @@
6
6
  "auditLog": "logs/.08636eb59927f12972f6774f5947c8507b3564c2-audit.json",
7
7
  "files": [
8
8
  {
9
- "date": 1720137176328,
10
- "name": "logs/application-2024-07-05-08.log",
11
- "hash": "13691a17d94791b492d86113866bc1079c7bb9b78c9a00a3d28796b3158531e7"
9
+ "date": 1720670342063,
10
+ "name": "logs/application-2024-07-11-12.log",
11
+ "hash": "85677c40f2076ef65f5e6291a77db74beabb6e73aacc0ecf70907412bcc75a2b"
12
12
  },
13
13
  {
14
- "date": 1720150883284,
15
- "name": "logs/application-2024-07-05-12.log",
16
- "hash": "71bf59be2d6af3eab63175bf2cfd6c38b7f7f058ef817b8836a6fdadbc703b88"
17
- },
18
- {
19
- "date": 1720197806708,
20
- "name": "logs/application-2024-07-06-01.log",
21
- "hash": "0a47cab89c205e35ebfd442248476193b54674b7588588df7c5b2931690a788e"
22
- },
23
- {
24
- "date": 1720204703341,
25
- "name": "logs/application-2024-07-06-03.log",
26
- "hash": "bdce70964ce115b741d8d26b42cd4b0525f08b3fa19fe1ab431a456c5af47248"
27
- },
28
- {
29
- "date": 1720231834693,
30
- "name": "logs/application-2024-07-06-11.log",
31
- "hash": "e42102420e9d00138f3e8868e15a6ac005106287ea57d0d9cf1804a5855eb128"
14
+ "date": 1720672295153,
15
+ "name": "logs/application-2024-07-11-13.log",
16
+ "hash": "0cae176bd15f168546d80c132308f082e2c5775e3c36374db76976c46b882207"
32
17
  }
33
18
  ],
34
19
  "hashType": "sha256"
@@ -34,6 +34,21 @@
34
34
  "date": 1720231836497,
35
35
  "name": "logs/connections-2024-07-06-11.log",
36
36
  "hash": "90547f443988ace04bdcd961cefa8e473792444776e628273dd29e6cd70092c7"
37
+ },
38
+ {
39
+ "date": 1720235760768,
40
+ "name": "logs/connections-2024-07-06-12.log",
41
+ "hash": "683660cbeda45a721e399b95a8e16ab6c88ca8ef13b53eed9cc526294cae0de7"
42
+ },
43
+ {
44
+ "date": 1720670343838,
45
+ "name": "logs/connections-2024-07-11-12.log",
46
+ "hash": "1b8f201fc8ec18f5851a826c15476b6d516b5a0ccb1c9b5e92488e14d90ed899"
47
+ },
48
+ {
49
+ "date": 1720672296862,
50
+ "name": "logs/connections-2024-07-11-13.log",
51
+ "hash": "7a32a7cd575038336c75291e5a9ea2dae54a24550ff0442aed19ab30855145ea"
37
52
  }
38
53
  ],
39
54
  "hashType": "sha256"
@@ -1,7 +1,7 @@
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'
1
+ 2024-07-11T12:59:03+09:00 info: File Storage is Ready.
2
+ 2024-07-11T12:59:04+09:00 error: oracledb module loading failed
3
+ 2024-07-11T12:59:04+09:00 error: oracledb module loading failed
4
+ 2024-07-11T12:59:04+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-07-06T11:10:37+09:00 error: Cannot find module '@thiagoelg/node-printer'
13
+ 2024-07-11T12:59:04+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,6 +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-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
21
+ 2024-07-11T12:59:05+09:00 info: Default DataSource established
22
+ 2024-07-11T12:59:06+09:00 info: 🚀 Server ready at http://0.0.0.0:3000/graphql
23
+ 2024-07-11T12:59:06+09:00 info: 🚀 Subscriptions ready at ws://0.0.0.0:3000/graphql
@@ -0,0 +1,23 @@
1
+ 2024-07-11T13:31:36+09:00 info: File Storage is Ready.
2
+ 2024-07-11T13:31:37+09:00 error: oracledb module loading failed
3
+ 2024-07-11T13:31:37+09:00 error: oracledb module loading failed
4
+ 2024-07-11T13:31:37+09:00 error: Cannot find module '@thiagoelg/node-printer'
5
+ Require stack:
6
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/board-service/dist-server/controllers/print.js
7
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/board-service/dist-server/controllers/index.js
8
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/board-service/dist-server/index.js
9
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/env/lib/module-loader.js
10
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/env/index.js
11
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/shell/dist-server/server-dev.js
12
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/shell/bin/things-factory-dev
13
+ 2024-07-11T13:31:37+09:00 error: Cannot find module '@thiagoelg/node-printer'
14
+ Require stack:
15
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/print-service/dist-server/middlewares/index.js
16
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/print-service/dist-server/index.js
17
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/env/lib/module-loader.js
18
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/env/index.js
19
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/shell/dist-server/server-dev.js
20
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/shell/bin/things-factory-dev
21
+ 2024-07-11T13:31:38+09:00 info: Default DataSource established
22
+ 2024-07-11T13:31:39+09:00 info: 🚀 Server ready at http://0.0.0.0:3000/graphql
23
+ 2024-07-11T13:31:39+09:00 info: 🚀 Subscriptions ready at ws://0.0.0.0:3000/graphql
@@ -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:
@@ -0,0 +1,47 @@
1
+ 2024-07-11T12:59:06+09:00 info: Initializing ConnectionManager...
2
+ 2024-07-11T12:59:06+09:00 info: Connector 'echo-back-server' started to ready
3
+ 2024-07-11T12:59:06+09:00 info: Connector 'echo-back' started to ready
4
+ 2024-07-11T12:59:06+09:00 info: Connector 'http-connector' started to ready
5
+ 2024-07-11T12:59:06+09:00 info: Connector 'graphql-connector' started to ready
6
+ 2024-07-11T12:59:06+09:00 info: Connector 'sqlite-connector' started to ready
7
+ 2024-07-11T12:59:06+09:00 info: Connector 'postgresql-connector' started to ready
8
+ 2024-07-11T12:59:06+09:00 info: Connector 'mqtt-connector' started to ready
9
+ 2024-07-11T12:59:06+09:00 info: Connector 'mssql-connector' started to ready
10
+ 2024-07-11T12:59:06+09:00 info: Connector 'oracle-connector' started to ready
11
+ 2024-07-11T12:59:06+09:00 info: Connector 'mysql-connector' started to ready
12
+ 2024-07-11T12:59:06+09:00 info: Connector 'socket-server' started to ready
13
+ 2024-07-11T12:59:06+09:00 info: Connector 'operato-connector' started to ready
14
+ 2024-07-11T12:59:06+09:00 info: Connector 'email-connector' started to ready
15
+ 2024-07-11T12:59:06+09:00 info: Connector 'influxdb-connector' started to ready
16
+ 2024-07-11T12:59:06+09:00 info: Connector 'msgraph-connector' started to ready
17
+ 2024-07-11T12:59:06+09:00 info: echo-back-servers are ready
18
+ 2024-07-11T12:59:06+09:00 info: echo-back connections are ready
19
+ 2024-07-11T12:59:06+09:00 info: http-connector connections are ready
20
+ 2024-07-11T12:59:06+09:00 info: graphql-connector connections are ready
21
+ 2024-07-11T12:59:06+09:00 info: sqlite-connector connections are ready
22
+ 2024-07-11T12:59:06+09:00 info: postgresql-connector connections are ready
23
+ 2024-07-11T12:59:06+09:00 info: mqtt-connector connections are ready
24
+ 2024-07-11T12:59:06+09:00 info: mssql-connector connections are ready
25
+ 2024-07-11T12:59:06+09:00 info: oracle-connector connections are ready
26
+ 2024-07-11T12:59:06+09:00 info: mysql-connector connections are ready
27
+ 2024-07-11T12:59:06+09:00 info: socket servers are ready
28
+ 2024-07-11T12:59:06+09:00 info: graphql-connector connections are ready
29
+ 2024-07-11T12:59:06+09:00 info: email connections are ready
30
+ 2024-07-11T12:59:06+09:00 info: influxdb connections are ready
31
+ 2024-07-11T12:59:06+09:00 info: msgraph-connector connections are ready
32
+ 2024-07-11T12:59:06+09:00 info: All connector for 'echo-back-server' ready
33
+ 2024-07-11T12:59:06+09:00 info: All connector for 'echo-back' ready
34
+ 2024-07-11T12:59:06+09:00 info: All connector for 'http-connector' ready
35
+ 2024-07-11T12:59:06+09:00 info: All connector for 'graphql-connector' ready
36
+ 2024-07-11T12:59:06+09:00 info: All connector for 'sqlite-connector' ready
37
+ 2024-07-11T12:59:06+09:00 info: All connector for 'postgresql-connector' ready
38
+ 2024-07-11T12:59:06+09:00 info: All connector for 'mqtt-connector' ready
39
+ 2024-07-11T12:59:06+09:00 info: All connector for 'mssql-connector' ready
40
+ 2024-07-11T12:59:06+09:00 info: All connector for 'oracle-connector' ready
41
+ 2024-07-11T12:59:06+09:00 info: All connector for 'mysql-connector' ready
42
+ 2024-07-11T12:59:06+09:00 info: All connector for 'socket-server' ready
43
+ 2024-07-11T12:59:06+09:00 info: All connector for 'operato-connector' ready
44
+ 2024-07-11T12:59:06+09:00 info: All connector for 'email-connector' ready
45
+ 2024-07-11T12:59:06+09:00 info: All connector for 'influxdb-connector' ready
46
+ 2024-07-11T12:59:06+09:00 info: All connector for 'msgraph-connector' ready
47
+ 2024-07-11T12:59:06+09:00 info: ConnectionManager initialization done:
@@ -0,0 +1,47 @@
1
+ 2024-07-11T13:31:39+09:00 info: Initializing ConnectionManager...
2
+ 2024-07-11T13:31:39+09:00 info: Connector 'echo-back-server' started to ready
3
+ 2024-07-11T13:31:39+09:00 info: Connector 'echo-back' started to ready
4
+ 2024-07-11T13:31:39+09:00 info: Connector 'http-connector' started to ready
5
+ 2024-07-11T13:31:39+09:00 info: Connector 'graphql-connector' started to ready
6
+ 2024-07-11T13:31:39+09:00 info: Connector 'sqlite-connector' started to ready
7
+ 2024-07-11T13:31:39+09:00 info: Connector 'postgresql-connector' started to ready
8
+ 2024-07-11T13:31:39+09:00 info: Connector 'mqtt-connector' started to ready
9
+ 2024-07-11T13:31:39+09:00 info: Connector 'mssql-connector' started to ready
10
+ 2024-07-11T13:31:39+09:00 info: Connector 'oracle-connector' started to ready
11
+ 2024-07-11T13:31:39+09:00 info: Connector 'mysql-connector' started to ready
12
+ 2024-07-11T13:31:39+09:00 info: Connector 'socket-server' started to ready
13
+ 2024-07-11T13:31:39+09:00 info: Connector 'operato-connector' started to ready
14
+ 2024-07-11T13:31:39+09:00 info: Connector 'email-connector' started to ready
15
+ 2024-07-11T13:31:39+09:00 info: Connector 'influxdb-connector' started to ready
16
+ 2024-07-11T13:31:39+09:00 info: Connector 'msgraph-connector' started to ready
17
+ 2024-07-11T13:31:39+09:00 info: echo-back-servers are ready
18
+ 2024-07-11T13:31:39+09:00 info: echo-back connections are ready
19
+ 2024-07-11T13:31:39+09:00 info: http-connector connections are ready
20
+ 2024-07-11T13:31:39+09:00 info: graphql-connector connections are ready
21
+ 2024-07-11T13:31:39+09:00 info: sqlite-connector connections are ready
22
+ 2024-07-11T13:31:39+09:00 info: postgresql-connector connections are ready
23
+ 2024-07-11T13:31:39+09:00 info: mqtt-connector connections are ready
24
+ 2024-07-11T13:31:39+09:00 info: mssql-connector connections are ready
25
+ 2024-07-11T13:31:39+09:00 info: oracle-connector connections are ready
26
+ 2024-07-11T13:31:39+09:00 info: mysql-connector connections are ready
27
+ 2024-07-11T13:31:39+09:00 info: socket servers are ready
28
+ 2024-07-11T13:31:39+09:00 info: graphql-connector connections are ready
29
+ 2024-07-11T13:31:39+09:00 info: email connections are ready
30
+ 2024-07-11T13:31:39+09:00 info: influxdb connections are ready
31
+ 2024-07-11T13:31:39+09:00 info: msgraph-connector connections are ready
32
+ 2024-07-11T13:31:39+09:00 info: All connector for 'echo-back-server' ready
33
+ 2024-07-11T13:31:39+09:00 info: All connector for 'echo-back' ready
34
+ 2024-07-11T13:31:39+09:00 info: All connector for 'http-connector' ready
35
+ 2024-07-11T13:31:39+09:00 info: All connector for 'graphql-connector' ready
36
+ 2024-07-11T13:31:39+09:00 info: All connector for 'sqlite-connector' ready
37
+ 2024-07-11T13:31:39+09:00 info: All connector for 'postgresql-connector' ready
38
+ 2024-07-11T13:31:39+09:00 info: All connector for 'mqtt-connector' ready
39
+ 2024-07-11T13:31:39+09:00 info: All connector for 'mssql-connector' ready
40
+ 2024-07-11T13:31:39+09:00 info: All connector for 'oracle-connector' ready
41
+ 2024-07-11T13:31:39+09:00 info: All connector for 'mysql-connector' ready
42
+ 2024-07-11T13:31:39+09:00 info: All connector for 'socket-server' ready
43
+ 2024-07-11T13:31:39+09:00 info: All connector for 'operato-connector' ready
44
+ 2024-07-11T13:31:39+09:00 info: All connector for 'email-connector' ready
45
+ 2024-07-11T13:31:39+09:00 info: All connector for 'influxdb-connector' ready
46
+ 2024-07-11T13:31:39+09:00 info: All connector for 'msgraph-connector' ready
47
+ 2024-07-11T13:31: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.18",
4
+ "version": "1.3.20",
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": "1599159c208863007d7f2d2b174c2cc4845653f7"
60
+ "gitHead": "0aff0a16158ae1d77d41e564a6a5a9d5ab92f39d"
61
61
  }
@@ -0,0 +1,34 @@
1
+ export const MASK: string = `
2
+ <svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 0 95 23">
3
+ <defs>
4
+ <style>
5
+ .cls-1 {
6
+ fill: url(#linear-gradient);
7
+ }
8
+
9
+ .cls-1, .cls-2 {
10
+ stroke-width: 0px;
11
+ }
12
+
13
+ .cls-2 {
14
+ fill: {{fillColor}};
15
+ }
16
+ </style>
17
+ <linearGradient id="linear-gradient" x1="47.4" y1="85.6" x2="47.4" y2="95" gradientTransform="translate(0 -74)" gradientUnits="userSpaceOnUse">
18
+ <stop offset="0" stop-color="#000" stop-opacity="0"/>
19
+ <stop offset=".9" stop-color="#000" stop-opacity=".2"/>
20
+ </linearGradient>
21
+ </defs>
22
+ <rect class="cls-1" x="1.4" y="11.6" width="92.1" height="9.5" rx="2.6" ry="2.6"/>
23
+ <path class="cls-2" d="M95,0H0v23h95V0ZM92.5,17.9c0,1.4-1.2,2.6-2.6,2.6H5.1c-1.4,0-2.6-1.2-2.6-2.6V5.1c0-1.4,1.2-2.6,2.6-2.6h84.8c1.4,0,2.6,1.2,2.6,2.6v12.8Z"/>
24
+ <path class="cls-2" d="M47.9,3.1c0-.6.7-.6.7-.6v-.7h-2.5v.7s.7,0,.7.6v16.7s0,.7-.7.8v.6h2.5v-.6c-.7-.1-.7-.8-.7-.8V3.1Z"/>
25
+ <path class="cls-2" d="M38.6,3.1c0-.6.7-.6.7-.6v-.7h-2.5v.7s.7,0,.7.6v16.7s0,.7-.7.8v.6h2.5v-.6c-.7-.1-.7-.8-.7-.8V3.1Z"/>
26
+ <path class="cls-2" d="M29.3,3.1c0-.6.7-.6.7-.6v-.7h-2.5v.7s.7,0,.7.6v16.7s0,.7-.7.8v.6h2.5v-.6c-.7-.1-.7-.8-.7-.8V3.1Z"/>
27
+ <path class="cls-2" d="M19.9,3.1c0-.6.7-.6.7-.6v-.7h-2.5v.7s.7,0,.7.6v16.7s0,.7-.7.8v.6h2.5v-.6c-.7-.1-.7-.8-.7-.8V3.1Z"/>
28
+ <path class="cls-2" d="M11,3.1c0-.6.7-.6.7-.6v-.7h-2.5v.7s.7,0,.7.6v16.7s0,.7-.7.8v.6h2.5v-.6c-.7-.1-.7-.8-.7-.8V3.1Z"/>
29
+ <path class="cls-2" d="M84.9,3.1c0-.6.7-.6.7-.6v-.7h-2.5v.7s.7,0,.7.6v16.7s0,.7-.7.8v.6h2.5v-.6c-.7-.1-.7-.8-.7-.8V3.1Z"/>
30
+ <path class="cls-2" d="M75.6,3.1c0-.6.7-.6.7-.6v-.7h-2.5v.7s.7,0,.7.6v16.7s0,.7-.7.8v.6h2.5v-.6c-.7-.1-.7-.8-.7-.8V3.1Z"/>
31
+ <path class="cls-2" d="M66.4,3.1c0-.6.7-.6.7-.6v-.7h-2.5v.7s.7,0,.7.6v16.7s0,.7-.7.8v.6h2.5v-.6c-.7-.1-.7-.8-.7-.8V3.1Z"/>
32
+ <path class="cls-2" d="M57.2,3.1c0-.6.7-.6.7-.6v-.7h-2.5v.7s.7,0,.7.6v16.7s0,.7-.7.8v.6h2.5v-.6c-.7-.1-.7-.8-.7-.8V3.1Z"/>
33
+ </svg>
34
+ `