@operato/board 10.29.38 → 10.29.39

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,15 @@
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
+ ### [10.29.39](https://github.com/hatiolab/operato/compare/v10.29.38...v10.29.39) (2026-10-17)
7
+
8
+
9
+ ### :bug: Bug Fix
10
+
11
+ * **board:** request approval before viewer route changes ([169e997](https://github.com/hatiolab/operato/commit/169e997dff381eb3f3f56f6cf073049ec5467bbb))
12
+
13
+
14
+
6
15
  ### [10.29.38](https://github.com/hatiolab/operato/compare/v10.29.37...v10.29.38) (2026-10-17)
7
16
 
8
17
  **Note:** Version bump only for package @operato/board
@@ -23,30 +23,30 @@
23
23
  <div class='clearfix'>
24
24
 
25
25
  <div class='fl pad1y space-right2'>
26
- <span class="strong">58.1% </span>
26
+ <span class="strong">58.08% </span>
27
27
  <span class="quiet">Statements</span>
28
- <span class='fraction'>40440/69603</span>
28
+ <span class='fraction'>40442/69622</span>
29
29
  </div>
30
30
 
31
31
 
32
32
  <div class='fl pad1y space-right2'>
33
- <span class="strong">61.73% </span>
33
+ <span class="strong">61.64% </span>
34
34
  <span class="quiet">Branches</span>
35
- <span class='fraction'>1018/1649</span>
35
+ <span class='fraction'>1014/1645</span>
36
36
  </div>
37
37
 
38
38
 
39
39
  <div class='fl pad1y space-right2'>
40
- <span class="strong">22.18% </span>
40
+ <span class="strong">22.12% </span>
41
41
  <span class="quiet">Functions</span>
42
- <span class='fraction'>422/1902</span>
42
+ <span class='fraction'>421/1903</span>
43
43
  </div>
44
44
 
45
45
 
46
46
  <div class='fl pad1y space-right2'>
47
- <span class="strong">58.1% </span>
47
+ <span class="strong">58.08% </span>
48
48
  <span class="quiet">Lines</span>
49
- <span class='fraction'>40440/69603</span>
49
+ <span class='fraction'>40442/69622</span>
50
50
  </div>
51
51
 
52
52
 
@@ -170,17 +170,17 @@
170
170
 
171
171
  <tr>
172
172
  <td class="file low" data-value="__wds-outside-root__/1/utils/src"><a href="__wds-outside-root__/1/utils/src/index.html">__wds-outside-root__/1/utils/src</a></td>
173
- <td data-value="37.61" class="pic low">
173
+ <td data-value="37.7" class="pic low">
174
174
  <div class="chart"><div class="cover-fill" style="width: 37%"></div><div class="cover-empty" style="width: 63%"></div></div>
175
175
  </td>
176
- <td data-value="37.61" class="pct low">37.61%</td>
177
- <td data-value="1954" class="abs low">735/1954</td>
176
+ <td data-value="37.7" class="pct low">37.7%</td>
177
+ <td data-value="1973" class="abs low">744/1973</td>
178
178
  <td data-value="0" class="pct low">0%</td>
179
179
  <td data-value="5" class="abs low">0/5</td>
180
180
  <td data-value="0" class="pct low">0%</td>
181
- <td data-value="76" class="abs low">0/76</td>
182
- <td data-value="37.61" class="pct low">37.61%</td>
183
- <td data-value="1954" class="abs low">735/1954</td>
181
+ <td data-value="77" class="abs low">0/77</td>
182
+ <td data-value="37.7" class="pct low">37.7%</td>
183
+ <td data-value="1973" class="abs low">744/1973</td>
184
184
  </tr>
185
185
 
186
186
  <tr>
@@ -635,17 +635,17 @@
635
635
 
636
636
  <tr>
637
637
  <td class="file low" data-value="__wds-outside-root__/2/node_modules/@hatiolab/things-scene/node_modules/jsonata"><a href="__wds-outside-root__/2/node_modules/@hatiolab/things-scene/node_modules/jsonata/index.html">__wds-outside-root__/2/node_modules/@hatiolab/things-scene/node_modules/jsonata</a></td>
638
- <td data-value="25.38" class="pic low">
638
+ <td data-value="25.3" class="pic low">
639
639
  <div class="chart"><div class="cover-fill" style="width: 25%"></div><div class="cover-empty" style="width: 75%"></div></div>
640
640
  </td>
641
- <td data-value="25.38" class="pct low">25.38%</td>
642
- <td data-value="9468" class="abs low">2403/9468</td>
643
- <td data-value="73.56" class="pct medium">73.56%</td>
644
- <td data-value="227" class="abs medium">167/227</td>
645
- <td data-value="18.72" class="pct low">18.72%</td>
646
- <td data-value="251" class="abs low">47/251</td>
647
- <td data-value="25.38" class="pct low">25.38%</td>
648
- <td data-value="9468" class="abs low">2403/9468</td>
641
+ <td data-value="25.3" class="pct low">25.3%</td>
642
+ <td data-value="9468" class="abs low">2396/9468</td>
643
+ <td data-value="73.09" class="pct medium">73.09%</td>
644
+ <td data-value="223" class="abs medium">163/223</td>
645
+ <td data-value="18.32" class="pct low">18.32%</td>
646
+ <td data-value="251" class="abs low">46/251</td>
647
+ <td data-value="25.3" class="pct low">25.3%</td>
648
+ <td data-value="9468" class="abs low">2396/9468</td>
649
649
  </tr>
650
650
 
651
651
  <tr>
@@ -1631,7 +1631,7 @@
1631
1631
  <div class='footer quiet pad2 space-top1 center small'>
1632
1632
  Code coverage generated by
1633
1633
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
1634
- at 2026-10-17T05:17:49.026Z
1634
+ at 2026-10-17T11:52:29.662Z
1635
1635
  </div>
1636
1636
  <script src="prettify.js"></script>
1637
1637
  <script>
@@ -6140,14 +6140,16 @@ BRH:0
6140
6140
  end_of_record
6141
6141
  TN:
6142
6142
  SF:__wds-outside-root__/1/utils/src/file-acceptance.ts
6143
- FN:28,registerFileUploadLimits
6144
- FN:37,fileUploadLimits
6145
- FN:50,acceptsFile
6146
- FN:73,sortPickedFiles
6147
- FNF:4
6143
+ FN:31,registerFileUploadLimits
6144
+ FN:40,fileUploadLimits
6145
+ FN:53,narrowLimits
6146
+ FN:69,acceptsFile
6147
+ FN:92,sortPickedFiles
6148
+ FNF:5
6148
6149
  FNH:0
6149
6150
  FNDA:0,registerFileUploadLimits
6150
6151
  FNDA:0,fileUploadLimits
6152
+ FNDA:0,narrowLimits
6151
6153
  FNDA:0,acceptsFile
6152
6154
  FNDA:0,sortPickedFiles
6153
6155
  DA:1,1
@@ -6178,31 +6180,31 @@ DA:25,1
6178
6180
  DA:26,1
6179
6181
  DA:27,1
6180
6182
  DA:28,1
6181
- DA:29,0
6182
- DA:30,0
6183
- DA:31,0
6184
- DA:32,1
6185
- DA:33,1
6186
- DA:34,1
6183
+ DA:29,1
6184
+ DA:30,1
6185
+ DA:31,1
6186
+ DA:32,0
6187
+ DA:33,0
6188
+ DA:34,0
6187
6189
  DA:35,1
6188
6190
  DA:36,1
6189
6191
  DA:37,1
6190
- DA:38,0
6191
- DA:39,0
6192
- DA:40,0
6192
+ DA:38,1
6193
+ DA:39,1
6194
+ DA:40,1
6193
6195
  DA:41,0
6194
6196
  DA:42,0
6195
6197
  DA:43,0
6196
6198
  DA:44,0
6197
- DA:45,1
6198
- DA:46,1
6199
- DA:47,1
6199
+ DA:45,0
6200
+ DA:46,0
6201
+ DA:47,0
6200
6202
  DA:48,1
6201
6203
  DA:49,1
6202
6204
  DA:50,1
6203
- DA:51,0
6204
- DA:52,0
6205
- DA:53,0
6205
+ DA:51,1
6206
+ DA:52,1
6207
+ DA:53,1
6206
6208
  DA:54,0
6207
6209
  DA:55,0
6208
6210
  DA:56,0
@@ -6213,16 +6215,16 @@ DA:60,0
6213
6215
  DA:61,0
6214
6216
  DA:62,0
6215
6217
  DA:63,0
6216
- DA:64,0
6217
- DA:65,0
6218
- DA:66,0
6219
- DA:67,0
6218
+ DA:64,1
6219
+ DA:65,1
6220
+ DA:66,1
6221
+ DA:67,1
6220
6222
  DA:68,1
6221
6223
  DA:69,1
6222
- DA:70,1
6223
- DA:71,1
6224
- DA:72,1
6225
- DA:73,1
6224
+ DA:70,0
6225
+ DA:71,0
6226
+ DA:72,0
6227
+ DA:73,0
6226
6228
  DA:74,0
6227
6229
  DA:75,0
6228
6230
  DA:76,0
@@ -6236,15 +6238,34 @@ DA:83,0
6236
6238
  DA:84,0
6237
6239
  DA:85,0
6238
6240
  DA:86,0
6239
- DA:87,0
6240
- DA:88,0
6241
- DA:89,0
6242
- DA:90,0
6243
- DA:91,0
6244
- DA:92,0
6241
+ DA:87,1
6242
+ DA:88,1
6243
+ DA:89,1
6244
+ DA:90,1
6245
+ DA:91,1
6246
+ DA:92,1
6245
6247
  DA:93,0
6246
- LF:93
6247
- LH:46
6248
+ DA:94,0
6249
+ DA:95,0
6250
+ DA:96,0
6251
+ DA:97,0
6252
+ DA:98,0
6253
+ DA:99,0
6254
+ DA:100,0
6255
+ DA:101,0
6256
+ DA:102,0
6257
+ DA:103,0
6258
+ DA:104,0
6259
+ DA:105,0
6260
+ DA:106,0
6261
+ DA:107,0
6262
+ DA:108,0
6263
+ DA:109,0
6264
+ DA:110,0
6265
+ DA:111,0
6266
+ DA:112,0
6267
+ LF:112
6268
+ LH:55
6248
6269
  BRF:0
6249
6270
  BRH:0
6250
6271
  end_of_record
@@ -53267,9 +53288,9 @@ FN:9376,u
53267
53288
  FN:9426,p
53268
53289
  FN:9448,f
53269
53290
  FNF:251
53270
- FNH:47
53271
- FNDA:11,o.get
53272
- FNDA:27,o.get
53291
+ FNH:46
53292
+ FNDA:0,o.get
53293
+ FNDA:25,o.get
53273
53294
  FNDA:2,si
53274
53295
  FNDA:0,ii
53275
53296
  FNDA:0,i
@@ -53527,19 +53548,19 @@ DA:5,2
53527
53548
  DA:6,2
53528
53549
  DA:7,2
53529
53550
  DA:8,2
53530
- DA:9,11
53531
- DA:10,11
53532
- DA:11,11
53533
- DA:12,11
53534
- DA:13,11
53535
- DA:14,5
53536
- DA:15,11
53551
+ DA:9,0
53552
+ DA:10,0
53553
+ DA:11,0
53554
+ DA:12,0
53555
+ DA:13,0
53556
+ DA:14,0
53557
+ DA:15,0
53537
53558
  DA:16,2
53538
- DA:17,27
53539
- DA:18,27
53559
+ DA:17,25
53560
+ DA:18,25
53540
53561
  DA:19,0
53541
- DA:20,24
53542
- DA:21,27
53562
+ DA:20,22
53563
+ DA:21,25
53543
53564
  DA:22,2
53544
53565
  DA:23,2
53545
53566
  DA:24,2
@@ -62988,7 +63009,7 @@ DA:9466,2
62988
63009
  DA:9467,2
62989
63010
  DA:9468,2
62990
63011
  LF:9468
62991
- LH:2403
63012
+ LH:2396
62992
63013
  BRDA:38,0,0,0
62993
63014
  BRDA:8,1,0,56
62994
63015
  BRDA:16,2,0,76
@@ -63209,15 +63230,11 @@ BRDA:9240,216,0,2
63209
63230
  BRDA:9253,217,0,2
63210
63231
  BRDA:9358,218,0,0
63211
63232
  BRDA:9360,219,0,0
63212
- BRDA:12,220,0,34
63213
- BRDA:12,221,0,34
63214
- BRDA:13,222,0,33
63215
- BRDA:13,223,0,28
63216
- BRDA:17,224,0,41
63217
- BRDA:18,225,0,62
63218
- BRDA:18,226,0,38
63219
- BRF:227
63220
- BRH:167
63233
+ BRDA:17,220,0,41
63234
+ BRDA:18,221,0,60
63235
+ BRDA:18,222,0,38
63236
+ BRF:223
63237
+ BRH:163
63221
63238
  end_of_record
63222
63239
  TN:
63223
63240
  SF:__wds-outside-root__/2/node_modules/@hatiolab/things-scene/node_modules/lodash-es/_DataView.js
@@ -61,11 +61,12 @@ export declare class BoardViewer extends LitElement {
61
61
  id: string;
62
62
  scene: any;
63
63
  }, history?: -1 | 0 | 1): void;
64
- showScene(boardId: string, bindingData?: any): Promise<void>;
65
- gotoPlayer(playGroupName: string, bindingData?: any): Promise<void>;
64
+ showScene(boardId: string, bindingData?: any): Promise<boolean | undefined>;
65
+ gotoPlayer(playGroupName: string, bindingData?: any): Promise<boolean | undefined>;
66
66
  bindSceneEvents(): void;
67
67
  unbindSceneEvents(scene: any): void;
68
68
  transientShowButtons(stop?: boolean): void;
69
+ private boardHistoryTarget;
69
70
  onTapNext(): void;
70
71
  onTapPrev(): void;
71
72
  onTapFullscreen(): void;
@@ -75,7 +76,7 @@ export declare class BoardViewer extends LitElement {
75
76
  onLinkGotoPlaylist(targetPlayGroupName: string, options: any, fromComponent: Component): void;
76
77
  onLinkOpen(url: string, value: any, fromComponent: Component): void;
77
78
  onLinkMove(url: string, value: any, fromComponent: Component): void;
78
- onRoutePage(page: string): void;
79
+ onRoutePage(page: string): Promise<boolean> | undefined;
79
80
  onStartScenario(scenario: string, value: string | number | object, component: Component): Promise<void>;
80
81
  onRunScenario(scenario: string, value: string | number | object, component: Component): Promise<void>;
81
82
  onExportData(filename: string, value: string | number | object, component: Component): Promise<void>;
@@ -1,4 +1,5 @@
1
1
  import { __decorate } from "tslib";
2
+ import { writeAddress } from '@operato/utils/address.js';
2
3
  import '@material/web/icon/icon.js';
3
4
  import '@material/web/fab/fab.js';
4
5
  import { css, html, LitElement, nothing } from 'lit';
@@ -280,27 +281,17 @@ let BoardViewer = class BoardViewer extends LitElement {
280
281
  this.currentBoardId = id;
281
282
  this.bindSceneEvents();
282
283
  this.transientShowButtons();
283
- if (this.history && typeof history !== 'undefined' /* && document.querySelector('things-app') */) {
284
- if (document.querySelector('things-app')) {
285
- const currentUrl = new URL(window.location.href);
286
- // 기존 history에서 이동하면, board-viewer에서 새롭게 로딩을 하므로, 이 컴포넌트내의 history를 잃게된다.
287
- // ox-board-viewer의 history가 window.history와 통합된 후에 다음 코드로 변경한다.
288
- // 그 전에는 replaceState를 실행한다.
289
- window.history.replaceState({}, '', `board-viewer/${id}${currentUrl.search ? '?' + currentUrl.search : ''}`);
290
- /*
291
- if (history === 0) {
292
- // 새로운 history를 추가한다.
293
- window.history.pushState({}, '', `board-viewer/${id}${currentUrl.search ? '?' + currentUrl.search : ''}`)
294
- } else {
295
- window.history.go(history)
296
- }
297
- */
298
- }
299
- }
300
284
  }
301
285
  async showScene(boardId, bindingData) {
302
286
  if (!boardId)
303
287
  return;
288
+ if (this.history && document.querySelector('things-app')) {
289
+ const url = new URL(`board-viewer/${boardId}`, document.baseURI);
290
+ url.search = location.search;
291
+ if (bindingData)
292
+ Object.entries(bindingData).forEach(([key, value]) => url.searchParams.set(key, String(value)));
293
+ return writeAddress(url);
294
+ }
304
295
  try {
305
296
  var scene = await this.provider.get(boardId, true);
306
297
  if (scene === this._scene) {
@@ -332,8 +323,7 @@ let BoardViewer = class BoardViewer extends LitElement {
332
323
  const id = (_a = (await fetchPlayGroupByName(playGroupName))) === null || _a === void 0 ? void 0 : _a.id;
333
324
  const queryString = bindingData ? objectToQueryString(bindingData) : '';
334
325
  if (document.querySelector('things-app')) {
335
- history.pushState({}, '', `board-player/${id}?${queryString}`);
336
- window.dispatchEvent(new Event('popstate'));
326
+ return writeAddress(new URL(`board-player/${id}?${queryString}`, document.baseURI));
337
327
  }
338
328
  else {
339
329
  location.href = `headless-player/${id}?${queryString}`;
@@ -390,8 +380,8 @@ let BoardViewer = class BoardViewer extends LitElement {
390
380
  return animation;
391
381
  });
392
382
  }
393
- this._forward.length <= 0 ? this._next.setAttribute('hidden', '') : this._next.removeAttribute('hidden');
394
- this._backward.length <= 0 ? this._prev.setAttribute('hidden', '') : this._prev.removeAttribute('hidden');
383
+ !(this.boardHistoryTarget(1) || this._forward.length) ? this._next.setAttribute('hidden', '') : this._next.removeAttribute('hidden');
384
+ !(this.boardHistoryTarget(-1) || this._backward.length) ? this._prev.setAttribute('hidden', '') : this._prev.removeAttribute('hidden');
395
385
  this._fabGroup && this._fabGroup.removeAttribute('hidden');
396
386
  this._fade_animations.forEach(animation => {
397
387
  animation.cancel();
@@ -401,7 +391,20 @@ let BoardViewer = class BoardViewer extends LitElement {
401
391
  });
402
392
  }
403
393
  /* event handlers */
394
+ boardHistoryTarget(delta) {
395
+ if (!this.history || !document.querySelector('things-app'))
396
+ return;
397
+ const nav = window.navigation;
398
+ const entry = nav.entries()[nav.currentEntry.index + delta];
399
+ return entry && /\/board-viewer\/[^/]+$/.test(new URL(entry.url).pathname) ? entry.key : undefined;
400
+ }
404
401
  onTapNext() {
402
+ if (this.history && document.querySelector('things-app')) {
403
+ const key = this.boardHistoryTarget(1);
404
+ if (key)
405
+ window.navigation.traverseTo(key).finished.catch(() => undefined);
406
+ return;
407
+ }
405
408
  var { id, scene } = this._forward.pop() || {};
406
409
  if (!scene)
407
410
  return;
@@ -415,6 +418,12 @@ let BoardViewer = class BoardViewer extends LitElement {
415
418
  this.setupScene({ id: id, scene }, 1);
416
419
  }
417
420
  onTapPrev() {
421
+ if (this.history && document.querySelector('things-app')) {
422
+ const key = this.boardHistoryTarget(-1);
423
+ if (key)
424
+ window.navigation.traverseTo(key).finished.catch(() => undefined);
425
+ return;
426
+ }
418
427
  var { id, scene } = this._backward.pop() || {};
419
428
  if (!scene)
420
429
  return;
@@ -479,8 +488,7 @@ let BoardViewer = class BoardViewer extends LitElement {
479
488
  if (!page) {
480
489
  return;
481
490
  }
482
- history.pushState({}, '', page);
483
- window.dispatchEvent(new Event('popstate'));
491
+ return writeAddress(new URL(page, document.baseURI));
484
492
  }
485
493
  async onStartScenario(scenario, value, component) {
486
494
  try {