@fmsim/board 2.0.0-beta.7 → 2.0.0-beta.75
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/custom-elements.json +4024 -2059
- package/demo/index-modeller.html +1 -1
- package/demo/index-player.html +2 -2
- package/demo/index-viewer.html +2 -2
- package/demo/index.html +2 -2
- package/dist/src/component/etc.js +35 -0
- package/dist/src/component/etc.js.map +1 -1
- package/dist/src/component/index.d.ts +1 -0
- package/dist/src/component/index.js +1 -0
- package/dist/src/component/index.js.map +1 -1
- package/dist/src/component/restful-input-attachment-selector.d.ts +1 -1
- package/dist/src/component/restful-property-editor-backdrop-faces.d.ts +50 -0
- package/dist/src/component/restful-property-editor-backdrop-faces.js +524 -0
- package/dist/src/component/restful-property-editor-backdrop-faces.js.map +1 -0
- package/dist/src/data-storage/board-model-cache.d.ts +13 -0
- package/dist/src/data-storage/board-model-cache.js +66 -0
- package/dist/src/data-storage/board-model-cache.js.map +1 -0
- package/dist/src/index.d.ts +3 -0
- package/dist/src/index.js +2 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/layers/movement-layer.d.ts +1 -1
- package/dist/src/layers/movement-layer.js +3 -7
- package/dist/src/layers/movement-layer.js.map +1 -1
- package/dist/src/modeller/component-toolbar/component-menu.d.ts +1 -1
- package/dist/src/modeller/component-toolbar/component-toolbar.d.ts +1 -1
- package/dist/src/modeller/edit-toolbar-style.js +43 -3
- package/dist/src/modeller/edit-toolbar-style.js.map +1 -1
- package/dist/src/modeller/edit-toolbar.d.ts +8 -14
- package/dist/src/modeller/edit-toolbar.js +208 -211
- package/dist/src/modeller/edit-toolbar.js.map +1 -1
- package/dist/src/modeller/property-sidebar/abstract-property.js +10 -2
- package/dist/src/modeller/property-sidebar/abstract-property.js.map +1 -1
- package/dist/src/modeller/property-sidebar/data-binding/data-binding.d.ts +1 -1
- package/dist/src/modeller/property-sidebar/effects/effects.d.ts +1 -1
- package/dist/src/modeller/property-sidebar/effects/property-event-hover.d.ts +1 -1
- package/dist/src/modeller/property-sidebar/effects/property-event.d.ts +1 -1
- package/dist/src/modeller/property-sidebar/inspector/inspector.d.ts +1 -1
- package/dist/src/modeller/property-sidebar/property-sidebar.d.ts +1 -1
- package/dist/src/modeller/property-sidebar/shapes/shapes.js +31 -0
- package/dist/src/modeller/property-sidebar/shapes/shapes.js.map +1 -1
- package/dist/src/modeller/property-sidebar/specifics/specifics.d.ts +2 -1
- package/dist/src/modeller/property-sidebar/specifics/specifics.js +10 -0
- package/dist/src/modeller/property-sidebar/specifics/specifics.js.map +1 -1
- package/dist/src/modeller/property-sidebar/styles/styles.d.ts +1 -1
- package/dist/src/modeller/scene-viewer/ox-scene-layer.d.ts +4 -3
- package/dist/src/modeller/scene-viewer/ox-scene-layer.js +2 -1
- package/dist/src/modeller/scene-viewer/ox-scene-layer.js.map +1 -1
- package/dist/src/modeller/scene-viewer/ox-scene-viewer.d.ts +2 -1
- package/dist/src/modeller/scene-viewer/ox-scene-viewer.js +5 -1
- package/dist/src/modeller/scene-viewer/ox-scene-viewer.js.map +1 -1
- package/dist/src/ox-board-component-info.d.ts +1 -0
- package/dist/src/ox-board-component-info.js +5 -1
- package/dist/src/ox-board-component-info.js.map +1 -1
- package/dist/src/ox-board-list.js +2 -2
- package/dist/src/ox-board-list.js.map +1 -1
- package/dist/src/ox-board-modeller.d.ts +6 -3
- package/dist/src/ox-board-modeller.js +14 -4
- package/dist/src/ox-board-modeller.js.map +1 -1
- package/dist/src/ox-board-viewer.d.ts +60 -13
- package/dist/src/ox-board-viewer.js +572 -86
- package/dist/src/ox-board-viewer.js.map +1 -1
- package/dist/src/ox-editor-board-selector.d.ts +3 -0
- package/dist/src/ox-editor-board-selector.js +38 -9
- package/dist/src/ox-editor-board-selector.js.map +1 -1
- package/dist/src/ox-playback-controls.d.ts +154 -0
- package/dist/src/ox-playback-controls.js +947 -0
- package/dist/src/ox-playback-controls.js.map +1 -0
- package/dist/src/playback/playback-engine.d.ts +106 -0
- package/dist/src/playback/playback-engine.js +395 -0
- package/dist/src/playback/playback-engine.js.map +1 -0
- package/dist/src/selector/board-creation-popup.js +2 -2
- package/dist/src/selector/board-creation-popup.js.map +1 -1
- package/dist/src/selector/board-thumbnail-card.js +6 -6
- package/dist/src/selector/board-thumbnail-card.js.map +1 -1
- package/dist/src/selector/ox-board-creation-card.js +2 -2
- package/dist/src/selector/ox-board-creation-card.js.map +1 -1
- package/dist/src/selector/ox-board-selector.js +21 -10
- package/dist/src/selector/ox-board-selector.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/icons/components/text.png +0 -0
- package/icons/icon-htoolbar.png +0 -0
- package/package.json +8 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ox-board-viewer.js","sourceRoot":"","sources":["../../src/ox-board-viewer.ts"],"names":[],"mappings":";AAAA,OAAO,0BAA0B,CAAA;AACjC,OAAO,4BAA4B,CAAA;AACnC,OAAO,4BAA4B,CAAA;AACnC,OAAO,8BAA8B,CAAA;AACrC,OAAO,qCAAqC,CAAA;AAE5C,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAkB,MAAM,KAAK,CAAA;AAC3D,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAEzE,OAAO,EAAa,MAAM,EAA4B,UAAU,EAAc,MAAM,wBAAwB,CAAA;AAC5G,OAAO,EAAE,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAEjD,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAA;AAC5D,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,4BAA4B,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAKlG,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,UAAU;IAApC;;;QA6FuB,YAAO,GAAW,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AQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAAC;mDAAuB;AAEvF;IAAR,KAAK,EAAE;2CAAmB;AAClB;IAAR,KAAK,EAAE;6CAA4C;AAC3C;IAAR,KAAK,EAAE;8CAA6C;AAE5C;IAAR,KAAK,EAAE;+CAAsC;AACrC;IAAR,KAAK,EAAE;qDAAoC;AAI1B;IAAjB,KAAK,CAAC,SAAS,CAAC;4CAAsB;AACvB;IAAf,KAAK,CAAC,OAAO,CAAC;0CAAoB;AACnB;IAAf,KAAK,CAAC,OAAO,CAAC;0CAAoB;AACb;IAArB,KAAK,CAAC,aAAa,CAAC;gDAA0B;AAlHpC,WAAW;IADvB,aAAa,CAAC,iBAAiB,CAAC;GACpB,WAAW,CA0xBvB","sourcesContent":["import '@material/web/fab/fab.js'\nimport '@material/web/icon/icon.js'\nimport './layers/movement-layer.js'\nimport './ox-board-component-info.js'\nimport './layers/mcs-mouse-event-handler.js'\n\nimport { css, html, LitElement, PropertyValues } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\n\nimport { Component, create, ReferenceProvider, Scene, SCENE_MODE, ScenePopup } from '@hatiolab/things-scene'\nimport { isIOS, togglefullscreen } from '@operato/utils'\nimport { ScrollbarStyles } from '@operato/styles'\n\nimport { DataStorage } from './data-storage/data-storage.js'\nimport { runScenario, startScenario, DataSubscriptionProviderImpl, isRestfulAvailable } from '@fmsim/api'\n\nimport { BoardComponentInfo } from './ox-board-component-info.js'\n\n@customElement('ox-board-viewer')\nexport class BoardViewer extends LitElement {\n static styles = [\n ScrollbarStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n position: relative;\n\n width: 100%; /* 전체화면보기를 위해서 필요함. */\n overflow: hidden;\n background-color: white;\n }\n\n #target {\n flex: 1;\n\n width: 100%; /* 전체화면보기를 위해서 필요함. */\n height: 100%;\n\n outline: 0;\n }\n\n /* navigation buttons (standalone only, not inside md-fab) */\n md-icon:not([slot]) {\n z-index: 10;\n position: absolute;\n top: 45%;\n min-width: 50px;\n width: 50px;\n height: 50px;\n margin: 0;\n padding: 0;\n color: #fff;\n user-select: none;\n\n --md-icon-size: 3em;\n }\n\n md-icon[hidden] {\n display: none;\n }\n\n md-icon:not([slot]):hover {\n background-color: rgba(0, 0, 0, 0.2);\n border-radius: 50%;\n }\n\n #prev {\n left: 5px;\n }\n\n #next {\n right: 5px;\n }\n\n #fullscreen {\n position: absolute;\n bottom: 15px;\n right: 16px;\n }\n\n [hidden] {\n display: none;\n }\n\n ::slotted(ox-board-component-info) {\n position: absolute;\n right: 10px;\n top: 10px;\n width: 240px;\n opacity: 0.9;\n box-shadow: 2px 2px 4px gray;\n max-height: 600px;\n overflow: auto;\n z-index: 1000;\n }\n\n md-fab {\n z-index: 1000;\n --md-icon-size: 24px;\n }\n\n @media print {\n md-fab,\n md-icon {\n display: none;\n }\n }\n `\n ]\n\n @property({ type: String }) baseUrl: string = ''\n @property({ type: Object }) board: any = {}\n @property({ type: Object }) provider: ReferenceProvider | null = null\n @property({ type: Object }) data: any\n @property({ type: Object }) values: any\n\n @property({ type: Boolean, reflect: true, attribute: 'hide-fullscreen' }) hideFullscreen = false\n @property({ type: Boolean, reflect: true, attribute: 'hide-navigation' }) hideNavigation = false\n\n @state() _scene: any = null\n @state() _forward: { id: string; scene: any }[] = []\n @state() _backward: { id: string; scene: any }[] = []\n\n @state() _oldtarget: HTMLElement | null = null\n @state() _fade_animations?: Array<Animation>\n\n public currentBoardId?: string = this.board?.id\n\n @query('#target') _target!: HTMLElement\n @query('#prev') _prev!: HTMLElement\n @query('#next') _next!: HTMLElement\n @query('#fullscreen') _fullscreen!: HTMLElement\n\n private popup: BoardComponentInfo | null = null\n private lastComponent: Component | null = null\n\n render() {\n var fullscreen =\n !isIOS() && !this.hideFullscreen\n ? html`\n <md-fab\n id=\"fullscreen\"\n @click=${(e: Event) => this.onTapFullscreen()}\n @mouseover=${(e: Event) => this.transientShowButtons(true)}\n @mouseout=${(e: Event) => this.transientShowButtons()}\n title=\"fullscreen\"\n ><md-icon slot=\"icon\">${document.fullscreenElement ? 'fullscreen_exit' : 'fullscreen'}</md-icon></md-fab>\n `\n : html``\n\n var prev = !this.hideNavigation\n ? html`\n <md-icon\n id=\"prev\"\n @click=${(e: Event) => this.onTapPrev()}\n @mouseover=${(e: Event) => this.transientShowButtons(true)}\n @mouseout=${(e: Event) => this.transientShowButtons()}\n hidden\n >keyboard_arrow_left</md-icon\n >\n `\n : html``\n\n var next = !this.hideNavigation\n ? html`\n <md-icon\n id=\"next\"\n @click=${(e: Event) => this.onTapNext()}\n @mouseover=${(e: Event) => this.transientShowButtons(true)}\n @mouseout=${(e: Event) => this.transientShowButtons()}\n hidden\n >keyboard_arrow_right</md-icon\n >\n `\n : html``\n\n return html`\n ${prev}\n\n <div\n id=\"target\"\n @touchstart=${(e: Event) => this.transientShowButtons()}\n @mousemove=${(e: Event) => this.transientShowButtons()}\n ></div>\n\n <slot></slot>\n ${next} ${fullscreen}\n `\n }\n\n // 모니터링에서 장비 아이디에 해당하는 object를 찾아 캔버스 가운데 위치하도록 조정한다.\n fetchIFactsDataHandler = (e: Event) => {\n const id = (e as CustomEvent).detail.value\n\n const components = this._scene?.findAll(`#${id}`)\n if (!components || components.length == 0) {\n console.log('No equipment was found.')\n return\n }\n\n window.dispatchEvent(new CustomEvent('clickComponent', { detail: components[0] }))\n\n this._scene?.centerTo(components[0], true /* animated */)\n }\n\n // 모니터링에서 Movement Data를 보여준다.\n fmbShowMovementHandler = (e: Event) => {\n const movement = (e as CustomEvent).detail.value\n\n const movementLayer = this._scene?.findById(`movement-layer`)\n if (!movementLayer) {\n return\n }\n\n movementLayer.data = movement\n }\n\n // 모니터링에서 보드 상태를 원래상태 (정사이즈)로 돌려놓는다.\n fmbMonitoringInitHandler = (e: Event) => {\n this._scene?.fit('ratio')\n }\n\n // 모니터링에서 범례를 보여준다.\n fmbShowLegendHandler = (e: Event) => {\n const legendLayer = this._scene?.findById(`legend`)\n if (!legendLayer) {\n return\n }\n\n legendLayer.hidden = false\n }\n\n fmbHideLegendHandler = (e: Event) => {\n const legendLayer = this._scene?.findById(`legend`)\n if (!legendLayer) {\n return\n }\n legendLayer.hidden = true\n }\n\n // 모니터링에서 팝업을 보여준다.\n fmbShowPopupHandler = (e: Event) => {\n const { id, data } = (e as CustomEvent).detail\n const popupComponent = this._scene?.findById(id)\n\n if (popupComponent && popupComponent.getState('type') == 'popup') {\n ;(popupComponent as any).openPopup(data)\n }\n }\n\n fmbHidePopupHandler = (e: Event) => {\n const { id } = (e as CustomEvent).detail\n const popupComponent = this._scene?.findById(id)\n\n if (popupComponent && popupComponent.getState('type') == 'popup') {\n ;(popupComponent as any).hidePopup()\n }\n }\n\n // 모니터링에서 범례를 보여준다.\n fmbShowFloatingContainerHandler = (e: Event) => {\n const { id } = (e as CustomEvent).detail\n const floatingContainer = this._scene?.findById(id) as Component\n\n if (floatingContainer && floatingContainer.getState('type') == 'FloatingContainer') {\n floatingContainer.hidden = false\n }\n }\n\n fmbHideFloatingContainerHandler = (e: Event) => {\n const { id } = (e as CustomEvent).detail\n const floatingContainer = this._scene?.findById(id) as Component\n\n if (floatingContainer && floatingContainer.getState('type') == 'FloatingContainer') {\n floatingContainer.hidden = true\n }\n }\n\n // BoardComponentInfo popup을 보여준다.\n clickComponentHandler = (e: Event) => {\n const component = (e as CustomEvent).detail\n const { type } = component.state\n\n if (type == 'model-layer') {\n this.lastComponent?.trigger('deco-border-off')\n // this.lastComponent?.trigger('deco-arrow-reset')\n this.hidePopup()\n return\n }\n\n if ('isLVComponent' in component) {\n this.lastComponent?.trigger('deco-border-off')\n // this.lastComponent?.trigger('deco-arrow-reset')\n this.lastComponent = component\n\n component.trigger('deco-border', { distance: 8, lineWidth: 4, color: '#f007' })\n // component.trigger('deco-arrow', { color: 'red', animation: true, size: 20 })\n\n this.togglePopup(component)\n }\n }\n\n fmbStartAnimation = (e: Event) => {\n const { target, animation, decorator, border, arrow } = (e as CustomEvent).detail || {}\n const { id, type } = target || {}\n\n if (id) {\n this._scene\n ?.findAllById(id)\n .filter((component: any) => !type || component.getState('type') == type)\n .forEach((component: any) => {\n if (animation) {\n component.resetAnimation()\n component.setState('animation', {\n oncreate: animation\n })\n component.started = true\n }\n\n if (decorator) {\n component.trigger('deco-icon-off')\n component.trigger('deco-icon', decorator)\n }\n\n if (border) {\n component.trigger('deco-border-off')\n component.trigger('deco-border', border)\n }\n\n if (arrow) {\n component.trigger('deco-arrow-off')\n component.trigger('deco-arrow', arrow)\n }\n })\n }\n }\n\n fmbStopAnimation = (e: Event) => {\n const { target } = (e as CustomEvent).detail || {}\n const { id, type } = target || {}\n\n if (id) {\n this._scene\n ?.findAllById(id)\n .filter((component: any) => !type || component.getState('type') == type)\n .forEach((component: any) => {\n component.trigger('deco-off')\n component.resetAnimation()\n component.setState('animation', {\n oncreate: null\n })\n })\n }\n }\n\n fmbResetAnimation = () => {\n this._scene?.root.trigger('deco-reset')\n }\n\n connectedCallback() {\n super.connectedCallback()\n\n window.addEventListener('resize', this.resizeHandler)\n\n this.renderRoot.addEventListener(\n 'close-scene',\n e => {\n e.preventDefault()\n this.onTapPrev()\n },\n false\n )\n\n // 모니터링에서 장비 아이디에 해당하는 object를 찾아 캔버스 가운데 위치하도록 조정한다.\n window.addEventListener('fetchIFactsData', this.fetchIFactsDataHandler)\n\n // 모니터링에서 Movement Data를 보여준다.\n window.addEventListener('fmbShowMovement', this.fmbShowMovementHandler)\n\n // 모니터링에서 보드 상태를 원래상태 (정사이즈)로 돌려놓는다.\n window.addEventListener('fmbMonitoringInit', this.fmbMonitoringInitHandler)\n\n // BoardComponentInfo popup을 보여준다.\n window.addEventListener('clickComponent', this.clickComponentHandler)\n\n // AnimatedIcon 을 추가하거나 제거한다.\n window.addEventListener('fmbStartAnimation', this.fmbStartAnimation)\n window.addEventListener('fmbStopAnimation', this.fmbStopAnimation)\n window.addEventListener('fmbResetAnimation', this.fmbResetAnimation)\n\n // 모니터링에서 범례를 보여준다.\n window.addEventListener('fmbShowLegend', this.fmbShowLegendHandler)\n window.addEventListener('fmbHideLegend', this.fmbHideLegendHandler)\n\n // 모니터링에서 범례를 보여준다.\n window.addEventListener('fmbShowPopup', this.fmbShowPopupHandler)\n window.addEventListener('fmbHidePopup', this.fmbHidePopupHandler)\n\n // 모니터링에서 FloatingContainer를 보여준다.\n window.addEventListener('fmbShowFloatingContainer', this.fmbShowFloatingContainerHandler)\n window.addEventListener('fmbHideFloatingContainer', this.fmbHideFloatingContainerHandler)\n }\n\n disconnectedCallback() {\n super.disconnectedCallback()\n\n window.removeEventListener('resize', this.resizeHandler)\n\n // 모니터링에서 장비 아이디에 해당하는 object를 찾아 캔버스 가운데 위치하도록 조정한다.\n window.removeEventListener('fetchIFactsData', this.fetchIFactsDataHandler)\n\n // 모니터링에서 Movement Data를 보여준다.\n window.removeEventListener('fmbShowMovement', this.fmbShowMovementHandler)\n\n // 모니터링에서 보드 상태를 원래상태 (정사이즈)로 돌려놓는다.\n window.removeEventListener('fmbMonitoringInit', this.fmbMonitoringInitHandler)\n\n // BoardComponentInfo popup을 보여준다.\n window.removeEventListener('clickComponent', this.clickComponentHandler)\n\n // AnimatedIcon을 추가하거나 제거한다.\n window.removeEventListener('fmbStartAnimation', this.fmbStartAnimation)\n window.removeEventListener('fmbStopAnimation', this.fmbStopAnimation)\n window.removeEventListener('fmbResetAnimation', this.fmbResetAnimation)\n\n // 모니터링에서 범례를 보여준다.\n window.removeEventListener('fmbShowLegend', this.fmbShowLegendHandler)\n window.removeEventListener('fmbHideLegend', this.fmbHideLegendHandler)\n\n // 모니터링에서 범례를 보여준다.\n window.removeEventListener('fmbShowPopup', this.fmbShowPopupHandler)\n window.removeEventListener('fmbHidePopup', this.fmbHidePopupHandler)\n\n // 모니터링에서 FloatingContainer를 보여준다.\n window.removeEventListener('fmbShowFloatingContainer', this.fmbShowFloatingContainerHandler)\n window.removeEventListener('fmbHideFloatingContainer', this.fmbHideFloatingContainerHandler)\n\n this.lastComponent = null\n\n this.closeScene()\n }\n\n updated(changes: PropertyValues<this>) {\n if (changes.has('board')) {\n this.hidePopup()\n this.closeScene()\n\n if (this.board && this.board.id) {\n if (this.board.model) {\n this.initScene()\n } else {\n this.initSceneAsync()\n }\n }\n }\n\n if (changes.has('data') && this._scene && this.data) {\n this._scene.data = this.data\n }\n\n if (changes.has('values') && this._scene && this.values) {\n this._scene.values = this.values\n }\n }\n\n async initSceneAsync() {\n if (!this.board || !this.board.id) return\n\n this._scene = await this.provider!.create(this.board.id)\n this.setupScene({ id: this.board.id, scene: this._scene })\n }\n\n initScene() {\n if (!this.board || !this.board.id) {\n return\n }\n\n this._scene = create({\n model: {\n ...this.board.model\n },\n style: this.board.style,\n mode: SCENE_MODE.VIEW,\n handlers: ['mcs-event-handler', 'zoom-handler', 'shift-handler', 'waypoint-handler'],\n layers: [{ type: 'scroll-layer' }, { type: 'movement-layer', id: 'movement-layer' }],\n refProvider: this.provider!,\n dataStorage: this.board.id !== 'preview' ? new DataStorage(this.board.id) : undefined,\n dataSubscriptionProvider: isRestfulAvailable() ? undefined : new DataSubscriptionProviderImpl()\n })\n\n if (this.baseUrl) {\n this._scene.baseUrl = this.baseUrl\n }\n\n this.setupScene({ id: this.board.id, scene: this._scene })\n }\n\n closeScene() {\n if (this._scene) {\n this.unbindSceneEvents(this._scene)\n\n this._scene.target = null\n this._scene.release && this._scene.release()\n\n this._scene = null\n }\n\n // delete queued scenes\n this._forward.forEach(({ scene }) => scene.release && scene.release())\n this._forward = []\n\n this._backward.forEach(({ scene }) => scene.release && scene.release())\n this._backward = []\n }\n\n releaseScene() {\n this.closeScene()\n this.transientShowButtons()\n }\n\n setupScene({ id, scene }: { id: string; scene: any }) {\n this._scene = scene\n\n const backgroundColor = this._scene?.root.state.fillStyle\n if (typeof backgroundColor === 'string') {\n this.style.backgroundColor = backgroundColor\n } else {\n this.style.backgroundColor = 'initial'\n }\n\n /* scene의 기존 target을 보관한다. */\n this._oldtarget = this._scene!.target\n\n this._scene!.fit(this._scene!.fitMode)\n this._scene!.target = this._target\n\n if (this.data) {\n this._scene!.data = this.data\n }\n if (this.values) {\n this._scene!.values = this.values\n }\n this.currentBoardId = id\n\n this.bindSceneEvents()\n\n this.transientShowButtons()\n }\n\n async showScene(boardId: string, bindingData?: any) {\n if (!boardId) return\n\n try {\n var scene = await this.provider!.get(boardId, true)\n\n if (scene === this._scene) {\n scene.release && scene.release()\n return\n }\n\n if (this._scene) {\n /* old scene을 _backward에 보관한다. */\n this.unbindSceneEvents(this._scene)\n /* 원래의 target에 되돌린다. */\n this._scene.target = this._oldtarget\n this._backward.push({ id: this.currentBoardId!, scene: this._scene })\n }\n\n this._scene = scene\n\n this._forward.forEach(({ scene }) => scene.release && scene.release())\n\n /* forward를 비운다. */\n this._forward = []\n\n this.setupScene({ id: boardId, scene })\n\n if (bindingData) {\n scene.data = bindingData\n }\n } catch (e) {\n console.error(e)\n }\n }\n\n private resizeHandler = () => {\n this._scene && this._scene.fit()\n }\n\n bindSceneEvents() {\n this._scene!.on('run', this.onRunBoard, this)\n this._scene!.on('goto', this.onLinkGoto, this)\n this._scene!.on('link-open', this.onLinkOpen, this)\n this._scene!.on('link-move', this.onLinkMove, this)\n this._scene!.on('route-page', this.onRoutePage, this)\n this._scene!.on('start-scenario', this.onStartScenario, this)\n this._scene!.on('run-scenario', this.onRunScenario, this)\n this._scene!.on('legend-toggle', this.onLegendToggle, this)\n this._scene!.on('open-popup', this.onOpenPopup, this)\n }\n\n unbindSceneEvents(scene: any) {\n scene.off('run', this.onRunBoard, this)\n scene.off('goto', this.onLinkGoto, this)\n scene.off('link-open', this.onLinkOpen, this)\n scene.off('link-move', this.onLinkMove, this)\n scene.off('route-page', this.onRoutePage, this)\n scene.off('start-scenario', this.onStartScenario, this)\n scene.off('run-scenario', this.onRunScenario, this)\n scene.off('legend-toggle', this.onLegendToggle, this)\n scene.off('open-popup', this.onOpenPopup, this)\n }\n\n transientShowButtons(stop?: boolean) {\n var buttons = []\n !this.hideNavigation && buttons.push(this._next, this._prev)\n !this.hideFullscreen && buttons.push(this._fullscreen)\n\n if (buttons.length == 0) {\n return\n }\n\n if (!this._fade_animations) {\n this._fade_animations = buttons\n .filter(button => button)\n .map(button => {\n let animation = button.animate(\n [\n {\n opacity: 1,\n easing: 'ease-in'\n },\n { opacity: 0 }\n ],\n { delay: 1000, duration: 2000 }\n )\n\n animation.onfinish = () => {\n button.setAttribute('hidden', '')\n }\n\n return animation\n })\n }\n\n this._forward.length <= 0 ? this._next.setAttribute('hidden', '') : this._next.removeAttribute('hidden')\n this._backward.length <= 0 ? this._prev.setAttribute('hidden', '') : this._prev.removeAttribute('hidden')\n this._fullscreen && this._fullscreen.removeAttribute('hidden')\n\n this._fade_animations.forEach(animation => {\n animation.cancel()\n if (stop) return\n\n animation.play()\n })\n }\n\n /* event handlers */\n\n onTapNext() {\n var { id, scene } = this._forward.pop() || {}\n if (!scene) return\n\n if (this._scene) {\n this._scene.target = null\n /* 원래의 target에 되돌린다. */\n this._scene!.target = this._oldtarget\n this.unbindSceneEvents(this._scene)\n this._backward.push({ id: id!, scene: this._scene })\n }\n\n this.setupScene({ id: id!, scene })\n }\n\n onTapPrev() {\n var { id, scene } = this._backward.pop() || {}\n if (!scene) return\n\n if (this._scene) {\n this._scene.target = null\n /* 원래의 target에 되돌린다. */\n this._scene.target = this._oldtarget\n this.unbindSceneEvents(this._scene)\n this._forward.push({ id: id!, scene: this._scene })\n }\n\n this.setupScene({ id: id!, scene })\n }\n\n onTapFullscreen() {\n togglefullscreen(\n this,\n () => this.requestUpdate(),\n () => this.requestUpdate()\n )\n }\n\n onRunBoard() {\n this.dispatchEvent(new CustomEvent('run-board', { bubbles: true, composed: true, detail: this.board.id }))\n }\n\n onLinkGoto(targetBoardId: string, options: any, fromComponent: any) {\n const { input, output } = options || { input: '(self)' }\n const data = input && fromComponent.root.findFirst(input, fromComponent)?.data\n this.showScene(targetBoardId, data)\n }\n\n onLinkOpen(url: string, value: any, fromComponent: Component) {\n if (!url) {\n return\n }\n\n try {\n window.open(url)\n } catch (ex) {\n document.dispatchEvent(\n new CustomEvent('notify', {\n detail: {\n level: 'error',\n message: ex,\n ex\n }\n })\n )\n }\n }\n\n onLinkMove(url: string, value: any, fromComponent: Component) {\n if (!url) return\n\n location.href = url\n }\n\n onRoutePage(page: string) {\n if (!page) {\n return\n }\n\n history.pushState({}, '', page)\n window.dispatchEvent(new Event('popstate'))\n }\n\n async onStartScenario(scenario: string, value: string | number | object, component: Component) {\n try {\n await startScenario(scenario, scenario, value)\n } catch (e) {\n console.error(e)\n }\n }\n\n async onRunScenario(scenario: string, value: string | number | object, component: Component) {\n try {\n component.data = await runScenario(scenario, value)\n } catch (e) {\n console.error(e)\n }\n }\n\n onLegendToggle() {\n const legendLayer = this._scene?.findById(`legend`)\n if (!legendLayer) {\n return\n }\n\n legendLayer.hidden = !legendLayer.hidden\n }\n\n onOpenPopup(popup: string, value: any, component: Component) {\n const popupComponent = this._scene?.findById(popup)\n if (!popupComponent) {\n return\n }\n\n popupComponent.value = {\n ...component.data,\n timestamp: Date.now()\n }\n }\n\n getSceneData() {\n return this._scene?.data\n }\n\n getSceneValues() {\n return this._scene?.values\n }\n\n togglePopup(component: Component) {\n if (!this.popup /* && e.altKey */) {\n const popup = document.createElement('ox-board-component-info') as BoardComponentInfo\n\n popup.addEventListener('close', e => {\n e.stopPropagation()\n this.hidePopup()\n })\n\n this.appendChild(popup)\n this.popup = popup\n }\n\n if (this.popup) {\n this.popup.component = component\n }\n }\n\n hidePopup() {\n if (this.popup) {\n this.removeChild(this.popup)\n this.popup = null\n }\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ox-board-viewer.js","sourceRoot":"","sources":["../../src/ox-board-viewer.ts"],"names":[],"mappings":";AAAA,OAAO,0BAA0B,CAAA;AACjC,OAAO,4BAA4B,CAAA;AACnC,OAAO,4BAA4B,CAAA;AACnC,OAAO,8BAA8B,CAAA;AACrC,OAAO,q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QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yCAAU;AACT;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;2CAAY;AAEX;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;gDAA0B;AAEqB;IAAzE,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAAC;mDAAuB;AACtB;IAAzE,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAAC;mDAAuB;AASvF;IAAR,KAAK,EAAE;iDAAqB;AACpB;IAAR,KAAK,EAAE;oDAAwB;AAOd;IAAjB,KAAK,CAAC,SAAS,CAAC;4CAAsB;AACvB;IAAf,KAAK,CAAC,OAAO,CAAC;0CAAoB;AACnB;IAAf,KAAK,CAAC,OAAO,CAAC;0CAAoB;AACb;IAArB,KAAK,CAAC,aAAa,CAAC;8CAAwB;AA89Bb;IAA/B,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;uDAKd;AA7oCN,WAAW;IADvB,aAAa,CAAC,iBAAiB,CAAC;GACpB,WAAW,CAkwCvB","sourcesContent":["import '@material/web/fab/fab.js'\nimport '@material/web/icon/icon.js'\nimport './layers/movement-layer.js'\nimport './ox-board-component-info.js'\nimport './layers/mcs-mouse-event-handler.js'\n\nimport './ox-playback-controls.js'\n\nimport { css, html, LitElement, PropertyValues, nothing } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\n\nimport { PlaybackEngine } from './playback/playback-engine.js'\n\nimport { Component, create, LoadTracker, LoadingOverlay, ReferenceProvider, Scene, SCENE_MODE, ScenePopup } from '@hatiolab/things-scene'\nimport { isIOS, fullscreen, exitfullscreen, togglefullscreen } from '@operato/utils'\nimport { ScrollbarStyles } from '@operato/styles'\n\nimport { DataStorage } from './data-storage/data-storage.js'\nimport { runScenario, startScenario, DataSubscriptionProviderImpl, isRestfulAvailable } from '@fmsim/api'\n\nimport { BoardComponentInfo } from './ox-board-component-info.js'\n\n@customElement('ox-board-viewer')\nexport class BoardViewer extends LitElement {\n static styles = [\n ScrollbarStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n position: relative;\n\n width: 100%; /* 전체화면보기를 위해서 필요함. */\n overflow: hidden;\n background-color: white;\n }\n\n #target {\n flex: 1;\n\n width: 100%; /* 전체화면보기를 위해서 필요함. */\n height: 100%;\n\n outline: 0;\n }\n\n /* navigation buttons (standalone only, not inside md-fab) */\n md-icon:not([slot]) {\n z-index: 10;\n position: absolute;\n top: 45%;\n min-width: 50px;\n width: 50px;\n height: 50px;\n margin: 0;\n padding: 0;\n color: #fff;\n user-select: none;\n\n --md-icon-size: 3em;\n }\n\n md-icon[hidden] {\n display: none;\n }\n\n md-icon:not([slot]):hover {\n background-color: rgba(0, 0, 0, 0.2);\n border-radius: 50%;\n }\n\n #prev {\n left: 5px;\n }\n\n #next {\n right: 5px;\n }\n\n [fab-group] {\n position: absolute;\n bottom: 15px;\n right: 16px;\n display: flex;\n flex-direction: column-reverse;\n align-items: center;\n gap: 12px;\n z-index: 1000;\n }\n\n [fab-group] md-fab {\n transition: transform 0.2s ease, opacity 0.2s ease;\n }\n\n [fab-group] md-fab.main-fab md-icon {\n transition: transform 0.3s ease;\n }\n\n [fab-group] md-fab.main-fab[expanded] md-icon {\n transform: rotate(45deg);\n }\n\n [fab-group] md-fab.sub-fab {\n --md-fab-container-width: 40px;\n --md-fab-container-height: 40px;\n --md-icon-size: 20px;\n transform: scale(0);\n opacity: 0;\n pointer-events: none;\n }\n\n /* SVG icon 은 fab 전체 크기로 — 자체 원이 fab 표면을 대체. */\n [fab-group] md-fab.sub-fab svg[slot=\"icon\"] {\n width: 40px;\n height: 40px;\n display: block;\n }\n\n [fab-group][expanded] md-fab.sub-fab {\n transform: scale(1);\n opacity: 1;\n pointer-events: auto;\n }\n\n [fab-group] md-fab.sub-fab[disabled] {\n opacity: 0.4;\n pointer-events: none;\n }\n\n ox-playback-controls {\n transition: opacity 0.3s ease;\n }\n\n [hidden] {\n display: none;\n }\n\n ::slotted(ox-board-component-info) {\n position: absolute;\n right: 10px;\n top: 10px;\n width: 240px;\n opacity: 0.9;\n box-shadow: 2px 2px 4px gray;\n max-height: 600px;\n overflow: auto;\n z-index: 1000;\n }\n\n md-fab {\n z-index: 1000;\n --md-icon-size: 24px;\n }\n\n @media print {\n md-fab,\n md-icon {\n display: none;\n }\n }\n `\n ]\n\n @property({ type: String }) baseUrl: string = ''\n @property({ type: Object }) board: any = {}\n @property({ type: Object }) provider: ReferenceProvider | null = null\n @property({ type: Object }) data: any\n @property({ type: Object }) values: any\n /** 앱에서 미리 생성한 LoadTracker — fetch 시작 전 생성하면 네트워크 시간도 추적 */\n @property({ type: Object }) loadTracker?: LoadTracker\n\n @property({ type: Boolean, reflect: true, attribute: 'hide-fullscreen' }) hideFullscreen = false\n @property({ type: Boolean, reflect: true, attribute: 'hide-navigation' }) hideNavigation = false\n\n private _scene: any = null\n private _forward: { id: string; scene: any }[] = []\n private _backward: { id: string; scene: any }[] = []\n private _loadingOverlay?: LoadingOverlay\n\n private _oldtarget: HTMLElement | null = null\n private _fade_animations?: Array<Animation>\n @state() _fabExpanded = false\n @state() _playbackActive = false\n get _is3dMode(): boolean {\n return !!(this._scene?.root as any)?.rootModel?.is3dMode\n }\n\n public currentBoardId?: string = this.board?.id\n\n @query('#target') _target!: HTMLElement\n @query('#prev') _prev!: HTMLElement\n @query('#next') _next!: HTMLElement\n @query('[fab-group]') _fabGroup!: HTMLElement\n\n private popup: BoardComponentInfo | null = null\n private lastComponent: Component | null = null\n\n render() {\n var fabGroup = this.hideFullscreen\n ? html``\n : html`\n <div\n fab-group\n ?expanded=${this._fabExpanded}\n @mouseover=${(e: Event) => this.transientShowButtons(true)}\n @mouseout=${(e: Event) => this.transientShowButtons()}\n >\n <md-fab\n class=\"main-fab\"\n ?expanded=${this._fabExpanded}\n @click=${() => { this._fabExpanded = !this._fabExpanded }}\n title=\"menu\"\n ><md-icon slot=\"icon\">add</md-icon></md-fab>\n\n ${isIOS() ? nothing : html`<md-fab\n class=\"sub-fab\"\n @click=${() => { this._fabExpanded = false; this.onTapFullscreen() }}\n title=\"fullscreen\"\n ><md-icon slot=\"icon\">${document.fullscreenElement ? 'fullscreen_exit' : 'fullscreen'}</md-icon></md-fab>`}\n\n <md-fab\n class=\"sub-fab\"\n @click=${() => { this._fabExpanded = false; this.onTapPlayback() }}\n title=${this._playbackActive ? 'stop playback' : 'start playback'}\n >${this._playbackActive\n ? html`<svg slot=\"icon\" width=\"48\" height=\"48\" viewBox=\"0 0 100 100\" style=\"display: block;\">\n <circle cx=\"50\" cy=\"50\" r=\"50\" fill=\"#F9EBEA\" />\n <g transform=\"translate(-5, 0)\">\n <path\n d=\"M 52,22 A 28,28 0 1,1 30,40\"\n fill=\"none\"\n stroke=\"#F87171\"\n stroke-width=\"5\"\n stroke-linecap=\"round\"\n />\n <path d=\"M 52,12 L 37,24 L 55,33 Z\" fill=\"#F87171\" />\n </g>\n <rect\n x=\"36\"\n y=\"36\"\n width=\"28\"\n height=\"28\"\n rx=\"3\"\n fill=\"#F87171\"\n stroke=\"#F87171\"\n stroke-width=\"3\"\n stroke-linejoin=\"round\"\n />\n <text\n x=\"50\"\n y=\"53.5\"\n font-family=\"Verdana, sans-serif\"\n font-size=\"9\"\n font-weight=\"900\"\n fill=\"#ffffff\"\n text-anchor=\"middle\"\n >OFF</text>\n </svg>`\n : html`<svg slot=\"icon\" width=\"48\" height=\"48\" viewBox=\"0 0 100 100\" style=\"display: block;\">\n <circle cx=\"50\" cy=\"50\" r=\"50\" fill=\"#F9EBEA\" />\n <g transform=\"translate(-5, 0)\">\n <path\n d=\"M 52,22 A 28,28 0 1,1 30,40\"\n fill=\"none\"\n stroke=\"#F87171\"\n stroke-width=\"5\"\n stroke-linecap=\"round\"\n />\n <path d=\"M 52,12 L 37,24 L 55,33 Z\" fill=\"#F87171\" />\n </g>\n <path\n d=\"M 42,35 L 65,50 L 42,65 Z\"\n fill=\"#F87171\"\n stroke=\"#F87171\"\n stroke-width=\"3\"\n stroke-linejoin=\"round\"\n />\n <text\n x=\"49.5\"\n y=\"53\"\n font-family=\"Verdana, sans-serif\"\n font-size=\"9\"\n font-weight=\"900\"\n fill=\"#ffffff\"\n text-anchor=\"middle\"\n >RE:</text>\n </svg>`}</md-fab>\n\n <md-fab\n class=\"sub-fab\"\n @click=${() => { this._fabExpanded = false; this.onTapToggle3D() }}\n title=${this._is3dMode ? '2D mode' : '3D mode'}\n >${this._is3dMode\n ? html`<svg slot=\"icon\" width=\"48\" height=\"48\" viewBox=\"0 0 100 100\" style=\"display: block;\">\n <circle cx=\"50\" cy=\"50\" r=\"50\" fill=\"#F9EBEA\" />\n <g transform=\"rotate(55, 50, 50)\">\n <path\n d=\"M 72,32 A 30,30 0 0,0 38,28\"\n fill=\"none\"\n stroke=\"#F87171\"\n stroke-width=\"5\"\n stroke-linecap=\"round\"\n />\n <path d=\"M 38,20 L 22,30 L 38,40 Z\" fill=\"#F87171\" />\n </g>\n <g transform=\"rotate(235, 50, 50)\">\n <path\n d=\"M 72,32 A 30,30 0 0,0 38,28\"\n fill=\"none\"\n stroke=\"#F87171\"\n stroke-width=\"5\"\n stroke-linecap=\"round\"\n />\n <path d=\"M 38,20 L 22,30 L 38,40 Z\" fill=\"#F87171\" />\n </g>\n <text\n x=\"50\"\n y=\"57.5\"\n font-family=\"Verdana, sans-serif\"\n font-size=\"20\"\n font-weight=\"900\"\n fill=\"#F87171\"\n text-anchor=\"middle\"\n >2D</text>\n </svg>`\n : html`<svg slot=\"icon\" width=\"48\" height=\"48\" viewBox=\"0 0 100 100\" style=\"display: block;\">\n <circle cx=\"50\" cy=\"50\" r=\"50\" fill=\"#F9EBEA\" />\n <g transform=\"rotate(55, 50, 50)\">\n <path\n d=\"M 72,32 A 30,30 0 0,0 38,28\"\n fill=\"none\"\n stroke=\"#F87171\"\n stroke-width=\"5\"\n stroke-linecap=\"round\"\n />\n <path d=\"M 38,20 L 22,30 L 38,40 Z\" fill=\"#F87171\" />\n </g>\n <g transform=\"rotate(235, 50, 50)\">\n <path\n d=\"M 72,32 A 30,30 0 0,0 38,28\"\n fill=\"none\"\n stroke=\"#F87171\"\n stroke-width=\"5\"\n stroke-linecap=\"round\"\n />\n <path d=\"M 38,20 L 22,30 L 38,40 Z\" fill=\"#F87171\" />\n </g>\n <text\n x=\"50\"\n y=\"57.5\"\n font-family=\"Verdana, sans-serif\"\n font-size=\"20\"\n font-weight=\"900\"\n fill=\"#F87171\"\n text-anchor=\"middle\"\n >3D</text>\n </svg>`}</md-fab>\n </div>\n `\n\n var prev = !this.hideNavigation\n ? html`\n <md-icon\n id=\"prev\"\n @click=${(e: Event) => this.onTapPrev()}\n @mouseover=${(e: Event) => this.transientShowButtons(true)}\n @mouseout=${(e: Event) => this.transientShowButtons()}\n hidden\n >keyboard_arrow_left</md-icon\n >\n `\n : html``\n\n var next = !this.hideNavigation\n ? html`\n <md-icon\n id=\"next\"\n @click=${(e: Event) => this.onTapNext()}\n @mouseover=${(e: Event) => this.transientShowButtons(true)}\n @mouseout=${(e: Event) => this.transientShowButtons()}\n hidden\n >keyboard_arrow_right</md-icon\n >\n `\n : html``\n\n return html`\n ${prev}\n\n <div id=\"target\"></div>\n\n <slot></slot>\n ${next} ${fabGroup}\n\n ${this._playbackActive\n ? html`<ox-playback-controls\n .playbackState=${this._playbackEngine?.state === 'playing' ? 'playing' : this._playbackEngine?.state === 'paused' ? 'paused' : 'idle'}\n @playback-start=${this._onPlaybackStart}\n @playback-pause=${this._onPlaybackPause}\n @playback-resume=${this._onPlaybackResume}\n @playback-stop=${this._onPlaybackStop}\n @playback-seek=${this._onPlaybackSeek}\n @playback-seek-start=${this._onPlaybackSeekStart}\n @playback-seek-preview=${this._onPlaybackSeekPreview}\n @playback-speed=${this._onPlaybackSpeed}\n ></ox-playback-controls>`\n : nothing}\n `\n }\n\n // 모니터링에서 장비 아이디에 해당하는 object를 찾아 캔버스 가운데 위치하도록 조정한다.\n fetchIFactsDataHandler = (e: Event) => {\n const id = (e as CustomEvent).detail.value\n\n const components = this._scene?.findAll(`#${id}`)\n if (!components || components.length == 0) {\n return\n }\n\n window.dispatchEvent(new CustomEvent('clickComponent', { detail: components[0] }))\n\n this._scene?.centerTo(components[0], true /* animated */)\n }\n\n // 모니터링에서 Movement Data를 보여준다.\n fmbShowMovementHandler = (e: Event) => {\n const movement = (e as CustomEvent).detail.value\n\n const movementLayer = this._scene?.findById(`movement-layer`)\n if (!movementLayer) {\n return\n }\n\n movementLayer.data = movement\n }\n\n // 모니터링에서 보드 상태를 원래상태 (정사이즈)로 돌려놓는다.\n fmbMonitoringInitHandler = (e: Event) => {\n this._scene?.fit('ratio')\n }\n\n // 모니터링에서 범례를 보여준다.\n fmbShowLegendHandler = (e: Event) => {\n const legendLayer = this._scene?.findById(`legend`)\n if (!legendLayer) {\n return\n }\n\n legendLayer.hidden = false\n }\n\n fmbHideLegendHandler = (e: Event) => {\n const legendLayer = this._scene?.findById(`legend`)\n if (!legendLayer) {\n return\n }\n legendLayer.hidden = true\n }\n\n // 모니터링에서 팝업을 보여준다.\n fmbShowPopupHandler = (e: Event) => {\n const { id, data } = (e as CustomEvent).detail\n const popupComponent = this._scene?.findById(id)\n\n if (popupComponent && popupComponent.getState('type') == 'popup') {\n ;(popupComponent as any).openPopup(data)\n }\n }\n\n fmbHidePopupHandler = (e: Event) => {\n const { id } = (e as CustomEvent).detail\n const popupComponent = this._scene?.findById(id)\n\n if (popupComponent && popupComponent.getState('type') == 'popup') {\n ;(popupComponent as any).hidePopup()\n }\n }\n\n // 모니터링에서 범례를 보여준다.\n fmbShowFloatingContainerHandler = (e: Event) => {\n const { id } = (e as CustomEvent).detail\n const floatingContainer = this._scene?.findById(id) as Component\n\n if (floatingContainer && floatingContainer.getState('type') == 'FloatingContainer') {\n floatingContainer.hidden = false\n }\n }\n\n fmbHideFloatingContainerHandler = (e: Event) => {\n const { id } = (e as CustomEvent).detail\n const floatingContainer = this._scene?.findById(id) as Component\n\n if (floatingContainer && floatingContainer.getState('type') == 'FloatingContainer') {\n floatingContainer.hidden = true\n }\n }\n\n // BoardComponentInfo popup을 보여준다.\n clickComponentHandler = (e: Event) => {\n const component = (e as CustomEvent).detail\n const { type } = component.state\n\n if (type == 'model-layer') {\n this.lastComponent?.trigger('deco-border-off')\n // this.lastComponent?.trigger('deco-arrow-reset')\n this.hidePopup()\n return\n }\n\n if ('isLVComponent' in component) {\n this.lastComponent?.trigger('deco-border-off')\n // this.lastComponent?.trigger('deco-arrow-reset')\n this.lastComponent = component\n\n component.trigger('deco-border', { distance: 8, lineWidth: 4, color: '#f007' })\n // component.trigger('deco-arrow', { color: 'red', animation: true, size: 20 })\n\n this.togglePopup(component)\n }\n }\n\n fmbStartAnimation = (e: Event) => {\n const { target, animation, decorator, border, arrow } = (e as CustomEvent).detail || {}\n const { id, type } = target || {}\n\n if (id) {\n this._scene\n ?.findAllById(id)\n .filter((component: any) => !type || component.getState('type') == type)\n .forEach((component: any) => {\n if (animation) {\n component.resetAnimation()\n component.setState('animation', {\n oncreate: animation\n })\n component.started = true\n }\n\n if (decorator) {\n component.trigger('deco-icon-off')\n component.trigger('deco-icon', decorator)\n }\n\n if (border) {\n component.trigger('deco-border-off')\n component.trigger('deco-border', border)\n }\n\n if (arrow) {\n component.trigger('deco-arrow-off')\n component.trigger('deco-arrow', arrow)\n }\n })\n }\n }\n\n fmbStopAnimation = (e: Event) => {\n const { target } = (e as CustomEvent).detail || {}\n const { id, type } = target || {}\n\n if (id) {\n this._scene\n ?.findAllById(id)\n .filter((component: any) => !type || component.getState('type') == type)\n .forEach((component: any) => {\n component.trigger('deco-off')\n component.resetAnimation()\n component.setState('animation', {\n oncreate: null\n })\n })\n }\n }\n\n fmbResetAnimation = () => {\n this._scene?.root.trigger('deco-reset')\n }\n\n private _pointerMoveHandler = () => this.transientShowButtons()\n\n /**\n * playback 모드는 전체화면 모드와 한 몸 — 어떤 경로로든 전체화면이 해제되면\n * playback 도 함께 종료. (단독 전체화면 토글은 기존처럼 동작하도록 `_playbackActive` 가드.)\n */\n private _fullscreenChangeHandler = () => {\n if (!document.fullscreenElement && this._playbackActive) {\n this._onPlaybackStop()\n }\n }\n\n /** connect/disconnect 시 일괄 등록/해제할 window 이벤트 목록 (모니터링 연동) */\n private get _monitoringEvents(): Array<[string, EventListenerOrEventListenerObject]> {\n return [\n ['fetchIFactsData', this.fetchIFactsDataHandler], // 장비 아이디 object를 캔버스 가운데로\n ['fmbShowMovement', this.fmbShowMovementHandler], // Movement Data 표시\n ['fmbMonitoringInit', this.fmbMonitoringInitHandler], // 보드 상태 정사이즈 복원\n ['clickComponent', this.clickComponentHandler], // BoardComponentInfo popup\n ['fmbStartAnimation', this.fmbStartAnimation], // AnimatedIcon 추가/제거\n ['fmbStopAnimation', this.fmbStopAnimation],\n ['fmbResetAnimation', this.fmbResetAnimation],\n ['fmbShowLegend', this.fmbShowLegendHandler], // 범례 표시\n ['fmbHideLegend', this.fmbHideLegendHandler],\n ['fmbShowPopup', this.fmbShowPopupHandler], // 팝업 표시\n ['fmbHidePopup', this.fmbHidePopupHandler],\n ['fmbShowFloatingContainer', this.fmbShowFloatingContainerHandler], // FloatingContainer\n ['fmbHideFloatingContainer', this.fmbHideFloatingContainerHandler]\n ]\n }\n\n connectedCallback() {\n super.connectedCallback()\n\n window.addEventListener('resize', this.resizeHandler)\n // 3D 모드에서도 마우스 움직임 감지 (document 레벨, capture phase)\n document.addEventListener('pointermove', this._pointerMoveHandler, true)\n document.addEventListener('fullscreenchange', this._fullscreenChangeHandler)\n document.addEventListener('webkitfullscreenchange', this._fullscreenChangeHandler)\n\n this.renderRoot.addEventListener('close-scene', e => {\n e.preventDefault()\n this.onTapPrev()\n }, false)\n\n for (const [type, handler] of this._monitoringEvents) {\n window.addEventListener(type, handler)\n }\n }\n\n disconnectedCallback() {\n super.disconnectedCallback()\n\n window.removeEventListener('resize', this.resizeHandler)\n document.removeEventListener('pointermove', this._pointerMoveHandler, true)\n document.removeEventListener('fullscreenchange', this._fullscreenChangeHandler)\n document.removeEventListener('webkitfullscreenchange', this._fullscreenChangeHandler)\n\n for (const [type, handler] of this._monitoringEvents) {\n window.removeEventListener(type, handler)\n }\n\n this.lastComponent = null\n\n // 플레이백이 활성 상태면 명시적 stop (provider resume 포함)\n if (this._playbackActive) {\n this._playbackEngine?.stop()\n this._playbackEngine?.detachScene()\n this._dataSubscriptionProvider?.resume()\n this._playbackActive = false\n }\n if (this._playbackEngine) {\n this._playbackEngine.dispose()\n this._playbackEngine = undefined\n }\n\n this.closeScene()\n }\n\n updated(changes: PropertyValues<this>) {\n // loadTracker가 외부에서 전달되면 즉시 overlay 연결 (fetch 중에도 표시)\n if (changes.has('loadTracker') && this.loadTracker) {\n this._ensureOverlay(this.loadTracker)\n }\n\n if (changes.has('board')) {\n // tracker: 외부에서 안 왔으면 여기서 생성\n if (!this.loadTracker) {\n this.loadTracker = new LoadTracker()\n this._ensureOverlay(this.loadTracker)\n }\n\n this.hidePopup()\n this.closeScene()\n\n if (this.board && this.board.id) {\n if (this.board.model) {\n this.initScene()\n } else {\n this.initSceneAsync()\n }\n }\n }\n\n if (changes.has('data') && this._scene && this.data) {\n this._scene.data = this.data\n }\n\n if (changes.has('values') && this._scene && this.values) {\n this._scene.values = this.values\n }\n }\n\n async initSceneAsync() {\n if (!this.board || !this.board.id || !this.provider) return\n\n try {\n this._scene = await this.provider.create(this.board.id)\n this.setupScene({ id: this.board.id, scene: this._scene })\n } catch (e) {\n console.error('Failed to load scene:', this.board.id, e)\n }\n }\n\n initScene() {\n if (!this.board || !this.board.id || !this.board.model) {\n return\n }\n\n this._scene = create({\n model: JSON.parse(JSON.stringify(this.board.model)),\n style: this.board.style,\n mode: SCENE_MODE.VIEW,\n handlers: ['mcs-event-handler', 'zoom-handler', 'shift-handler', 'waypoint-handler'],\n layers: [{ type: 'scroll-layer' }, { type: 'movement-layer', id: 'movement-layer' }],\n refProvider: this.provider!,\n dataStorage: this.board.id !== 'preview' ? new DataStorage(this.board.id) : undefined,\n dataSubscriptionProvider: this._dataSubscriptionProvider,\n loading: this.loadTracker ? { tracker: this.loadTracker } : undefined\n })\n\n if (this.baseUrl) {\n this._scene.baseUrl = this.baseUrl\n }\n\n this.setupScene({ id: this.board.id, scene: this._scene })\n }\n\n private _ensureOverlay(tracker: LoadTracker): void {\n if (!this._loadingOverlay) {\n this._loadingOverlay = new LoadingOverlay()\n }\n this._loadingOverlay.attach(this.renderRoot as HTMLElement, tracker)\n }\n\n closeScene() {\n if (this._scene) {\n this.unbindSceneEvents(this._scene)\n\n this._scene.target = null\n this._scene.release && this._scene.release()\n\n this._scene = null\n }\n\n // delete queued scenes\n this._forward.forEach(({ scene }) => scene.release && scene.release())\n this._forward = []\n\n this._backward.forEach(({ scene }) => scene.release && scene.release())\n this._backward = []\n }\n\n releaseScene() {\n this.closeScene()\n this.transientShowButtons()\n }\n\n setupScene({ id, scene }: { id: string; scene: any }) {\n // 플레이백 리셋\n if (this._playbackActive) {\n this._onPlaybackStop()\n }\n\n this._scene = scene\n\n const backgroundColor = this._scene?.root.state.fillStyle\n if (typeof backgroundColor === 'string') {\n this.style.backgroundColor = backgroundColor\n } else {\n this.style.backgroundColor = 'initial'\n }\n\n /* scene의 기존 target을 보관한다. */\n this._oldtarget = this._scene!.target\n\n this._scene!.fit(this._scene!.fitMode)\n this._scene!.target = this._target\n\n if (this.data) {\n this._scene!.data = this.data\n }\n if (this.values) {\n this._scene!.values = this.values\n }\n this.currentBoardId = id\n\n this.bindSceneEvents()\n\n this.transientShowButtons()\n }\n\n async showScene(boardId: string, bindingData?: any) {\n if (!boardId || !this.provider) return\n\n try {\n var scene = await this.provider.get(boardId, true)\n\n if (scene === this._scene) {\n scene.release && scene.release()\n return\n }\n\n if (this._scene) {\n /* old scene을 _backward에 보관한다. */\n this.unbindSceneEvents(this._scene)\n /* 원래의 target에 되돌린다. */\n this._scene.target = this._oldtarget\n this._backward.push({ id: this.currentBoardId!, scene: this._scene })\n }\n\n this._scene = scene\n\n this._forward.forEach(({ scene }) => scene.release && scene.release())\n\n /* forward를 비운다. */\n this._forward = []\n\n this.setupScene({ id: boardId, scene })\n\n if (bindingData) {\n scene.data = bindingData\n }\n } catch (e) {\n console.error(e)\n }\n }\n\n private resizeHandler = () => {\n this._scene && this._scene.fit()\n }\n\n bindSceneEvents() {\n this._scene!.on('run', this.onRunBoard, this)\n this._scene!.on('goto', this.onLinkGoto, this)\n this._scene!.on('link-open', this.onLinkOpen, this)\n this._scene!.on('link-move', this.onLinkMove, this)\n this._scene!.on('route-page', this.onRoutePage, this)\n this._scene!.on('start-scenario', this.onStartScenario, this)\n this._scene!.on('run-scenario', this.onRunScenario, this)\n this._scene!.on('legend-toggle', this.onLegendToggle, this)\n this._scene!.on('open-popup', this.onOpenPopup, this)\n }\n\n unbindSceneEvents(scene: any) {\n scene.off('run', this.onRunBoard, this)\n scene.off('goto', this.onLinkGoto, this)\n scene.off('link-open', this.onLinkOpen, this)\n scene.off('link-move', this.onLinkMove, this)\n scene.off('route-page', this.onRoutePage, this)\n scene.off('start-scenario', this.onStartScenario, this)\n scene.off('run-scenario', this.onRunScenario, this)\n scene.off('legend-toggle', this.onLegendToggle, this)\n scene.off('open-popup', this.onOpenPopup, this)\n }\n\n transientShowButtons(stop?: boolean) {\n var buttons = []\n !this.hideNavigation && buttons.push(this._next, this._prev)\n !this.hideFullscreen && buttons.push(this._fabGroup)\n\n if (buttons.length == 0) {\n return\n }\n\n if (!this._fade_animations) {\n this._fade_animations = buttons\n .filter(button => button)\n .map(button => {\n let animation = button.animate(\n [\n {\n opacity: 1,\n easing: 'ease-in'\n },\n { opacity: 0 }\n ],\n { delay: 1000, duration: 2000 }\n )\n\n animation.onfinish = () => {\n button.setAttribute('hidden', '')\n }\n\n return animation\n })\n }\n\n this._forward.length <= 0 ? this._next.setAttribute('hidden', '') : this._next.removeAttribute('hidden')\n this._backward.length <= 0 ? this._prev.setAttribute('hidden', '') : this._prev.removeAttribute('hidden')\n this._fabGroup && this._fabGroup.removeAttribute('hidden')\n\n this._fade_animations.forEach(animation => {\n animation.cancel()\n if (stop) return\n\n animation.play()\n })\n }\n\n /* event handlers */\n\n onTapNext() {\n var { id, scene } = this._forward.pop() || {}\n if (!scene) return\n\n if (this._scene) {\n this._scene.target = null\n /* 원래의 target에 되돌린다. */\n this._scene!.target = this._oldtarget\n this.unbindSceneEvents(this._scene)\n this._backward.push({ id: id!, scene: this._scene })\n }\n\n this.setupScene({ id: id!, scene })\n }\n\n onTapPrev() {\n var { id, scene } = this._backward.pop() || {}\n if (!scene) return\n\n if (this._scene) {\n this._scene.target = null\n /* 원래의 target에 되돌린다. */\n this._scene.target = this._oldtarget\n this.unbindSceneEvents(this._scene)\n this._forward.push({ id: id!, scene: this._scene })\n }\n\n this.setupScene({ id: id!, scene })\n }\n\n onTapFullscreen() {\n togglefullscreen(\n this,\n () => this.requestUpdate(),\n () => this.requestUpdate()\n )\n }\n\n onTapToggle3D() {\n const modelLayer = (this._scene?.root as any)?.rootModel\n if (!modelLayer?.toggleThreeD) return\n\n const entering3D = !modelLayer.is3dMode\n modelLayer.toggleThreeD()\n this.requestUpdate()\n\n // fmsim: 3D 진입 시 자동 회전\n if (entering3D && modelLayer._threeCapability?.isInitialized) {\n modelLayer._threeCapability.controlsManager.reset()\n modelLayer._threeCapability.controlsManager.setAutoRotate(true)\n }\n }\n\n // ── Data Subscription ──\n\n private _dataSubscriptionProvider = isRestfulAvailable() ? undefined : new DataSubscriptionProviderImpl()\n\n // ── Playback ──\n\n private _playbackEngine?: PlaybackEngine\n\n onTapPlayback() {\n if (this._playbackActive) {\n this._onPlaybackStop()\n } else {\n // 플레이백 시작 시 팝업 닫기\n this.hidePopup()\n\n // 1) 라이브 데이터 구독 실제 종료\n this._dataSubscriptionProvider?.pause()\n this._unsubscribeSceneData()\n\n // 2) 라이브 데이터 초기화 (깨끗한 상태에서 playback 시작)\n this._resetSceneData()\n\n this._playbackActive = true\n if (!this._playbackEngine) {\n this._playbackEngine = new PlaybackEngine()\n this._playbackEngine.on('frame', ({ time }) => {\n const controls = this.renderRoot.querySelector('ox-playback-controls') as any\n if (controls) controls.currentTime = time\n })\n this._playbackEngine.on('state-change', (state) => {\n if (state === 'stopped') {\n const controls = this.renderRoot.querySelector('ox-playback-controls') as any\n if (controls) controls.playbackState = 'stopped'\n }\n this.requestUpdate()\n })\n this._playbackEngine.on('buffer-update', ({ bufferedRanges }) => {\n const controls = this.renderRoot.querySelector('ox-playback-controls') as any\n if (controls) controls.bufferedRanges = bufferedRanges\n })\n if (this._fetchPlaybackData) {\n this._playbackEngine.setFetchFunction(this._fetchPlaybackData)\n }\n }\n if (this._scene) {\n this._playbackEngine.attachScene(this._scene)\n }\n\n this.dispatchEvent(\n new CustomEvent('playback-toggle', {\n bubbles: true,\n composed: true,\n detail: { active: true }\n })\n )\n\n // playback 은 전체화면에서만 동작 — 이미 전체화면이면 그대로 유지\n if (!document.fullscreenElement && !isIOS()) {\n fullscreen(this, () => this.requestUpdate(), () => this.requestUpdate())\n }\n }\n }\n\n private async _onPlaybackStart(e: CustomEvent) {\n const { fromTime, toTime, speed } = e.detail\n if (!this._playbackEngine) return\n\n // toTime is the user-selected window END (= controls' _appliedTo).\n // The previous hardcoded `fromTime + 1h` ignored the controls'\n // range selection, so 10m / 30m / Range modes silently played past\n // the requested window. Falling back to `+1h` only if toTime was\n // omitted (legacy callers).\n const endTime = toTime instanceof Date ? toTime : new Date(fromTime.getTime() + 3600000)\n\n if (this._scene) this._scene.playbackMode = true\n\n try {\n await this._playbackEngine.startChunked(fromTime, endTime, speed)\n } catch (ex) {\n console.error('[Playback] load failed:', ex)\n }\n }\n\n private _onPlaybackPause() {\n this._playbackEngine?.pause()\n }\n\n private _onPlaybackResume() {\n this._playbackEngine?.resume()\n }\n\n private async _onPlaybackStop() {\n const scene = this._scene // 비동기 구간 scene 교체 감지용 캡처\n\n // 1) 즉시: 엔진 정지 + 애니메이션 억제 ON (in-flight 애니메이션 즉시 종료)\n this._playbackEngine?.detachScene()\n this._playbackEngine?.stop()\n this._playbackActive = false\n if (scene) {\n scene.suppressAnimations = true\n scene.playbackMode = false\n }\n\n // UI 신호 + fullscreen 해제\n this.dispatchEvent(\n new CustomEvent('playback-toggle', {\n bubbles: true,\n composed: true,\n detail: { active: false }\n })\n )\n if (document.fullscreenElement) {\n exitfullscreen()\n }\n\n // 2) 1초 후: 보드 리셋 + live 구독 재개\n await new Promise(resolve => setTimeout(resolve, 1000))\n\n if (this._playbackActive || this._scene !== scene) return\n if (!scene) return\n\n this._resetSceneData()\n this._resubscribeSceneData()\n this._dataSubscriptionProvider?.resume()\n\n // 3) 2초 후 (추가 1초): 억제 해제 — 첫 live batch 가 instant 배치된 뒤 정상 애니메이션 복원\n await new Promise(resolve => setTimeout(resolve, 1000))\n\n if (this._scene === scene) {\n scene.suppressAnimations = false\n }\n }\n\n /**\n * 플레이백 시작 시: RESTful data-subscription 컴포넌트의 WebSocket 을 실제 disconnect.\n * GraphQL 경로는 _dataSubscriptionProvider.pause() 에서 일괄 처리.\n */\n private _unsubscribeSceneData() {\n const root = this._scene?.root\n if (!root || typeof root.traverse !== 'function') return\n\n root.traverse((c: any) => {\n if (!c || c === root) return\n\n // RESTful data-subscription 컴포넌트 — 자체 WebSocket disconnect\n if (c.subscription) {\n try { c.subscription.unsubscribe() } catch {}\n c.subscription = null\n }\n if (c.client) {\n try { c.client.unsubscribeAll(); c.client.close(true) } catch {}\n c.client = null\n }\n })\n }\n\n /**\n * 플레이백 종료 시: RESTful data-subscription 컴포넌트의 WebSocket 을 재연결.\n * GraphQL 경로는 _dataSubscriptionProvider.resume() 에서 일괄 처리.\n */\n private _resubscribeSceneData() {\n const root = this._scene?.root\n if (!root || typeof root.traverse !== 'function') return\n\n root.traverse((c: any) => {\n if (!c || c === root) return\n\n // RESTful data-subscription 컴포넌트 — WebSocket 재연결\n if (typeof c.requestData === 'function' && !c.client) {\n c.requestData()\n }\n })\n }\n\n private _resetSceneData() {\n const root = this._scene?.root\n if (!root || typeof root.traverse !== 'function') return\n\n root.traverse((c: any) => {\n if (!c || c === root) return\n // null 대신 {} 로 리셋 — typeof null === 'object' 함정 회피 + destructuring 안전 +\n // statusColor 등 data?.X 형태 getter 가 자연스럽게 default 로 폴백\n try { if ('data' in c) c.data = {} } catch {}\n // 차량 등의 위치 캐시 초기화 — 없으면 이전 waypoint 경로로 스냅백되는 잔상 발생\n if ('lastWaypoint' in c) c.lastWaypoint = undefined\n })\n\n // vehicle 의 waypoint 이동 애니메이션 전체 중단\n // (Animation.stepAnimation 의 suppress 체크만으로는 WaypointHandler 의 animatorMap 이\n // 완전히 비워지지 않을 수 있어 명시적 reset)\n if (root.waypointHandler?.reset) root.waypointHandler.reset()\n\n // 모든 decorator 제거 — bouncing-arrow/border-highlighting 같은 SVG 애니메이션 decorator 는\n // decorator-registry 가 붙잡고 있어 data=null 만으로는 제거되지 않음. 명시적 reset 필요.\n try { root.trigger('deco-reset') } catch {}\n\n if (root.carrierManager?.dispose) root.carrierManager.dispose()\n if (root.transitionEffect?.dispose) root.transitionEffect.dispose()\n }\n\n private _onPlaybackSeek(e: CustomEvent) {\n this._playbackEngine?.seekTo(e.detail.toTime)\n }\n\n /**\n * 드래그 시작 신호 — 엔진의 재생 타이머 정지해서 스크러빙 동안\n * scene 이 엔진 시간으로 독립 갱신되지 않도록 함. _state 는 유지되므로\n * 드래그 종료 시 seekTo 가 원래 재생/일시정지 상태로 복원.\n */\n private _onPlaybackSeekStart() {\n this._playbackEngine?.pauseForSeek()\n }\n\n /**\n * 드래그 중 디바운스된 seek preview. 해당 시간의 snapshot 만 scene 에 적용.\n * 보드 리셋 없음, 애니메이션 억제.\n */\n private _onPlaybackSeekPreview(e: CustomEvent) {\n this._playbackEngine?.seekPreview(e.detail.toTime)\n }\n\n private _onPlaybackSpeed(e: CustomEvent) {\n this._playbackEngine?.setSpeed(e.detail.speed)\n }\n\n /**\n * 페이지에서 주입하는 playback 데이터 fetch 함수.\n * 2-arg 호출은 청크 프리페치, 4-arg 호출은 preview snapshot (count=1).\n */\n @property({ attribute: false }) _fetchPlaybackData?: (\n startTime: string,\n endTime?: string,\n includeSnapshot?: boolean,\n count?: number\n ) => Promise<any>\n\n onRunBoard() {\n this.dispatchEvent(new CustomEvent('run-board', { bubbles: true, composed: true, detail: this.board.id }))\n }\n\n onLinkGoto(targetBoardId: string, options: any, fromComponent: any) {\n const { input, output } = options || { input: '(self)' }\n const data = input && fromComponent.root.findFirst(input, fromComponent)?.data\n this.showScene(targetBoardId, data)\n }\n\n onLinkOpen(url: string, value: any, fromComponent: Component) {\n if (!url) {\n return\n }\n\n try {\n window.open(url)\n } catch (ex) {\n document.dispatchEvent(\n new CustomEvent('notify', {\n detail: {\n level: 'error',\n message: ex,\n ex\n }\n })\n )\n }\n }\n\n onLinkMove(url: string, value: any, fromComponent: Component) {\n if (!url) return\n\n location.href = url\n }\n\n onRoutePage(page: string) {\n if (!page) {\n return\n }\n\n history.pushState({}, '', page)\n window.dispatchEvent(new Event('popstate'))\n }\n\n async onStartScenario(scenario: string, value: string | number | object, component: Component) {\n try {\n await startScenario(scenario, scenario, value)\n } catch (e) {\n console.error(e)\n }\n }\n\n async onRunScenario(scenario: string, value: string | number | object, component: Component) {\n try {\n component.data = await runScenario(scenario, value)\n } catch (e) {\n console.error(e)\n }\n }\n\n onLegendToggle() {\n const legendLayer = this._scene?.findById(`legend`)\n if (!legendLayer) {\n return\n }\n\n legendLayer.hidden = !legendLayer.hidden\n }\n\n onOpenPopup(popup: string, value: any, component: Component) {\n const popupComponent = this._scene?.findById(popup)\n if (!popupComponent) {\n return\n }\n\n popupComponent.value = {\n ...component.data,\n timestamp: Date.now()\n }\n }\n\n getSceneData() {\n return this._scene?.data\n }\n\n getSceneValues() {\n return this._scene?.values\n }\n\n togglePopup(component: Component) {\n if (!this.popup /* && e.altKey */) {\n const popup = document.createElement('ox-board-component-info') as BoardComponentInfo\n\n popup.addEventListener('close', e => {\n e.stopPropagation()\n this.hidePopup()\n })\n\n this.appendChild(popup)\n this.popup = popup\n }\n\n if (this.popup) {\n this.popup.component = component\n this.popup.playbackMode = this._playbackActive\n }\n }\n\n hidePopup() {\n if (this.popup) {\n this.removeChild(this.popup)\n this.popup = null\n }\n }\n}\n"]}
|
|
@@ -8,7 +8,10 @@ export declare class BoardSelector extends LitElement {
|
|
|
8
8
|
static get styles(): import("lit").CSSResult[];
|
|
9
9
|
value?: string;
|
|
10
10
|
properties?: any;
|
|
11
|
+
private boardName?;
|
|
11
12
|
private popup;
|
|
13
|
+
firstUpdated(): Promise<void>;
|
|
14
|
+
private _resolveName;
|
|
12
15
|
render(): import("lit-html").TemplateResult<1>;
|
|
13
16
|
_onInputChanged(e: Event): void;
|
|
14
17
|
openSelector(): void;
|
|
@@ -5,9 +5,10 @@ import { __decorate } from "tslib";
|
|
|
5
5
|
import '@material/web/icon/icon.js';
|
|
6
6
|
import './selector/ox-board-selector';
|
|
7
7
|
import { css, html, LitElement } from 'lit';
|
|
8
|
-
import { customElement, property } from 'lit/decorators.js';
|
|
8
|
+
import { customElement, property, state } from 'lit/decorators.js';
|
|
9
9
|
import { i18next } from '@operato/i18n';
|
|
10
10
|
import { openPopup } from '@operato/layout';
|
|
11
|
+
import { fetchBoardNameById } from '@fmsim/api';
|
|
11
12
|
let BoardSelector = class BoardSelector extends LitElement {
|
|
12
13
|
static get styles() {
|
|
13
14
|
return [
|
|
@@ -17,11 +18,26 @@ let BoardSelector = class BoardSelector extends LitElement {
|
|
|
17
18
|
display: inline-block;
|
|
18
19
|
}
|
|
19
20
|
|
|
20
|
-
input[type='
|
|
21
|
+
input[type='hidden'] {
|
|
22
|
+
display: none;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.readonly-display {
|
|
21
26
|
box-sizing: border-box;
|
|
22
27
|
width: 100%;
|
|
23
28
|
height: 100%;
|
|
24
29
|
border: 1px solid rgba(0, 0, 0, 0.2);
|
|
30
|
+
padding: 4px;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
#display {
|
|
34
|
+
display: flex;
|
|
35
|
+
white-space: nowrap;
|
|
36
|
+
overflow: hidden;
|
|
37
|
+
text-overflow: ellipsis;
|
|
38
|
+
height: 24px;
|
|
39
|
+
align-items: center;
|
|
40
|
+
font-size: small;
|
|
25
41
|
}
|
|
26
42
|
|
|
27
43
|
md-icon {
|
|
@@ -32,9 +48,23 @@ let BoardSelector = class BoardSelector extends LitElement {
|
|
|
32
48
|
`
|
|
33
49
|
];
|
|
34
50
|
}
|
|
51
|
+
async firstUpdated() {
|
|
52
|
+
if (this.value) {
|
|
53
|
+
await this._resolveName(this.value);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
async _resolveName(id) {
|
|
57
|
+
try {
|
|
58
|
+
this.boardName = await fetchBoardNameById(id);
|
|
59
|
+
}
|
|
60
|
+
catch (_a) {
|
|
61
|
+
this.boardName = id;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
35
64
|
render() {
|
|
36
65
|
return html `
|
|
37
|
-
<input id="text" type="
|
|
66
|
+
<input id="text" type="hidden" .value=${this.value || ''} @change=${(e) => this._onInputChanged(e)} />
|
|
67
|
+
<div id="display" class="readonly-display">${this.boardName || this.value || ''}</div>
|
|
38
68
|
|
|
39
69
|
<md-icon @click=${(e) => this.openSelector()}>dashboard</md-icon>
|
|
40
70
|
`;
|
|
@@ -48,12 +78,7 @@ let BoardSelector = class BoardSelector extends LitElement {
|
|
|
48
78
|
if (this.popup) {
|
|
49
79
|
delete this.popup;
|
|
50
80
|
}
|
|
51
|
-
|
|
52
|
-
* 기존 설정된 보드가 선택된 상태가 되게 하기 위해서는 selector에 value를 전달해줄 필요가 있음.
|
|
53
|
-
* 주의. value는 object일 수도 있고, string일 수도 있다.
|
|
54
|
-
* string인 경우에는 해당 보드의 id로 해석한다.
|
|
55
|
-
*/
|
|
56
|
-
var value = this.value || {};
|
|
81
|
+
var value = this.value || '';
|
|
57
82
|
var template = html `
|
|
58
83
|
<ox-board-selector
|
|
59
84
|
.creatable=${true}
|
|
@@ -61,6 +86,7 @@ let BoardSelector = class BoardSelector extends LitElement {
|
|
|
61
86
|
@board-selected=${async (e) => {
|
|
62
87
|
var board = e.detail.board;
|
|
63
88
|
this.value = board.id;
|
|
89
|
+
this.boardName = board.name;
|
|
64
90
|
this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }));
|
|
65
91
|
this.popup && this.popup.close();
|
|
66
92
|
}}
|
|
@@ -79,6 +105,9 @@ __decorate([
|
|
|
79
105
|
__decorate([
|
|
80
106
|
property({ type: Object })
|
|
81
107
|
], BoardSelector.prototype, "properties", void 0);
|
|
108
|
+
__decorate([
|
|
109
|
+
state()
|
|
110
|
+
], BoardSelector.prototype, "boardName", void 0);
|
|
82
111
|
BoardSelector = __decorate([
|
|
83
112
|
customElement('ox-editor-board-selector')
|
|
84
113
|
], BoardSelector);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ox-editor-board-selector.js","sourceRoot":"","sources":["../../src/ox-editor-board-selector.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,OAAO,4BAA4B,CAAA;AACnC,OAAO,8BAA8B,CAAA;AAErC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"ox-editor-board-selector.js","sourceRoot":"","sources":["../../src/ox-editor-board-selector.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,OAAO,4BAA4B,CAAA;AACnC,OAAO,8BAA8B,CAAA;AAErC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ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ox-board-selector'\n\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\n\nimport { i18next } from '@operato/i18n'\nimport { openPopup } from '@operato/layout'\nimport { fetchBoardNameById } from '@fmsim/api'\n\n@customElement('ox-editor-board-selector')\nexport class BoardSelector extends LitElement {\n static get styles() {\n return [\n css`\n :host {\n position: relative;\n display: inline-block;\n }\n\n input[type='hidden'] {\n display: none;\n }\n\n .readonly-display {\n box-sizing: border-box;\n width: 100%;\n height: 100%;\n border: 1px solid rgba(0, 0, 0, 0.2);\n padding: 4px;\n }\n\n #display {\n display: flex;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n height: 24px;\n align-items: center;\n font-size: small;\n }\n\n md-icon {\n position: absolute;\n top: 0;\n right: 0;\n }\n `\n ]\n }\n\n @property({ type: String }) value?: string\n @property({ type: Object }) properties?: any\n\n @state() private boardName?: string\n\n private popup: any\n\n async firstUpdated() {\n if (this.value) {\n await this._resolveName(this.value)\n }\n }\n\n private async _resolveName(id: string) {\n try {\n this.boardName = await fetchBoardNameById(id)\n } catch {\n this.boardName = id\n }\n }\n\n render() {\n return html`\n <input id=\"text\" type=\"hidden\" .value=${this.value || ''} @change=${(e: Event) => this._onInputChanged(e)} />\n <div id=\"display\" class=\"readonly-display\">${this.boardName || this.value || ''}</div>\n\n <md-icon @click=${(e: MouseEvent) => this.openSelector()}>dashboard</md-icon>\n `\n }\n\n _onInputChanged(e: Event) {\n this.value = (e.target as any)?.value\n this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }))\n }\n\n openSelector() {\n if (this.popup) {\n delete this.popup\n }\n\n var value = this.value || ''\n\n var template = html`\n <ox-board-selector\n .creatable=${true}\n .value=${value}\n @board-selected=${async (e: CustomEvent) => {\n var board = e.detail.board\n this.value = board.id\n this.boardName = board.name\n\n this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }))\n\n this.popup && this.popup.close()\n }}\n ></ox-board-selector>\n `\n\n this.popup = openPopup(template, {\n backdrop: true,\n size: 'large',\n title: i18next.t('title.select board')\n })\n }\n}\n"]}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import '@material/web/icon/icon.js';
|
|
2
|
+
import '@material/web/iconbutton/icon-button.js';
|
|
3
|
+
import { LitElement } from 'lit';
|
|
4
|
+
type PlaybackState = 'idle' | 'playing' | 'paused' | 'stopped';
|
|
5
|
+
/**
|
|
6
|
+
* 플레이백 컨트롤 오버레이 바 (2행 구조)
|
|
7
|
+
*
|
|
8
|
+
* 1행 (config): Range 선택 (10m / 30m / 1H / 2H / Range) + ←/→ shift
|
|
9
|
+
* + FROM/TO datetime 입력 (date 캘린더 + time 키인) + Apply 버튼
|
|
10
|
+
* + 배속 (×1 ×2 ×4)
|
|
11
|
+
*
|
|
12
|
+
* - Fixed presets: TO 가 anchor (←/→ 로 shift), FROM = TO − range.
|
|
13
|
+
* 입력 disabled. 초기 TO = 현재시간.
|
|
14
|
+
* - Range mode: 양쪽 직접 입력. 2H cap, 10m min, future clamp,
|
|
15
|
+
* 마지막 편집한 쪽이 anchor.
|
|
16
|
+
* - 상단 변경은 PENDING tier 만 갱신 — Apply 누르기 전에는 하단
|
|
17
|
+
* 슬라이더/엔진에 영향 없음.
|
|
18
|
+
*
|
|
19
|
+
* 2행 (control): play / pause / 시크바 (적용된 range 만큼 span) /
|
|
20
|
+
* 현재 재생 시각 / 닫기.
|
|
21
|
+
*
|
|
22
|
+
* @fires playback-start - 플레이백 시작 요청 { fromTime, toTime, speed }
|
|
23
|
+
* toTime 은 window END — 엔진이 chunked fetch 의 상한으로 사용.
|
|
24
|
+
* @fires playback-pause - 일시정지 요청
|
|
25
|
+
* @fires playback-resume - 재개 요청
|
|
26
|
+
* @fires playback-stop - 중지 요청
|
|
27
|
+
* @fires playback-seek - 드래그 릴리즈 시 시크 요청 { toTime }
|
|
28
|
+
* @fires playback-seek-start - 드래그 첫 input 시 즉시 발행 (엔진 타이머·애니메이션 정지 신호, detail 없음)
|
|
29
|
+
* @fires playback-seek-preview - 드래그 중 throttle (leading+trailing, 200ms) 된 스크러빙 요청 { toTime }
|
|
30
|
+
* @fires playback-speed - 배속 변경 요청 { speed }
|
|
31
|
+
*/
|
|
32
|
+
export declare class PlaybackControls extends LitElement {
|
|
33
|
+
static styles: import("lit").CSSResult;
|
|
34
|
+
playbackState: PlaybackState;
|
|
35
|
+
speed: number;
|
|
36
|
+
currentTime: string;
|
|
37
|
+
bufferedRanges: {
|
|
38
|
+
from: number;
|
|
39
|
+
to: number;
|
|
40
|
+
}[];
|
|
41
|
+
/** 외부에서 전달받은 초기 시간 범위 (from만 사용, to는 from+1h로 자동 계산) */
|
|
42
|
+
timeRange: {
|
|
43
|
+
from: Date;
|
|
44
|
+
to: Date;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Two-tier state model:
|
|
48
|
+
*
|
|
49
|
+
* PENDING (`_pendingRange`, `_pendingFrom`, `_pendingTo`)
|
|
50
|
+
* The upper bar's draft. User edits these via the range dropdown,
|
|
51
|
+
* ←/→ shift, or direct date/time inputs (Range mode only). The
|
|
52
|
+
* lower seekbar is NOT driven by these — they only become live
|
|
53
|
+
* when the user clicks "적용".
|
|
54
|
+
*
|
|
55
|
+
* APPLIED (`_appliedFrom`, `_appliedTo`)
|
|
56
|
+
* The window the seekbar visualizes and the engine fetches data
|
|
57
|
+
* for. Updated only by `_onApply()`, which mirrors pending values
|
|
58
|
+
* here and dispatches a `playback-start` to refresh the engine
|
|
59
|
+
* with the new window (when playing/paused).
|
|
60
|
+
*
|
|
61
|
+
* Splitting these prevents mid-edit churn: typing into the time input
|
|
62
|
+
* doesn't refetch on every keystroke, and the slider doesn't jiggle
|
|
63
|
+
* while the user picks a date.
|
|
64
|
+
*/
|
|
65
|
+
private _pendingRange;
|
|
66
|
+
private _pendingFrom;
|
|
67
|
+
private _pendingTo;
|
|
68
|
+
/**
|
|
69
|
+
* Which side did the user touch most recently in Range mode? Anchors
|
|
70
|
+
* the auto-adjust when the resulting gap violates min/max — the
|
|
71
|
+
* unedited side is what gets pushed to a legal value, so the user's
|
|
72
|
+
* latest intent is preserved.
|
|
73
|
+
*/
|
|
74
|
+
private _lastEdited;
|
|
75
|
+
private _appliedFrom;
|
|
76
|
+
private _appliedTo;
|
|
77
|
+
private _seekValue;
|
|
78
|
+
private _currentPlayTime;
|
|
79
|
+
private _seeking;
|
|
80
|
+
private _seekPreviewTime;
|
|
81
|
+
private _speeds;
|
|
82
|
+
/** 드래그 중 playback-seek-preview throttle 타이머 (leading+trailing) */
|
|
83
|
+
private _previewThrottle?;
|
|
84
|
+
/** 드래그 중 가장 최근 seekbar 위치 시각 */
|
|
85
|
+
private _latestPreviewTime;
|
|
86
|
+
/** 가장 최근에 실제 emit 한 preview 시각 (dedupe 용) */
|
|
87
|
+
private _lastEmittedPreviewTime;
|
|
88
|
+
connectedCallback(): void;
|
|
89
|
+
disconnectedCallback(): void;
|
|
90
|
+
updated(changes: Map<string, any>): void;
|
|
91
|
+
/**
|
|
92
|
+
* Map a millisecond gap to the matching preset key, or `'Range'` if
|
|
93
|
+
* the gap doesn't match any preset (custom window already in effect).
|
|
94
|
+
*/
|
|
95
|
+
private _inferRangeKey;
|
|
96
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
97
|
+
private _formatTime;
|
|
98
|
+
private _toDateString;
|
|
99
|
+
/** "HH:MM:SS" — what `<input type="time" step="1">` reads/writes. */
|
|
100
|
+
private _toTimeString;
|
|
101
|
+
/**
|
|
102
|
+
* "YYYY-MM-DDTHH:MM:SS" — what `<input type="datetime-local" step="1">`
|
|
103
|
+
* reads/writes. Local time (no Z suffix), matches the input element's
|
|
104
|
+
* own convention.
|
|
105
|
+
*/
|
|
106
|
+
private _toDatetimeLocalString;
|
|
107
|
+
/**
|
|
108
|
+
* 엔진 프레임(currentTime 프로프) 을 유일한 시간 소스로 사용하여
|
|
109
|
+
* _currentPlayTime 및 _seekValue 동기화.
|
|
110
|
+
*/
|
|
111
|
+
private _syncFromEngine;
|
|
112
|
+
private _onRangeChange;
|
|
113
|
+
private _shiftPending;
|
|
114
|
+
private _onPendingDatetimeChange;
|
|
115
|
+
/**
|
|
116
|
+
* Commit a side's new value, then enforce the gap envelope.
|
|
117
|
+
*
|
|
118
|
+
* Rules (per spec):
|
|
119
|
+
* - `to` clamped to now (no future).
|
|
120
|
+
* - `to − from ≥ 10m` (no zero/negative window).
|
|
121
|
+
* - `to − from ≤ 2h`.
|
|
122
|
+
* - The side just edited (`side`) is the anchor; the OTHER side
|
|
123
|
+
* gets pushed to satisfy the envelope.
|
|
124
|
+
* - If anchoring `from` would push `to` past now, fall back to
|
|
125
|
+
* anchoring `to = now` and shrink `from`.
|
|
126
|
+
*/
|
|
127
|
+
private _writePendingSide;
|
|
128
|
+
/**
|
|
129
|
+
* "적용" — copy pending → applied, reset seek to window start, and
|
|
130
|
+
* (re)start the engine so it refetches data for the new window.
|
|
131
|
+
*
|
|
132
|
+
* Behavior by prior state:
|
|
133
|
+
* - playing: dispatch `playback-start` → engine restarts in new window.
|
|
134
|
+
* - paused : same — engine refetches; we leave the user in 'playing'
|
|
135
|
+
* state because the alternative (carry "paused" through a window
|
|
136
|
+
* change) ends up showing stale buffered data while the new fetch
|
|
137
|
+
* completes, which reads as a stuck UI.
|
|
138
|
+
* - idle : window updated silently; no engine activity until user
|
|
139
|
+
* presses play.
|
|
140
|
+
*/
|
|
141
|
+
private _onApply;
|
|
142
|
+
private _onStart;
|
|
143
|
+
private _onTogglePlayPause;
|
|
144
|
+
private _onStop;
|
|
145
|
+
private _onSeekInput;
|
|
146
|
+
/** latest 위치 시각으로 playback-seek-preview 를 발행 (dedupe). */
|
|
147
|
+
private _emitPreview;
|
|
148
|
+
private _onSeekChange;
|
|
149
|
+
private static readonly PREVIEW_THROTTLE_MS;
|
|
150
|
+
private _cancelPreviewThrottle;
|
|
151
|
+
private _renderBufferBars;
|
|
152
|
+
private _onSpeedChange;
|
|
153
|
+
}
|
|
154
|
+
export {};
|