@operato/scene-manufacturing 1.3.14 → 1.3.17

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,16 @@
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.17](https://github.com/things-scene/operato-scene/compare/v1.3.16...v1.3.17) (2024-06-27)
7
+
8
+
9
+ ### :bug: Bug Fix
10
+
11
+ * remove minus limit from tact-timer ([dc427cb](https://github.com/things-scene/operato-scene/commit/dc427cb382401fa5c817d5eddc553d08a89edb2f))
12
+ * setting value-format for chart series ([b0ef473](https://github.com/things-scene/operato-scene/commit/b0ef4735f2745f51836db8067caeebac99e1c579))
13
+
14
+
15
+
6
16
  ## [1.3.14](https://github.com/things-scene/operato-scene/compare/v1.3.13...v1.3.14) (2024-02-14)
7
17
 
8
18
  **Note:** Version bump only for package @operato/scene-manufacturing
package/db.sqlite CHANGED
Binary file
@@ -96,8 +96,7 @@ export default class TactTimer extends RectPath(Shape) {
96
96
  }
97
97
  }
98
98
  counting() {
99
- // @ts-ignore
100
- if (this.disposed || this.countdown < -this.tactTime) {
99
+ if (this.disposed) {
101
100
  return;
102
101
  }
103
102
  requestAnimationFrame(() => {
@@ -1 +1 @@
1
- {"version":3,"file":"tact-timer.js","sourceRoot":"","sources":["../src/tact-timer.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAA+B,QAAQ,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AAEhG,OAAO,MAAM,MAAM,eAAe,CAAA;AAElC,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,WAAW;YAClB,IAAI,EAAE,UAAU;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copyright © HatioLab Inc. All rights reserved.\n */\n\nimport { Component, ComponentNature, Properties, RectPath, Shape } from '@hatiolab/things-scene'\n\nimport format from './libs/format'\n\nconst NATURE: ComponentNature = {\n mutable: false,\n resizable: true,\n rotatable: true,\n properties: [\n {\n type: 'number',\n label: 'tact-time',\n name: 'tactTime',\n placeholder: 'seconds'\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 'value-property': 'tactTime',\n help: 'scene/component/manufacturing/tact-timer'\n}\n\nexport default class TactTimer extends RectPath(Shape) {\n private _due?: number\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 this._due = Date.now() + this.tactTime * 1000\n this.counting()\n }\n\n onchange(after: Properties) {\n if ('tactTime' in after) {\n this.start()\n }\n }\n\n counting() {\n // @ts-ignore\n if (this.disposed || this.countdown < -this.tactTime) {\n return\n }\n\n requestAnimationFrame(() => {\n const countdown = this.countdown\n\n const text = format(Math.abs(countdown), this.getState('format'))\n this.text = text\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 tactTime,\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 } = this.state\n\n const increase = this.countdown > 0\n const underThreshold = this.countdown / tactTime < 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 var progress = Math.abs((this.countdown / tactTime) * 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 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 get tactTime() {\n return Number(this.getState('tactTime') || 0)\n }\n\n set tactTime(tactTime) {\n this.setState('tactTime', Number(tactTime) || 0)\n }\n\n get countdown() {\n const due = this._due || 0\n const now = Date.now()\n\n return Math.round((due - now) / 1000)\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;;GAEG;AAEH,OAAO,EAAE,SAAS,EAA+B,QAAQ,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AAEhG,OAAO,MAAM,MAAM,eAAe,CAAA;AAElC,MAAM,MAAM,GAAoB;IAC9B,OAAO,EAAE,KAAK;IACd,SAAS,EAAE,IAAI;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C,YAAY,EAAE,SAAS,CAAC,CAAA","sourcesContent":["/*\n * Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport { Component, ComponentNature, Properties, RectPath, Shape } from '@hatiolab/things-scene'\n\nimport format from './libs/format'\n\nconst NATURE: ComponentNature = {\n mutable: false,\n resizable: true,\n rotatable: true,\n properties: [\n {\n type: 'number',\n label: 'tact-time',\n name: 'tactTime',\n placeholder: 'seconds'\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 'value-property': 'tactTime',\n help: 'scene/component/manufacturing/tact-timer'\n}\n\nexport default class TactTimer extends RectPath(Shape) {\n private _due?: number\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 this._due = Date.now() + this.tactTime * 1000\n this.counting()\n }\n\n onchange(after: Properties) {\n if ('tactTime' in after) {\n this.start()\n }\n }\n\n counting() {\n if (this.disposed) {\n return\n }\n\n requestAnimationFrame(() => {\n const countdown = this.countdown\n\n const text = format(Math.abs(countdown), this.getState('format'))\n this.text = text\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 tactTime,\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 } = this.state\n\n const increase = this.countdown > 0\n const underThreshold = this.countdown / tactTime < 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 var progress = Math.abs((this.countdown / tactTime) * 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 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 get tactTime() {\n return Number(this.getState('tactTime') || 0)\n }\n\n set tactTime(tactTime) {\n this.setState('tactTime', Number(tactTime) || 0)\n }\n\n get countdown() {\n const due = this._due || 0\n const now = Date.now()\n\n return Math.round((due - now) / 1000)\n }\n}\n\nComponent.register('tact-timer', TactTimer)\n"]}
@@ -6,24 +6,9 @@
6
6
  "auditLog": "logs/.08636eb59927f12972f6774f5947c8507b3564c2-audit.json",
7
7
  "files": [
8
8
  {
9
- "date": 1701358700181,
10
- "name": "logs/application-2023-12-01-00.log",
11
- "hash": "2cc1d1a511d7defb74d40dc32f202d1badb9f75657b1f558f5b1c1906ad181a4"
12
- },
13
- {
14
- "date": 1701362396909,
15
- "name": "logs/application-2023-12-01-01.log",
16
- "hash": "ec9b783e656fd52202ccba7f51ac57776964eeb4913ca99395e0c2994b2bc57f"
17
- },
18
- {
19
- "date": 1701365281113,
20
- "name": "logs/application-2023-12-01-02.log",
21
- "hash": "84c23313bddd79db6dbcca3408f195a8831ee36675cef5c09af71f83a44d29a5"
22
- },
23
- {
24
- "date": 1701395322059,
25
- "name": "logs/application-2023-12-01-10.log",
26
- "hash": "e57b96f77902f6fb66606de50909b9d85035eb22a08cdcdc7400883fb40301dd"
9
+ "date": 1719494618029,
10
+ "name": "logs/application-2024-06-27-22.log",
11
+ "hash": "939f14779ca453755f38b52069f5b134656e9a8f50dc3bbed8557ba6ca0dfb3f"
27
12
  }
28
13
  ],
29
14
  "hashType": "sha256"
@@ -6,14 +6,9 @@
6
6
  "auditLog": "logs/.5e5d741d8b7784a2fbad65eedc0fd46946aaf6f2-audit.json",
7
7
  "files": [
8
8
  {
9
- "date": 1701358701612,
10
- "name": "logs/connections-2023-12-01-00.log",
11
- "hash": "173883b0db84bd765d6bc0ded70a54e39dd05e58a72447da2d68717058e3f169"
12
- },
13
- {
14
- "date": 1701395324166,
15
- "name": "logs/connections-2023-12-01-10.log",
16
- "hash": "1331a3a1904ef4e4161a752aeb3020b62a7c87a2be2abbd8ddcbaeac4f0e757a"
9
+ "date": 1719494619722,
10
+ "name": "logs/connections-2024-06-27-22.log",
11
+ "hash": "0b1cd458f5e58bc3b2f4c433f81ce28cda6ee8d0c12218512de34cee13aa5f84"
17
12
  }
18
13
  ],
19
14
  "hashType": "sha256"
@@ -0,0 +1,24 @@
1
+ 2024-06-27T22:23:39+09:00 info: File Storage is Ready.
2
+ 2024-06-27T22:23:39+09:00 error: oracledb module loading failed
3
+ 2024-06-27T22:23:40+09:00 error: oracledb module loading failed
4
+ 2024-06-27T22:23:40+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-06-27T22:23:40+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-06-27T22:23:41+09:00 info: Default DataSource established
22
+ 2024-06-27T22:23:41+09:00 info: 🚀 Server ready at http://0.0.0.0:3000/graphql
23
+ 2024-06-27T22:23:41+09:00 info: 🚀 Subscriptions ready at ws://0.0.0.0:3000/graphql
24
+ 2024-06-27T22:55:44+09:00 error: connect ECONNREFUSED 127.0.0.1:3000
@@ -0,0 +1,47 @@
1
+ 2024-06-27T22:23:41+09:00 info: Initializing ConnectionManager...
2
+ 2024-06-27T22:23:41+09:00 info: Connector 'echo-back-server' started to ready
3
+ 2024-06-27T22:23:41+09:00 info: Connector 'echo-back' started to ready
4
+ 2024-06-27T22:23:41+09:00 info: Connector 'http-connector' started to ready
5
+ 2024-06-27T22:23:41+09:00 info: Connector 'graphql-connector' started to ready
6
+ 2024-06-27T22:23:41+09:00 info: Connector 'sqlite-connector' started to ready
7
+ 2024-06-27T22:23:41+09:00 info: Connector 'postgresql-connector' started to ready
8
+ 2024-06-27T22:23:41+09:00 info: Connector 'mqtt-connector' started to ready
9
+ 2024-06-27T22:23:41+09:00 info: Connector 'mssql-connector' started to ready
10
+ 2024-06-27T22:23:41+09:00 info: Connector 'oracle-connector' started to ready
11
+ 2024-06-27T22:23:41+09:00 info: Connector 'mysql-connector' started to ready
12
+ 2024-06-27T22:23:41+09:00 info: Connector 'socket-server' started to ready
13
+ 2024-06-27T22:23:41+09:00 info: Connector 'operato-connector' started to ready
14
+ 2024-06-27T22:23:41+09:00 info: Connector 'email-connector' started to ready
15
+ 2024-06-27T22:23:41+09:00 info: Connector 'influxdb-connector' started to ready
16
+ 2024-06-27T22:23:41+09:00 info: Connector 'msgraph-connector' started to ready
17
+ 2024-06-27T22:23:41+09:00 info: echo-back-servers are ready
18
+ 2024-06-27T22:23:41+09:00 info: echo-back connections are ready
19
+ 2024-06-27T22:23:41+09:00 info: http-connector connections are ready
20
+ 2024-06-27T22:23:41+09:00 info: graphql-connector connections are ready
21
+ 2024-06-27T22:23:41+09:00 info: sqlite-connector connections are ready
22
+ 2024-06-27T22:23:41+09:00 info: postgresql-connector connections are ready
23
+ 2024-06-27T22:23:41+09:00 info: mqtt-connector connections are ready
24
+ 2024-06-27T22:23:41+09:00 info: mssql-connector connections are ready
25
+ 2024-06-27T22:23:41+09:00 info: oracle-connector connections are ready
26
+ 2024-06-27T22:23:41+09:00 info: mysql-connector connections are ready
27
+ 2024-06-27T22:23:41+09:00 info: socket servers are ready
28
+ 2024-06-27T22:23:41+09:00 info: graphql-connector connections are ready
29
+ 2024-06-27T22:23:41+09:00 info: email connections are ready
30
+ 2024-06-27T22:23:41+09:00 info: influxdb connections are ready
31
+ 2024-06-27T22:23:41+09:00 info: msgraph-connector connections are ready
32
+ 2024-06-27T22:23:41+09:00 info: All connector for 'echo-back-server' ready
33
+ 2024-06-27T22:23:41+09:00 info: All connector for 'echo-back' ready
34
+ 2024-06-27T22:23:41+09:00 info: All connector for 'http-connector' ready
35
+ 2024-06-27T22:23:41+09:00 info: All connector for 'graphql-connector' ready
36
+ 2024-06-27T22:23:41+09:00 info: All connector for 'sqlite-connector' ready
37
+ 2024-06-27T22:23:41+09:00 info: All connector for 'postgresql-connector' ready
38
+ 2024-06-27T22:23:41+09:00 info: All connector for 'mqtt-connector' ready
39
+ 2024-06-27T22:23:41+09:00 info: All connector for 'mssql-connector' ready
40
+ 2024-06-27T22:23:41+09:00 info: All connector for 'oracle-connector' ready
41
+ 2024-06-27T22:23:41+09:00 info: All connector for 'mysql-connector' ready
42
+ 2024-06-27T22:23:41+09:00 info: All connector for 'socket-server' ready
43
+ 2024-06-27T22:23:41+09:00 info: All connector for 'operato-connector' ready
44
+ 2024-06-27T22:23:41+09:00 info: All connector for 'email-connector' ready
45
+ 2024-06-27T22:23:41+09:00 info: All connector for 'influxdb-connector' ready
46
+ 2024-06-27T22:23:41+09:00 info: All connector for 'msgraph-connector' ready
47
+ 2024-06-27T22:23:41+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.14",
4
+ "version": "1.3.17",
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": "4bcb3cf4efb2f99d89d9219246be65055c78b4c3"
60
+ "gitHead": "58ab47b4cbb631690d726ea35a64480fbb530f30"
61
61
  }