@operato/board 7.0.9 → 7.0.12

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@operato/board",
3
- "version": "7.0.9",
3
+ "version": "7.0.12",
4
4
  "description": "Webcomponent for board following open-wc recommendations",
5
5
  "author": "heartyoh",
6
6
  "main": "dist/src/index.js",
@@ -95,7 +95,7 @@
95
95
  "dependencies": {
96
96
  "@material/web": "^1.5.0",
97
97
  "@open-wc/scoped-elements": "^2.1.3",
98
- "@operato/app": "^7.0.8",
98
+ "@operato/app": "^7.0.12",
99
99
  "@operato/data-grist": "^7.0.8",
100
100
  "@operato/font": "^7.0.8",
101
101
  "@operato/graphql": "^7.0.5",
@@ -155,5 +155,5 @@
155
155
  "prettier --write"
156
156
  ]
157
157
  },
158
- "gitHead": "59291fb87f748ccff18c0cf227552cbb62231947"
158
+ "gitHead": "1681d20948943283cc7d154abe582023adfa5cef"
159
159
  }
@@ -77,6 +77,7 @@ export class PropertyEventTap extends LitElement {
77
77
  <option value="start-scenario">start the given scenario</option>
78
78
  <option value="run-scenario">run the given scenario</option>
79
79
  <option value="export-data">export data</option>
80
+ <option value="import-data">import data</option>
80
81
  </select>
81
82
 
82
83
  <label> <ox-i18n msgid="label.target">target</ox-i18n> </label>
@@ -52,6 +52,7 @@ export class BoardComponentInfo extends LitElement {
52
52
  background-color: var(--md-sys-color-surface);
53
53
  width: 100%;
54
54
  margin: auto;
55
+ table-layout: fixed;
55
56
  }
56
57
 
57
58
  tr {
@@ -67,7 +68,7 @@ export class BoardComponentInfo extends LitElement {
67
68
  [subTh] {
68
69
  text-align: center !important;
69
70
  font-weight: bold;
70
- min-width: 60px;
71
+ width: 40px;
71
72
  text-transform: capitalize;
72
73
  background-color: rgba(0, 0, 0, 0.05);
73
74
  }
@@ -392,6 +392,7 @@ export class BoardViewer extends LitElement {
392
392
  this._scene.on('start-scenario', this.onStartScenario, this)
393
393
  this._scene.on('run-scenario', this.onRunScenario, this)
394
394
  this._scene.on('export-data', this.onExportData, this)
395
+ this._scene.on('import-data', this.onImportData, this)
395
396
  this._scene.on('click', this.onClickEvent, this)
396
397
  }
397
398
 
@@ -405,6 +406,7 @@ export class BoardViewer extends LitElement {
405
406
  scene.off('start-scenario', this.onStartScenario, this)
406
407
  scene.off('run-scenario', this.onRunScenario, this)
407
408
  scene.off('export-data', this.onExportData, this)
409
+ scene.off('import-data', this.onImportData, this)
408
410
  scene.off('click', this.onClickEvent, this)
409
411
  }
410
412
 
@@ -572,6 +574,42 @@ export class BoardViewer extends LitElement {
572
574
  }
573
575
  }
574
576
 
577
+ async onImportData(_: string, value: string | number | object, component: Component) {
578
+ const fileInput = document.createElement('input')
579
+ fileInput.type = 'file'
580
+ fileInput.accept = '.xlsx, .xls'
581
+ fileInput.style.display = 'none'
582
+
583
+ fileInput.addEventListener(
584
+ 'change',
585
+ (event: Event) => {
586
+ const input = event.target as HTMLInputElement
587
+ const file = input.files?.[0]
588
+ if (!file) {
589
+ return
590
+ }
591
+
592
+ const reader = new FileReader()
593
+ reader.onload = function (event) {
594
+ const data = new Uint8Array(event.target?.result as ArrayBuffer)
595
+ const workbook = XLSX.read(data, { type: 'array' })
596
+
597
+ // 첫 번째 시트의 데이타만 가져온다.
598
+ const firstSheetName = workbook.SheetNames[0]
599
+ const worksheet = workbook.Sheets[firstSheetName]
600
+ component.data = XLSX.utils.sheet_to_json(worksheet)
601
+
602
+ input.remove()
603
+ }
604
+ reader.readAsArrayBuffer(file)
605
+ },
606
+ false
607
+ )
608
+
609
+ document.body.appendChild(fileInput)
610
+ fileInput.click()
611
+ }
612
+
575
613
  onClickEvent(e: MouseEvent, hint: any) {
576
614
  const component = hint.origin
577
615
 
package/db.sqlite DELETED
Binary file
@@ -1,15 +0,0 @@
1
- {
2
- "keep": {
3
- "days": true,
4
- "amount": 2
5
- },
6
- "auditLog": "logs/.08636eb59927f12972f6774f5947c8507b3564c2-audit.json",
7
- "files": [
8
- {
9
- "date": 1678554687533,
10
- "name": "logs/application-2023-03-12-02.log",
11
- "hash": "18a5f510d18baef83ee3c5cc0c77fc539d9d5c32761143d3b32bb3cf840cf98d"
12
- }
13
- ],
14
- "hashType": "sha256"
15
- }
@@ -1,15 +0,0 @@
1
- {
2
- "keep": {
3
- "days": true,
4
- "amount": 14
5
- },
6
- "auditLog": "logs/.5e5d741d8b7784a2fbad65eedc0fd46946aaf6f2-audit.json",
7
- "files": [
8
- {
9
- "date": 1678554689069,
10
- "name": "logs/connections-2023-03-12-02.log",
11
- "hash": "54653b8db093fea29f7281ec55e91f143d0a4c66fc835d2c238e355b9ba81756"
12
- }
13
- ],
14
- "hashType": "sha256"
15
- }
@@ -1,14 +0,0 @@
1
- 2023-03-12T02:11:28+09:00 info: File Storage is Ready.
2
- 2023-03-12T02:11:29+09:00 error: oracledb module loading failed
3
- 2023-03-12T02:11:30+09:00 info: Default DataSource established
4
- 2023-03-12T02:11:30+09:00 info: Transaction DataSource established
5
- 2023-03-12T02:11:30+09:00 info: 🚀 Server ready at http://0.0.0.0:3000/graphql
6
- 2023-03-12T02:11:30+09:00 info: 🚀 Subscriptions ready at ws://0.0.0.0:3000/graphql
7
- 2023-03-12T02:13:18+09:00 info: File Storage is Ready.
8
- 2023-03-12T02:13:18+09:00 error: oracledb module loading failed
9
- 2023-03-12T02:13:28+09:00 info: File Storage is Ready.
10
- 2023-03-12T02:13:28+09:00 error: oracledb module loading failed
11
- 2023-03-12T02:13:29+09:00 info: Default DataSource established
12
- 2023-03-12T02:13:29+09:00 info: Transaction DataSource established
13
- 2023-03-12T02:13:29+09:00 info: 🚀 Server ready at http://0.0.0.0:3000/graphql
14
- 2023-03-12T02:13:29+09:00 info: 🚀 Subscriptions ready at ws://0.0.0.0:3000/graphql
@@ -1,70 +0,0 @@
1
- 2023-03-12T02:11:30+09:00 info: Initializing ConnectionManager...
2
- 2023-03-12T02:11:30+09:00 info: Connector 'echo-back-server' started to ready
3
- 2023-03-12T02:11:30+09:00 info: Connector 'echo-back' started to ready
4
- 2023-03-12T02:11:30+09:00 info: Connector 'http-connector' started to ready
5
- 2023-03-12T02:11:30+09:00 info: Connector 'graphql-connector' started to ready
6
- 2023-03-12T02:11:30+09:00 info: Connector 'sqlite-connector' started to ready
7
- 2023-03-12T02:11:30+09:00 info: Connector 'postgresql-connector' started to ready
8
- 2023-03-12T02:11:30+09:00 info: Connector 'mqtt-connector' started to ready
9
- 2023-03-12T02:11:30+09:00 info: Connector 'mssql-connector' started to ready
10
- 2023-03-12T02:11:30+09:00 info: Connector 'oracle-connector' started to ready
11
- 2023-03-12T02:11:30+09:00 info: Connector 'mysql-connector' started to ready
12
- 2023-03-12T02:11:30+09:00 info: Connector 'socket-server' started to ready
13
- 2023-03-12T02:11:30+09:00 info: echo-back-servers are ready
14
- 2023-03-12T02:11:30+09:00 info: echo-back connections are ready
15
- 2023-03-12T02:11:30+09:00 info: http-connector connections are ready
16
- 2023-03-12T02:11:30+09:00 info: graphql-connector connections are ready
17
- 2023-03-12T02:11:30+09:00 info: sqlite-connector connections are ready
18
- 2023-03-12T02:11:30+09:00 info: postgresql-connector connections are ready
19
- 2023-03-12T02:11:30+09:00 info: mqtt-connector connections are ready
20
- 2023-03-12T02:11:30+09:00 info: mssql-connector connections are ready
21
- 2023-03-12T02:11:30+09:00 info: oracle-connector connections are ready
22
- 2023-03-12T02:11:30+09:00 info: mysql-connector connections are ready
23
- 2023-03-12T02:11:30+09:00 info: socket servers are ready
24
- 2023-03-12T02:11:30+09:00 info: All connector for 'echo-back-server' ready
25
- 2023-03-12T02:11:30+09:00 info: All connector for 'echo-back' ready
26
- 2023-03-12T02:11:30+09:00 info: All connector for 'http-connector' ready
27
- 2023-03-12T02:11:30+09:00 info: All connector for 'graphql-connector' ready
28
- 2023-03-12T02:11:30+09:00 info: All connector for 'sqlite-connector' ready
29
- 2023-03-12T02:11:30+09:00 info: All connector for 'postgresql-connector' ready
30
- 2023-03-12T02:11:30+09:00 info: All connector for 'mqtt-connector' ready
31
- 2023-03-12T02:11:30+09:00 info: All connector for 'mssql-connector' ready
32
- 2023-03-12T02:11:30+09:00 info: All connector for 'oracle-connector' ready
33
- 2023-03-12T02:11:30+09:00 info: All connector for 'mysql-connector' ready
34
- 2023-03-12T02:11:30+09:00 info: All connector for 'socket-server' ready
35
- 2023-03-12T02:11:30+09:00 info: ConnectionManager initialization done:
36
- 2023-03-12T02:13:29+09:00 info: Initializing ConnectionManager...
37
- 2023-03-12T02:13:29+09:00 info: Connector 'echo-back-server' started to ready
38
- 2023-03-12T02:13:29+09:00 info: Connector 'echo-back' started to ready
39
- 2023-03-12T02:13:29+09:00 info: Connector 'http-connector' started to ready
40
- 2023-03-12T02:13:29+09:00 info: Connector 'graphql-connector' started to ready
41
- 2023-03-12T02:13:29+09:00 info: Connector 'sqlite-connector' started to ready
42
- 2023-03-12T02:13:29+09:00 info: Connector 'postgresql-connector' started to ready
43
- 2023-03-12T02:13:29+09:00 info: Connector 'mqtt-connector' started to ready
44
- 2023-03-12T02:13:29+09:00 info: Connector 'mssql-connector' started to ready
45
- 2023-03-12T02:13:29+09:00 info: Connector 'oracle-connector' started to ready
46
- 2023-03-12T02:13:29+09:00 info: Connector 'mysql-connector' started to ready
47
- 2023-03-12T02:13:29+09:00 info: Connector 'socket-server' started to ready
48
- 2023-03-12T02:13:29+09:00 info: echo-back-servers are ready
49
- 2023-03-12T02:13:29+09:00 info: echo-back connections are ready
50
- 2023-03-12T02:13:29+09:00 info: http-connector connections are ready
51
- 2023-03-12T02:13:29+09:00 info: graphql-connector connections are ready
52
- 2023-03-12T02:13:29+09:00 info: sqlite-connector connections are ready
53
- 2023-03-12T02:13:29+09:00 info: postgresql-connector connections are ready
54
- 2023-03-12T02:13:29+09:00 info: mqtt-connector connections are ready
55
- 2023-03-12T02:13:29+09:00 info: mssql-connector connections are ready
56
- 2023-03-12T02:13:29+09:00 info: oracle-connector connections are ready
57
- 2023-03-12T02:13:29+09:00 info: mysql-connector connections are ready
58
- 2023-03-12T02:13:29+09:00 info: socket servers are ready
59
- 2023-03-12T02:13:29+09:00 info: All connector for 'echo-back-server' ready
60
- 2023-03-12T02:13:29+09:00 info: All connector for 'echo-back' ready
61
- 2023-03-12T02:13:29+09:00 info: All connector for 'http-connector' ready
62
- 2023-03-12T02:13:29+09:00 info: All connector for 'graphql-connector' ready
63
- 2023-03-12T02:13:29+09:00 info: All connector for 'sqlite-connector' ready
64
- 2023-03-12T02:13:29+09:00 info: All connector for 'postgresql-connector' ready
65
- 2023-03-12T02:13:29+09:00 info: All connector for 'mqtt-connector' ready
66
- 2023-03-12T02:13:29+09:00 info: All connector for 'mssql-connector' ready
67
- 2023-03-12T02:13:29+09:00 info: All connector for 'oracle-connector' ready
68
- 2023-03-12T02:13:29+09:00 info: All connector for 'mysql-connector' ready
69
- 2023-03-12T02:13:29+09:00 info: All connector for 'socket-server' ready
70
- 2023-03-12T02:13:29+09:00 info: ConnectionManager initialization done: