@operato/board 8.0.0-alpha.37 → 8.0.0-alpha.41

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": "8.0.0-alpha.37",
3
+ "version": "8.0.0-alpha.41",
4
4
  "description": "Webcomponent for board following open-wc recommendations",
5
5
  "author": "heartyoh",
6
6
  "main": "dist/src/index.js",
@@ -99,16 +99,16 @@
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-alpha.37",
103
- "@operato/data-grist": "^8.0.0-alpha.37",
104
- "@operato/font": "^8.0.0-alpha.37",
102
+ "@operato/app": "^8.0.0-alpha.41",
103
+ "@operato/data-grist": "^8.0.0-alpha.41",
104
+ "@operato/font": "^8.0.0-alpha.41",
105
105
  "@operato/graphql": "^8.0.0-alpha.37",
106
106
  "@operato/i18n": "^8.0.0-alpha.37",
107
- "@operato/input": "^8.0.0-alpha.37",
108
- "@operato/layout": "^8.0.0-alpha.37",
107
+ "@operato/input": "^8.0.0-alpha.41",
108
+ "@operato/layout": "^8.0.0-alpha.41",
109
109
  "@operato/markdown": "^8.0.0-alpha.37",
110
- "@operato/popup": "^8.0.0-alpha.37",
111
- "@operato/property-editor": "^8.0.0-alpha.37",
110
+ "@operato/popup": "^8.0.0-alpha.41",
111
+ "@operato/property-editor": "^8.0.0-alpha.41",
112
112
  "@operato/styles": "^8.0.0-alpha.37",
113
113
  "@operato/utils": "^8.0.0-alpha.37",
114
114
  "@polymer/paper-dropdown-menu": "^3.2.0",
@@ -159,5 +159,5 @@
159
159
  "prettier --write"
160
160
  ]
161
161
  },
162
- "gitHead": "508ea9c2cd0ed626825045dae9a068b0fa8932be"
162
+ "gitHead": "0c2adcc994cd105055c9355810fa9c7c8196ca41"
163
163
  }
@@ -305,7 +305,7 @@ export class BoardViewer extends LitElement {
305
305
  this.transientShowButtons()
306
306
  }
307
307
 
308
- setupScene({ id, scene }: { id: string; scene: any }) {
308
+ setupScene({ id, scene }: { id: string; scene: any }, history?: -1 | 0 | 1) {
309
309
  this._scene = scene
310
310
 
311
311
  const backgroundColor = this._scene?.root.state.fillStyle
@@ -332,6 +332,14 @@ export class BoardViewer extends LitElement {
332
332
  this.bindSceneEvents()
333
333
 
334
334
  this.transientShowButtons()
335
+
336
+ if (typeof history !== 'undefined' /* && document.querySelector('things-app') */) {
337
+ const currentUrl = new URL(window.location.href)
338
+ const paths = currentUrl.pathname.split('/')
339
+
340
+ paths[paths.length - 1] = this.currentBoardId
341
+ window.history.replaceState({}, '', `${currentUrl.origin}${paths.join('/')}${currentUrl.search}`)
342
+ }
335
343
  }
336
344
 
337
345
  async showScene(boardId: string, bindingData?: any) {
@@ -360,7 +368,7 @@ export class BoardViewer extends LitElement {
360
368
  /* forward를 비운다. */
361
369
  this._forward = []
362
370
 
363
- this.setupScene({ id: boardId, scene })
371
+ this.setupScene({ id: boardId, scene }, 0)
364
372
 
365
373
  if (bindingData) {
366
374
  scene.data = bindingData
@@ -465,10 +473,10 @@ export class BoardViewer extends LitElement {
465
473
  /* 원래의 target에 되돌린다. */
466
474
  this._scene.target = this._oldtarget
467
475
  this.unbindSceneEvents(this._scene)
468
- this._backward.push({ id: id!, scene: this._scene })
476
+ this._backward.push({ id: this.currentBoardId!, scene: this._scene })
469
477
  }
470
478
 
471
- this.setupScene({ id: id!, scene })
479
+ this.setupScene({ id: id!, scene }, 1)
472
480
  }
473
481
 
474
482
  onTapPrev() {
@@ -480,10 +488,10 @@ export class BoardViewer extends LitElement {
480
488
  /* 원래의 target에 되돌린다. */
481
489
  this._scene.target = this._oldtarget
482
490
  this.unbindSceneEvents(this._scene)
483
- this._forward.push({ id: id!, scene: this._scene })
491
+ this._forward.push({ id: this.currentBoardId!, scene: this._scene })
484
492
  }
485
493
 
486
- this.setupScene({ id: id!, scene })
494
+ this.setupScene({ id: id!, scene }, -1)
487
495
  }
488
496
 
489
497
  onTapFullscreen() {