@operato/scene-visualizer 1.2.15 → 1.2.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 +18 -0
- package/db.sqlite +0 -0
- package/dist/rack-table.js +3 -17
- package/dist/rack-table.js.map +1 -1
- package/dist/stock.js +15 -12
- package/dist/stock.js.map +1 -1
- package/dist/three-container.js +0 -1
- package/dist/three-container.js.map +1 -1
- package/dist/visualizer.js +48 -48
- package/dist/visualizer.js.map +1 -1
- package/logs/.08636eb59927f12972f6774f5947c8507b3564c2-audit.json +3 -13
- package/logs/.5e5d741d8b7784a2fbad65eedc0fd46946aaf6f2-audit.json +20 -50
- package/logs/application-2023-03-12-00.log +6 -0
- package/logs/connections-2023-03-06-22.log +35 -0
- package/logs/connections-2023-03-08-00.log +35 -0
- package/logs/connections-2023-03-09-18.log +35 -0
- package/logs/connections-2023-03-12-00.log +35 -0
- package/package.json +2 -2
- package/src/rack-table.ts +4 -21
- package/src/stock.ts +15 -15
- package/src/three-container.ts +0 -1
- package/src/visualizer.ts +50 -51
- package/tsconfig.tsbuildinfo +1 -1
- package/logs/application-2023-03-05-12.log +0 -6
- package/logs/application-2023-03-05-23.log +0 -12
- package/logs/application-2023-03-06-00.log +0 -6
- package/logs/connections-2023-02-20-14.log +0 -70
- package/logs/connections-2023-02-20-16.log +0 -35
- package/logs/connections-2023-02-21-20.log +0 -35
- package/logs/connections-2023-02-22-01.log +0 -35
- package/logs/connections-2023-02-22-11.log +0 -35
- package/logs/connections-2023-02-22-12.log +0 -35
- package/logs/connections-2023-02-22-14.log +0 -35
- package/logs/connections-2023-02-23-00.log +0 -35
- package/logs/connections-2023-02-23-12.log +0 -35
- package/logs/connections-2023-02-23-21.log +0 -35
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
2023-03-12T00:17:38+09:00 info: Initializing ConnectionManager...
|
|
2
|
+
2023-03-12T00:17:38+09:00 info: Connector 'echo-back-server' started to ready
|
|
3
|
+
2023-03-12T00:17:38+09:00 info: Connector 'echo-back' started to ready
|
|
4
|
+
2023-03-12T00:17:38+09:00 info: Connector 'http-connector' started to ready
|
|
5
|
+
2023-03-12T00:17:38+09:00 info: Connector 'graphql-connector' started to ready
|
|
6
|
+
2023-03-12T00:17:38+09:00 info: Connector 'sqlite-connector' started to ready
|
|
7
|
+
2023-03-12T00:17:38+09:00 info: Connector 'postgresql-connector' started to ready
|
|
8
|
+
2023-03-12T00:17:38+09:00 info: Connector 'mqtt-connector' started to ready
|
|
9
|
+
2023-03-12T00:17:38+09:00 info: Connector 'mssql-connector' started to ready
|
|
10
|
+
2023-03-12T00:17:38+09:00 info: Connector 'oracle-connector' started to ready
|
|
11
|
+
2023-03-12T00:17:38+09:00 info: Connector 'mysql-connector' started to ready
|
|
12
|
+
2023-03-12T00:17:38+09:00 info: Connector 'socket-server' started to ready
|
|
13
|
+
2023-03-12T00:17:38+09:00 info: echo-back-servers are ready
|
|
14
|
+
2023-03-12T00:17:38+09:00 info: echo-back connections are ready
|
|
15
|
+
2023-03-12T00:17:38+09:00 info: http-connector connections are ready
|
|
16
|
+
2023-03-12T00:17:38+09:00 info: graphql-connector connections are ready
|
|
17
|
+
2023-03-12T00:17:38+09:00 info: sqlite-connector connections are ready
|
|
18
|
+
2023-03-12T00:17:38+09:00 info: postgresql-connector connections are ready
|
|
19
|
+
2023-03-12T00:17:38+09:00 info: mqtt-connector connections are ready
|
|
20
|
+
2023-03-12T00:17:38+09:00 info: mssql-connector connections are ready
|
|
21
|
+
2023-03-12T00:17:38+09:00 info: oracle-connector connections are ready
|
|
22
|
+
2023-03-12T00:17:38+09:00 info: mysql-connector connections are ready
|
|
23
|
+
2023-03-12T00:17:38+09:00 info: socket servers are ready
|
|
24
|
+
2023-03-12T00:17:38+09:00 info: All connector for 'echo-back-server' ready
|
|
25
|
+
2023-03-12T00:17:38+09:00 info: All connector for 'echo-back' ready
|
|
26
|
+
2023-03-12T00:17:38+09:00 info: All connector for 'http-connector' ready
|
|
27
|
+
2023-03-12T00:17:38+09:00 info: All connector for 'graphql-connector' ready
|
|
28
|
+
2023-03-12T00:17:38+09:00 info: All connector for 'sqlite-connector' ready
|
|
29
|
+
2023-03-12T00:17:38+09:00 info: All connector for 'postgresql-connector' ready
|
|
30
|
+
2023-03-12T00:17:38+09:00 info: All connector for 'mqtt-connector' ready
|
|
31
|
+
2023-03-12T00:17:38+09:00 info: All connector for 'mssql-connector' ready
|
|
32
|
+
2023-03-12T00:17:38+09:00 info: All connector for 'oracle-connector' ready
|
|
33
|
+
2023-03-12T00:17:38+09:00 info: All connector for 'mysql-connector' ready
|
|
34
|
+
2023-03-12T00:17:38+09:00 info: All connector for 'socket-server' ready
|
|
35
|
+
2023-03-12T00:17:38+09:00 info: ConnectionManager initialization done:
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@operato/scene-visualizer",
|
|
3
3
|
"description": "visualizer component for operato-scene",
|
|
4
4
|
"author": "heartyoh",
|
|
5
|
-
"version": "1.2.
|
|
5
|
+
"version": "1.2.17",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
8
8
|
"things-scene": true,
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"prettier --write"
|
|
62
62
|
]
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "32c2556aee9cba6b549bf2d5156dc22cc8dfd550"
|
|
65
65
|
}
|
package/src/rack-table.ts
CHANGED
|
@@ -285,28 +285,15 @@ export class RackTable3d extends RealObjectGroup {
|
|
|
285
285
|
}
|
|
286
286
|
|
|
287
287
|
createRacks() {
|
|
288
|
-
var { rotation = 0,
|
|
288
|
+
var { rotation = 0, shelfLocations, shelves = 1 } = this.component.state
|
|
289
289
|
|
|
290
290
|
this.object3d.rotation.y = -rotation
|
|
291
|
-
|
|
292
|
-
if (shelfPattern) {
|
|
293
|
-
var shelfLocIds = []
|
|
294
|
-
for (var i = 0; i < shelves; i++) {
|
|
295
|
-
var locId = this.makeShelfString(shelfPattern, i + 1, shelves)
|
|
296
|
-
shelfLocIds.push(locId)
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
shelfLocations = shelfLocIds.join(',')
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
// FIXME
|
|
303
|
-
// delete this.model.shelfPattern
|
|
304
|
-
|
|
305
291
|
;(this.component as RackTable).components.forEach((cell: Component) => {
|
|
306
292
|
let { shelfLocations: shelfLoc = shelfLocations, isEmpty } = cell.state
|
|
307
293
|
|
|
308
|
-
|
|
309
|
-
|
|
294
|
+
if (!isEmpty) {
|
|
295
|
+
cell.setState('shelfLocations', shelfLoc)
|
|
296
|
+
|
|
310
297
|
var rack = new Rack(cell)
|
|
311
298
|
rack.update()
|
|
312
299
|
this.object3d.add(rack.object3d)
|
|
@@ -1257,10 +1244,6 @@ export class RackTable extends ContainerAbstract {
|
|
|
1257
1244
|
)
|
|
1258
1245
|
}
|
|
1259
1246
|
|
|
1260
|
-
if ('shelfLocations' in after) {
|
|
1261
|
-
delete this.model.shelfPattern
|
|
1262
|
-
}
|
|
1263
|
-
|
|
1264
1247
|
this.invalidate()
|
|
1265
1248
|
}
|
|
1266
1249
|
|
package/src/stock.ts
CHANGED
|
@@ -154,6 +154,10 @@ export class Stock extends RealObject<THREE.Mesh> {
|
|
|
154
154
|
}
|
|
155
155
|
|
|
156
156
|
onchangeStockData(data: any) {
|
|
157
|
+
this.object3d.userData = {
|
|
158
|
+
...this.object3d.userData,
|
|
159
|
+
data
|
|
160
|
+
}
|
|
157
161
|
var visualizer = this.visualizer
|
|
158
162
|
|
|
159
163
|
if (!(visualizer && visualizer && visualizer!.legendTarget && visualizer!.legendTarget.get('status'))) return
|
|
@@ -226,27 +230,23 @@ export class Stock extends RealObject<THREE.Mesh> {
|
|
|
226
230
|
onmouseup(e: MouseEvent, visualizer: Visualizer, callback: (arg: { data: any; location: string }) => void) {
|
|
227
231
|
if (!this.object3d.visible) return
|
|
228
232
|
|
|
229
|
-
if (!this.object3d.userData ||
|
|
233
|
+
if (!this.object3d.userData || !this.object3d.userData.data)
|
|
230
234
|
this.object3d.userData = {
|
|
231
235
|
...this.object3d.userData,
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
236
|
+
data: {
|
|
237
|
+
loc: this.object3d.name,
|
|
238
|
+
items: [
|
|
239
|
+
{
|
|
240
|
+
loc: this.object3d.name
|
|
241
|
+
}
|
|
242
|
+
]
|
|
243
|
+
}
|
|
238
244
|
}
|
|
239
245
|
|
|
240
246
|
if (callback && typeof callback == 'function') {
|
|
241
|
-
var data = Object.assign(
|
|
242
|
-
{
|
|
243
|
-
color: '#' + (this.object3d.material as any).color?.getHexString()
|
|
244
|
-
},
|
|
245
|
-
this.object3d.userData
|
|
246
|
-
)
|
|
247
247
|
callback({
|
|
248
|
-
data
|
|
249
|
-
|
|
248
|
+
...this.object3d.userData.data,
|
|
249
|
+
color: '#' + (this.object3d.material as any).color?.getHexString()
|
|
250
250
|
})
|
|
251
251
|
}
|
|
252
252
|
}
|
package/src/three-container.ts
CHANGED
|
@@ -392,7 +392,6 @@ export class ThreeContainer extends Container implements ThreeDimensionalContain
|
|
|
392
392
|
div.style.position = 'absolute'
|
|
393
393
|
div.style.top = '0'
|
|
394
394
|
div.style.pointerEvents = 'none'
|
|
395
|
-
div.setAttribute('aaaabbbb', '1')
|
|
396
395
|
|
|
397
396
|
if (this.app.isViewMode) {
|
|
398
397
|
// disableAllUserEvents(div)
|
package/src/visualizer.ts
CHANGED
|
@@ -217,61 +217,57 @@ export class Visualizer extends ThreeContainer {
|
|
|
217
217
|
}
|
|
218
218
|
|
|
219
219
|
onchangeData(): void {
|
|
220
|
-
|
|
221
|
-
|
|
220
|
+
if (typeof this.data !== 'object') {
|
|
221
|
+
return
|
|
222
|
+
}
|
|
222
223
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
/**
|
|
226
|
-
* Array type data
|
|
227
|
-
* (e.g. data: [{
|
|
228
|
-
* 'loc' : 'location1',
|
|
229
|
-
* 'description': 'description1'
|
|
230
|
-
* },
|
|
231
|
-
* ...
|
|
232
|
-
* ])
|
|
233
|
-
*/
|
|
234
|
-
|
|
235
|
-
data = data.reduce((acc, value, i, arr) => {
|
|
236
|
-
var val = JSON.parse(JSON.stringify(value))
|
|
237
|
-
var id = locationField
|
|
238
|
-
|
|
239
|
-
if (!val[id]) {
|
|
240
|
-
// Rack 데이터가 아니면
|
|
241
|
-
id = 'id'
|
|
242
|
-
}
|
|
224
|
+
var data = this.data
|
|
225
|
+
var locationField = this.getState('locationField') || 'location'
|
|
243
226
|
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
227
|
+
if (data instanceof Array) {
|
|
228
|
+
/**
|
|
229
|
+
* Array type data
|
|
230
|
+
* (e.g. data: [{
|
|
231
|
+
* 'location' : 'A0101-01',
|
|
232
|
+
* 'description': 'description1',
|
|
233
|
+
* ...
|
|
234
|
+
* }, {
|
|
235
|
+
* ...
|
|
236
|
+
* }])
|
|
237
|
+
*/
|
|
253
238
|
|
|
254
|
-
|
|
239
|
+
data = data.reduce((acc, value, i, arr) => {
|
|
240
|
+
var location = value[locationField]
|
|
255
241
|
|
|
242
|
+
if (!location) {
|
|
256
243
|
return acc
|
|
257
|
-
}
|
|
258
|
-
}
|
|
244
|
+
}
|
|
259
245
|
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
246
|
+
// 하나의 로케이션에 여러 레코드 정보가 올 수 있으므로, 하나이 로케이션의 스탁정보를 items 배열에 담는다.
|
|
247
|
+
if (acc[location]) {
|
|
248
|
+
acc[location]['items'].push(value)
|
|
249
|
+
} else {
|
|
250
|
+
acc[location] = { items: [value] }
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
return acc
|
|
254
|
+
}, {})
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* Object type data
|
|
259
|
+
* (e.g. data: {
|
|
260
|
+
* 'A0101-01': { items: [{ location: 'A0101-01', qty: 10, description: 'description', ... }, {...}] },
|
|
261
|
+
* ...
|
|
262
|
+
* })
|
|
263
|
+
*/
|
|
264
|
+
for (var key in data) {
|
|
265
|
+
let id = key
|
|
266
|
+
if (data.hasOwnProperty(id)) {
|
|
267
|
+
let d = data[id]
|
|
268
|
+
let object = this.getObject(id)
|
|
269
|
+
if (object) {
|
|
270
|
+
;(object as Stock).onchangeStockData(d)
|
|
275
271
|
}
|
|
276
272
|
}
|
|
277
273
|
}
|
|
@@ -299,10 +295,13 @@ export class Visualizer extends ThreeContainer {
|
|
|
299
295
|
var realObject = object?.userData.context
|
|
300
296
|
|
|
301
297
|
if (realObject) {
|
|
302
|
-
if (ref &&
|
|
298
|
+
if (ref && realObject instanceof Stock) {
|
|
303
299
|
;(realObject as any).onmouseup(e, this, (data: any) => {
|
|
304
300
|
ScenePopup.show(this, ref, {
|
|
305
|
-
|
|
301
|
+
data,
|
|
302
|
+
modal: false,
|
|
303
|
+
closable: true,
|
|
304
|
+
output: false,
|
|
306
305
|
location: this.state.popupPosition || 'right-top'
|
|
307
306
|
})
|
|
308
307
|
})
|