@operato/board 8.0.0-alpha.9 → 8.0.0-beta.0
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 +247 -0
- package/demo/index-viewer.html +1 -1
- package/demo/index.html +1 -1
- package/dist/src/ox-board-player.js +2 -1
- package/dist/src/ox-board-player.js.map +1 -1
- package/dist/src/ox-board-template-viewer.d.ts +1 -1
- package/dist/src/ox-board-viewer.d.ts +3 -2
- package/dist/src/ox-board-viewer.js +16 -6
- package/dist/src/ox-board-viewer.js.map +1 -1
- package/dist/src/player/ox-board-wrapper.js +3 -1
- package/dist/src/player/ox-board-wrapper.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +25 -25
- package/src/ox-board-player.ts +3 -1
- package/src/ox-board-viewer.ts +15 -6
- package/src/player/ox-board-wrapper.ts +3 -1
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@operato/board",
|
3
|
-
"version": "8.0.0-
|
3
|
+
"version": "8.0.0-beta.0",
|
4
4
|
"description": "Webcomponent for board following open-wc recommendations",
|
5
5
|
"author": "heartyoh",
|
6
6
|
"main": "dist/src/index.js",
|
@@ -99,18 +99,18 @@
|
|
99
99
|
"dependencies": {
|
100
100
|
"@material/web": "^2.0.0",
|
101
101
|
"@open-wc/scoped-elements": "^2.1.3",
|
102
|
-
"@operato/app": "^8.0.0-
|
103
|
-
"@operato/data-grist": "^8.0.0-
|
104
|
-
"@operato/font": "^8.0.0-
|
105
|
-
"@operato/graphql": "^8.0.0-
|
106
|
-
"@operato/i18n": "^8.0.0-
|
107
|
-
"@operato/input": "^8.0.0-
|
108
|
-
"@operato/layout": "^8.0.0-
|
109
|
-
"@operato/markdown": "^8.0.0-
|
110
|
-
"@operato/popup": "^8.0.0-
|
111
|
-
"@operato/property-editor": "^8.0.0-
|
112
|
-
"@operato/styles": "^8.0.0-
|
113
|
-
"@operato/utils": "^8.0.0-
|
102
|
+
"@operato/app": "^8.0.0-beta.0",
|
103
|
+
"@operato/data-grist": "^8.0.0-beta.0",
|
104
|
+
"@operato/font": "^8.0.0-beta.0",
|
105
|
+
"@operato/graphql": "^8.0.0-beta.0",
|
106
|
+
"@operato/i18n": "^8.0.0-beta.0",
|
107
|
+
"@operato/input": "^8.0.0-beta.0",
|
108
|
+
"@operato/layout": "^8.0.0-beta.0",
|
109
|
+
"@operato/markdown": "^8.0.0-beta.0",
|
110
|
+
"@operato/popup": "^8.0.0-beta.0",
|
111
|
+
"@operato/property-editor": "^8.0.0-beta.0",
|
112
|
+
"@operato/styles": "^8.0.0-beta.0",
|
113
|
+
"@operato/utils": "^8.0.0-beta.0",
|
114
114
|
"@polymer/paper-dropdown-menu": "^3.2.0",
|
115
115
|
"@types/file-saver": "^2.0.4",
|
116
116
|
"@types/sortablejs": "^1.10.7",
|
@@ -122,23 +122,23 @@
|
|
122
122
|
"xlsx": "^0.18.5"
|
123
123
|
},
|
124
124
|
"devDependencies": {
|
125
|
-
"@custom-elements-manifest/analyzer": "^0.
|
125
|
+
"@custom-elements-manifest/analyzer": "^0.10.0",
|
126
126
|
"@hatiolab/prettier-config": "^1.0.0",
|
127
|
-
"@hatiolab/things-scene": "^8.0.0-
|
127
|
+
"@hatiolab/things-scene": "^8.0.0-beta",
|
128
128
|
"@open-wc/eslint-config": "^12.0.3",
|
129
|
-
"@open-wc/testing": "^
|
130
|
-
"@rollup/plugin-image": "^
|
131
|
-
"@rollup/plugin-json": "^
|
129
|
+
"@open-wc/testing": "^4.0.0",
|
130
|
+
"@rollup/plugin-image": "^3.0.3",
|
131
|
+
"@rollup/plugin-json": "^6.1.0",
|
132
132
|
"@types/lodash-es": "^4.17.6",
|
133
133
|
"@types/w3c-web-usb": "^1.0.5",
|
134
|
-
"@typescript-eslint/eslint-plugin": "^
|
135
|
-
"@typescript-eslint/parser": "^
|
136
|
-
"@web/dev-server": "^0.
|
134
|
+
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
135
|
+
"@typescript-eslint/parser": "^8.0.0",
|
136
|
+
"@web/dev-server": "^0.4.0",
|
137
137
|
"@web/dev-server-storybook": "^2.0.1",
|
138
|
-
"@web/test-runner": "^0.
|
138
|
+
"@web/test-runner": "^0.19.0",
|
139
139
|
"@webcomponents/scoped-custom-element-registry": "^0.0.9",
|
140
|
-
"concurrently": "^
|
141
|
-
"eslint": "^
|
140
|
+
"concurrently": "^9.0.0",
|
141
|
+
"eslint": "^9.0.0",
|
142
142
|
"eslint-config-prettier": "^9.1.0",
|
143
143
|
"husky": "^9.0.11",
|
144
144
|
"lint-staged": "^15.2.2",
|
@@ -159,5 +159,5 @@
|
|
159
159
|
"prettier --write"
|
160
160
|
]
|
161
161
|
},
|
162
|
-
"gitHead": "
|
162
|
+
"gitHead": "c4e9cc245659d050a9ffd66542083a6daad4bcb9"
|
163
163
|
}
|
package/src/ox-board-player.ts
CHANGED
@@ -301,7 +301,9 @@ export class BoardPlayer extends LitElement {
|
|
301
301
|
}
|
302
302
|
|
303
303
|
async start() {
|
304
|
-
if (!this.boards || this.boards.length == 0)
|
304
|
+
if (!this.boards || this.boards.length == 0) {
|
305
|
+
return
|
306
|
+
}
|
305
307
|
|
306
308
|
this.started = true
|
307
309
|
this.playing = true
|
package/src/ox-board-viewer.ts
CHANGED
@@ -125,6 +125,7 @@ export class BoardViewer extends LitElement {
|
|
125
125
|
@property({ type: Object }) provider: ReferenceProvider | null = null
|
126
126
|
@property({ type: Object }) data: any
|
127
127
|
@property({ type: Object }) values: any
|
128
|
+
@property({ type: Boolean }) history: boolean = false
|
128
129
|
|
129
130
|
@property({ type: Boolean, reflect: true, attribute: 'hide-fullscreen' }) hideFullscreen = false
|
130
131
|
@property({ type: Boolean, reflect: true, attribute: 'hide-navigation' }) hideNavigation = false
|
@@ -305,7 +306,7 @@ export class BoardViewer extends LitElement {
|
|
305
306
|
this.transientShowButtons()
|
306
307
|
}
|
307
308
|
|
308
|
-
setupScene({ id, scene }: { id: string; scene: any }) {
|
309
|
+
setupScene({ id, scene }: { id: string; scene: any }, history?: -1 | 0 | 1) {
|
309
310
|
this._scene = scene
|
310
311
|
|
311
312
|
const backgroundColor = this._scene?.root.state.fillStyle
|
@@ -332,6 +333,14 @@ export class BoardViewer extends LitElement {
|
|
332
333
|
this.bindSceneEvents()
|
333
334
|
|
334
335
|
this.transientShowButtons()
|
336
|
+
|
337
|
+
if (this.history && typeof history !== 'undefined' /* && document.querySelector('things-app') */) {
|
338
|
+
const currentUrl = new URL(window.location.href)
|
339
|
+
const paths = currentUrl.pathname.split('/')
|
340
|
+
|
341
|
+
paths[paths.length - 1] = this.currentBoardId
|
342
|
+
window.history.replaceState({}, '', `${currentUrl.origin}${paths.join('/')}${currentUrl.search}`)
|
343
|
+
}
|
335
344
|
}
|
336
345
|
|
337
346
|
async showScene(boardId: string, bindingData?: any) {
|
@@ -360,7 +369,7 @@ export class BoardViewer extends LitElement {
|
|
360
369
|
/* forward를 비운다. */
|
361
370
|
this._forward = []
|
362
371
|
|
363
|
-
this.setupScene({ id: boardId, scene })
|
372
|
+
this.setupScene({ id: boardId, scene }, 0)
|
364
373
|
|
365
374
|
if (bindingData) {
|
366
375
|
scene.data = bindingData
|
@@ -465,10 +474,10 @@ export class BoardViewer extends LitElement {
|
|
465
474
|
/* 원래의 target에 되돌린다. */
|
466
475
|
this._scene.target = this._oldtarget
|
467
476
|
this.unbindSceneEvents(this._scene)
|
468
|
-
this._backward.push({ id:
|
477
|
+
this._backward.push({ id: this.currentBoardId!, scene: this._scene })
|
469
478
|
}
|
470
479
|
|
471
|
-
this.setupScene({ id: id!, scene })
|
480
|
+
this.setupScene({ id: id!, scene }, 1)
|
472
481
|
}
|
473
482
|
|
474
483
|
onTapPrev() {
|
@@ -480,10 +489,10 @@ export class BoardViewer extends LitElement {
|
|
480
489
|
/* 원래의 target에 되돌린다. */
|
481
490
|
this._scene.target = this._oldtarget
|
482
491
|
this.unbindSceneEvents(this._scene)
|
483
|
-
this._forward.push({ id:
|
492
|
+
this._forward.push({ id: this.currentBoardId!, scene: this._scene })
|
484
493
|
}
|
485
494
|
|
486
|
-
this.setupScene({ id: id!, scene })
|
495
|
+
this.setupScene({ id: id!, scene }, -1)
|
487
496
|
}
|
488
497
|
|
489
498
|
onTapFullscreen() {
|
@@ -81,6 +81,8 @@ class BoardWrapper extends LitElement {
|
|
81
81
|
}
|
82
82
|
|
83
83
|
_onBoardChanged() {
|
84
|
+
this.closeScene()
|
85
|
+
|
84
86
|
this.initScene()
|
85
87
|
}
|
86
88
|
|
@@ -138,7 +140,7 @@ class BoardWrapper extends LitElement {
|
|
138
140
|
this._scene.target = this._targetEl
|
139
141
|
|
140
142
|
requestAnimationFrame(() => {
|
141
|
-
if (this._scene
|
143
|
+
if (this._scene?.target.offsetWidth) {
|
142
144
|
this._scene.fit()
|
143
145
|
}
|
144
146
|
})
|