@fmsim/board 2.0.0-beta.12 → 2.0.0-beta.15
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 +1055 -1034
- 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/ox-board-viewer.js +10 -1
- 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/selector/ox-board-selector.js +12 -1
- package/dist/src/selector/ox-board-selector.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
package/demo/index-modeller.html
CHANGED
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
}
|
|
22
22
|
</style>
|
|
23
23
|
|
|
24
|
-
<link href="/node_modules/@material-design-icons/font/index.css" rel="stylesheet" />
|
|
25
24
|
<link href="/node_modules/@fontsource/roboto/index.css" rel="stylesheet" />
|
|
25
|
+
<link href="/node_modules/material-symbols/index.css" rel="stylesheet" />
|
|
26
26
|
</head>
|
|
27
27
|
<body>
|
|
28
28
|
<div id="demo"></div>
|
package/demo/index-player.html
CHANGED
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
height: 100dvh;
|
|
21
21
|
}
|
|
22
22
|
</style>
|
|
23
|
-
<link href="
|
|
24
|
-
<link href="/node_modules
|
|
23
|
+
<link href="/node_modules/@fontsource/roboto/index.css" rel="stylesheet" />
|
|
24
|
+
<link href="/node_modules/material-symbols/index.css" rel="stylesheet" />
|
|
25
25
|
</head>
|
|
26
26
|
<body>
|
|
27
27
|
<div id="demo"></div>
|
package/demo/index-viewer.html
CHANGED
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
height: 100dvh;
|
|
21
21
|
}
|
|
22
22
|
</style>
|
|
23
|
-
<link href="
|
|
24
|
-
<link href="/node_modules
|
|
23
|
+
<link href="/node_modules/@fontsource/roboto/index.css" rel="stylesheet" />
|
|
24
|
+
<link href="/node_modules/material-symbols/index.css" rel="stylesheet" />
|
|
25
25
|
</head>
|
|
26
26
|
<body>
|
|
27
27
|
<div id="demo"></div>
|
package/demo/index.html
CHANGED
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
height: 100dvh;
|
|
21
21
|
}
|
|
22
22
|
</style>
|
|
23
|
-
<link href="
|
|
24
|
-
<link href="/node_modules
|
|
23
|
+
<link href="/node_modules/@fontsource/roboto/index.css" rel="stylesheet" />
|
|
24
|
+
<link href="/node_modules/material-symbols/index.css" rel="stylesheet" />
|
|
25
25
|
</head>
|
|
26
26
|
<body>
|
|
27
27
|
<div id="demo"></div>
|
|
@@ -542,13 +542,22 @@ let BoardViewer = class BoardViewer extends LitElement {
|
|
|
542
542
|
togglefullscreen(this, () => this.requestUpdate(), () => this.requestUpdate());
|
|
543
543
|
}
|
|
544
544
|
onTapToggle3D() {
|
|
545
|
+
var _a;
|
|
545
546
|
if (!this._scene)
|
|
546
547
|
return;
|
|
547
548
|
const root = this._scene.root;
|
|
548
549
|
if (!root)
|
|
549
550
|
return;
|
|
550
|
-
|
|
551
|
+
const entering3D = !this._is3dMode;
|
|
552
|
+
root.set('threed', entering3D);
|
|
551
553
|
this.requestUpdate();
|
|
554
|
+
if (entering3D) {
|
|
555
|
+
const capability = (_a = root.rootModel) === null || _a === void 0 ? void 0 : _a._threeCapability;
|
|
556
|
+
if (capability === null || capability === void 0 ? void 0 : capability.isInitialized) {
|
|
557
|
+
capability.controlsManager.reset();
|
|
558
|
+
capability.controlsManager.setAutoRotate(true);
|
|
559
|
+
}
|
|
560
|
+
}
|
|
552
561
|
}
|
|
553
562
|
onTapPlayback() {
|
|
554
563
|
if (this._playbackActive) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ox-board-viewer.js","sourceRoot":"","sources":["../../src/ox-board-viewer.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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;AAEvF;IAAR,KAAK,EAAE;2CAAmB;AAClB;IAAR,KAAK,EAAE;6CAA4C;AAC3C;IAAR,KAAK,EAAE;8CAA6C;AAG5C;IAAR,KAAK,EAAE;+CAAsC;AACrC;IAAR,KAAK,EAAE;qDAAoC;AACnC;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;AAnKlC,WAAW;IADvB,aAAa,CAAC,iBAAiB,CAAC;GACpB,WAAW,CAq6BvB","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 { Component, create, LoadTracker, LoadingOverlay, 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 [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 [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 @state() _scene: any = null\n @state() _forward: { id: string; scene: any }[] = []\n @state() _backward: { id: string; scene: any }[] = []\n private _loadingOverlay?: LoadingOverlay\n\n @state() _oldtarget: HTMLElement | null = null\n @state() _fade_animations?: Array<Animation>\n @state() _fabExpanded = false\n @state() _playbackActive = false\n get _is3dMode(): boolean {\n return !!this._scene?.root?.state?.threed\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 =\n !isIOS() && !this.hideFullscreen\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 <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 ><md-icon slot=\"icon\">${this._playbackActive ? 'stop' : 'replay'}</md-icon></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 ><md-icon slot=\"icon\">${this._is3dMode ? 'view_in_ar' : '3d_rotation'}</md-icon></md-fab>\n </div>\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 id=\"target\"></div>\n\n <slot></slot>\n ${next} ${fabGroup}\n\n ${this._playbackActive\n ? html`<ox-playback-controls\n @playback-stop=${() => this._stopPlayback()}\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 connectedCallback() {\n super.connectedCallback()\n\n window.addEventListener('resize', this.resizeHandler)\n\n // 3D 모드에서도 마우스 움직임 감지 (document 레벨, capture phase)\n document.addEventListener('pointermove', this._pointerMoveHandler, true)\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 document.removeEventListener('pointermove', this._pointerMoveHandler, true)\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 // 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) 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 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._stopPlayback()\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) 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 if (!this._scene) return\n const root = this._scene.root\n if (!root) return\n\n root.set('threed', !this._is3dMode)\n this.requestUpdate()\n }\n\n onTapPlayback() {\n if (this._playbackActive) {\n this._stopPlayback()\n } else {\n this._playbackActive = true\n this.dispatchEvent(\n new CustomEvent('playback-toggle', {\n bubbles: true,\n composed: true,\n detail: { active: true }\n })\n )\n }\n }\n\n private _stopPlayback() {\n this._playbackActive = false\n this.dispatchEvent(\n new CustomEvent('playback-toggle', {\n bubbles: true,\n composed: true,\n detail: { active: false }\n })\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,qCAAqC,CAAA;AAE5C,OAAO,2BAA2B,CAAA;AAElC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAkB,OAAO,EAAE,MAAM,KAAK,CAAA;AACpE,OAAO,EAAE,a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EqB;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;AAEvF;IAAR,KAAK,EAAE;2CAAmB;AAClB;IAAR,KAAK,EAAE;6CAA4C;AAC3C;IAAR,KAAK,EAAE;8CAA6C;AAG5C;IAAR,KAAK,EAAE;+CAAsC;AACrC;IAAR,KAAK,EAAE;qDAAoC;AACnC;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;AAnKlC,WAAW;IADvB,aAAa,CAAC,iBAAiB,CAAC;GACpB,WAAW,CA86BvB","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 { Component, create, LoadTracker, LoadingOverlay, 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 [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 [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 @state() _scene: any = null\n @state() _forward: { id: string; scene: any }[] = []\n @state() _backward: { id: string; scene: any }[] = []\n private _loadingOverlay?: LoadingOverlay\n\n @state() _oldtarget: HTMLElement | null = null\n @state() _fade_animations?: Array<Animation>\n @state() _fabExpanded = false\n @state() _playbackActive = false\n get _is3dMode(): boolean {\n return !!this._scene?.root?.state?.threed\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 =\n !isIOS() && !this.hideFullscreen\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 <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 ><md-icon slot=\"icon\">${this._playbackActive ? 'stop' : 'replay'}</md-icon></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 ><md-icon slot=\"icon\">${this._is3dMode ? 'view_in_ar' : '3d_rotation'}</md-icon></md-fab>\n </div>\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 id=\"target\"></div>\n\n <slot></slot>\n ${next} ${fabGroup}\n\n ${this._playbackActive\n ? html`<ox-playback-controls\n @playback-stop=${() => this._stopPlayback()}\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 connectedCallback() {\n super.connectedCallback()\n\n window.addEventListener('resize', this.resizeHandler)\n\n // 3D 모드에서도 마우스 움직임 감지 (document 레벨, capture phase)\n document.addEventListener('pointermove', this._pointerMoveHandler, true)\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 document.removeEventListener('pointermove', this._pointerMoveHandler, true)\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 // 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) 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 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._stopPlayback()\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) 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 if (!this._scene) return\n const root = this._scene.root\n if (!root) return\n\n const entering3D = !this._is3dMode\n root.set('threed', entering3D)\n this.requestUpdate()\n\n if (entering3D) {\n const capability = (root as any).rootModel?._threeCapability\n if (capability?.isInitialized) {\n capability.controlsManager.reset()\n capability.controlsManager.setAutoRotate(true)\n }\n }\n }\n\n onTapPlayback() {\n if (this._playbackActive) {\n this._stopPlayback()\n } else {\n this._playbackActive = true\n this.dispatchEvent(\n new CustomEvent('playback-toggle', {\n bubbles: true,\n composed: true,\n detail: { active: true }\n })\n )\n }\n }\n\n private _stopPlayback() {\n this._playbackActive = false\n this.dispatchEvent(\n new CustomEvent('playback-toggle', {\n bubbles: true,\n composed: true,\n detail: { active: false }\n })\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"]}
|
|
@@ -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,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAElE,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAGxC,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,UAAU;IAC3C,MAAM,KAAK,MAAM;QACf,OAAO;YACL,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiCF;SACF,CAAA;IACH,CAAC;IASD,KAAK,CAAC,YAAY;QAChB,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,MAAM,IAA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AG,KAAK,CAAC,IAAI,CAAA;YAE3B,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAA;YAEhF,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAA;QAClC,CAAC;;KAEJ,CAAA;QAED,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC,QAAQ,EAAE;YAC/B,QAAQ,EAAE,IAAI;YACd,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,oBAAoB,CAAC;SACvC,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAhE6B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4CAAe;AACd;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;iDAAiB;AAE3B;IAAhB,KAAK,EAAE;gDAA2B;AA3CxB,aAAa;IADzB,aAAa,CAAC,0BAA0B,CAAC;GAC7B,aAAa,CAwGzB","sourcesContent":["/**\n * @license Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport '@material/web/icon/icon.js'\nimport './selector/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"]}
|
|
@@ -37,7 +37,10 @@ let BoardSelector = class BoardSelector extends InfiniteScrollable(localize(i18n
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
.card[selected] {
|
|
40
|
-
border:
|
|
40
|
+
border: 3px solid var(--md-sys-color-primary, #6750a4);
|
|
41
|
+
box-shadow: 0 0 0 3px color-mix(in srgb, var(--md-sys-color-primary, #6750a4) 30%, transparent), 0 4px 12px rgba(0, 0, 0, 0.25);
|
|
42
|
+
transform: scale(1.02);
|
|
43
|
+
transition: all 0.2s ease;
|
|
41
44
|
}
|
|
42
45
|
|
|
43
46
|
.card.create {
|
|
@@ -161,6 +164,14 @@ let BoardSelector = class BoardSelector extends InfiniteScrollable(localize(i18n
|
|
|
161
164
|
if (changed.has('group')) {
|
|
162
165
|
this.refreshBoards();
|
|
163
166
|
}
|
|
167
|
+
// 선택된 카드로 자동 스크롤
|
|
168
|
+
if (changed.has('boards') || changed.has('value')) {
|
|
169
|
+
await this.updateComplete;
|
|
170
|
+
const selected = this.renderRoot.querySelector('.card[selected]');
|
|
171
|
+
if (selected) {
|
|
172
|
+
selected.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
|
173
|
+
}
|
|
174
|
+
}
|
|
164
175
|
}
|
|
165
176
|
onClickSelect(board) {
|
|
166
177
|
this.dispatchEvent(new CustomEvent('board-selected', {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ox-board-selector.js","sourceRoot":"","sources":["../../../src/selector/ox-board-selector.ts"],"names":[],"mappings":";AAAA,OAAO,0BAA0B,CAAA;AAEjC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAkB,MAAM,KAAK,CAAA;AAC3D,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,kBAAkB,MAAM,8CAA8C,CAAA;AAC7E,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAGjE,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,kBAAkB,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC,CAAC;IAClF,MAAM,KAAK,MAAM;QACf,OAAO;YACL,eAAe;YACf,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgFF;S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4CAAe;AA7F/B,aAAa;IADzB,aAAa,CAAC,mBAAmB,CAAC;GACtB,aAAa,CA2QzB","sourcesContent":["import './ox-board-creation-card'\n\nimport { css, html, LitElement, PropertyValues } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\nimport { i18next, localize } from '@operato/i18n'\nimport { ScrollbarStyles } from '@operato/styles'\nimport InfiniteScrollable from '@operato/utils/mixins/infinite-scrollable.js'\nimport { createBoard, fetchBoardList, fetchGroupList } from '@fmsim/api'\n\n@customElement('ox-board-selector')\nexport class BoardSelector extends InfiniteScrollable(localize(i18next)(LitElement)) {\n static get styles() {\n return [\n ScrollbarStyles,\n css`\n :host {\n display: grid;\n grid-template-rows: auto auto 1fr;\n overflow: hidden;\n background-color: var(--popup-content-background-color);\n }\n\n #main {\n overflow: auto;\n padding: var(--popup-content-padding);\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));\n grid-auto-rows: var(--card-list-rows-height);\n grid-gap: 20px;\n }\n\n .card {\n display: flex;\n flex-direction: column;\n align-items: center;\n overflow: hidden;\n border-radius: var(--card-list-border-radius);\n background-color: var(--card-list-background-color);\n }\n\n .card[selected] {\n border: red solid;\n }\n\n .card.create {\n overflow: visible;\n }\n\n .card:hover {\n cursor: pointer;\n }\n\n .card > .name {\n background-color: var(--board-renderer-name-background-color);\n opacity: 0.8;\n margin-top: -35px;\n width: 100%;\n color: #fff;\n font-weight: bolder;\n font-size: 13px;\n text-indent: 7px;\n }\n\n .card > .description {\n background-color: rgba(0, 0, 0, 0.7);\n width: 100%;\n min-height: 15px;\n font-size: 0.6rem;\n color: #fff;\n text-indent: 7px;\n }\n .card img {\n max-height: 100%;\n min-height: 100%;\n }\n\n #filter {\n padding: var(--popup-content-padding);\n background-color: #fff;\n box-shadow: var(--box-shadow);\n }\n\n #filter > div {\n float: right;\n margin-left: 10px;\n }\n\n #filter * {\n font-size: 15px;\n }\n\n select {\n text-transform: capitalize;\n }\n `\n ]\n }\n\n @property({ type: Array }) groups: { id: string; name: string; description: string }[] = []\n @property({ type: Array }) boards: any[] = []\n @property({ type: String }) group?: string\n // @property({ type: String }) inherited?: InheritedValueType = InheritedValueType.Include\n @property({ type: Boolean }) creatable: boolean = false\n @property({ type: String }) value?: string\n\n private _page: number = 1\n private _total: number = 0\n\n constructor() {\n super()\n\n this._infiniteScrollOptions.limit = 50\n }\n\n render() {\n return html`\n <div id=\"filter\">\n <div>\n <label for=\"group\">Group</label>\n <select\n id=\"group\"\n @change=${(e: Event) => {\n this.group = (e.currentTarget as any)?.value\n this.requestUpdate()\n }}\n >\n <option value=\"\">${i18next.t('label.all')}</option>\n ${this.groups.map(group => html` <option value=${group.id}>${group.description}</option> `)}\n </select>\n </div>\n </div>\n\n <div\n id=\"main\"\n @scroll=${(e: Event) => {\n this.onScroll(e)\n }}\n >\n ${this.creatable\n ? html`\n <ox-board-creation-card\n class=\"card create\"\n .groups=${this.groups}\n .defaultGroup=${this.group}\n @create-board=${(e: CustomEvent) => this.onCreateBoard(e)}\n ></ox-board-creation-card>\n `\n : html``}\n ${this.boards.map(\n board => html`\n <div class=\"card\" @click=${(e: Event) => this.onClickSelect(board)} ?selected=${this.value === board.id}>\n <img src=${board.thumbnail} />\n <div class=\"name\">${board.name}</div>\n <div class=\"description\">${board.description}</div>\n </div>\n `\n )}\n </div>\n `\n }\n\n get scrollTargetEl(): HTMLElement | null {\n return this.renderRoot.querySelector('#main') as HTMLElement\n }\n\n async scrollAction() {\n return this.appendBoards()\n }\n\n firstUpdated() {\n this.refreshGroups()\n }\n\n async updated(changed: PropertyValues<this>) {\n if (changed.has('group')) {\n this.refreshBoards()\n }\n }\n\n onClickSelect(board: any) {\n this.dispatchEvent(\n new CustomEvent('board-selected', {\n composed: true,\n bubbles: true,\n detail: {\n board\n }\n })\n )\n }\n\n async onCreateBoard(e: CustomEvent) {\n const { name, description, groupId } = e.detail\n\n await this.createBoard(name, description, groupId)\n this.refreshBoards()\n }\n\n async refreshGroups() {\n const fetched = await fetchGroupList()\n\n const groups = 'groups' in fetched /* graphql */ ? fetched.groups.items : fetched.data.groups\n\n this.group = groups.filter((group: { id: string }) => group.id == this.group).length > 0 ? this.group : ''\n }\n\n async refreshBoards() {\n const boards = await this.getBoards()\n this.boards = [...boards]\n\n const creationCard = this.renderRoot.querySelector('ox-board-creation-card')\n if (creationCard) {\n ;(creationCard as any).reset()\n }\n }\n\n async appendBoards() {\n const boards = await this.getBoards({ page: this._page + 1 })\n this.boards = [...this.boards, ...boards]\n }\n\n async getBoards({ page = 1, limit = this._infiniteScrollOptions.limit } = {}) {\n const filters = []\n const sortings = [] as any[]\n const pagination = {\n limit,\n page\n }\n\n if (this.group)\n filters.push({\n name: 'groupId',\n operator: 'eq',\n value: this.group\n })\n\n const variables = {\n filters,\n sortings,\n pagination\n // inherited: this.inherited || InheritedValueType.Include\n }\n\n const fetched = await fetchBoardList(variables)\n\n if ('boards' in fetched /* graphql */) {\n const { total, items } = fetched.boards\n\n this._total = total\n this._page = page\n\n return items\n } else {\n const { boards } = fetched.data\n this._total = boards.length\n this._page = 1\n\n return boards\n }\n }\n\n async createBoard(name: string, description: string, groupId: string) {\n const model = JSON.stringify({\n width: 1600,\n height: 1200,\n fillStyle: 'white'\n })\n\n const { data } = await createBoard({\n name,\n description,\n groupId,\n model\n })\n\n return data\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ox-board-selector.js","sourceRoot":"","sources":["../../../src/selector/ox-board-selector.ts"],"names":[],"mappings":";AAAA,OAAO,0BAA0B,CAAA;AAEjC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAkB,MAAM,KAAK,CAAA;AAC3D,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,kBAAkB,MAAM,8CAA8C,CAAA;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MAAM,CAAA;QACf,CAAC;IACH,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,IAAY,EAAE,WAAmB,EAAE,OAAe;QAClE,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC;YAC3B,KAAK,EAAE,IAAI;YACX,MAAM,EAAE,IAAI;YACZ,SAAS,EAAE,OAAO;SACnB,CAAC,CAAA;QAEF,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,WAAW,CAAC;YACjC,IAAI;YACJ,WAAW;YACX,OAAO;YACP,KAAK;SACN,CAAC,CAAA;QAEF,OAAO,IAAI,CAAA;IACb,CAAC;CACF,CAAA;AA5L4B;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;6CAAiE;AAChE;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;6CAAmB;AACjB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4CAAe;AAEb;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;gDAA2B;AAC3B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4CAAe;AAhG/B,aAAa;IADzB,aAAa,CAAC,mBAAmB,CAAC;GACtB,aAAa,CAuRzB","sourcesContent":["import './ox-board-creation-card'\n\nimport { css, html, LitElement, PropertyValues } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\nimport { i18next, localize } from '@operato/i18n'\nimport { ScrollbarStyles } from '@operato/styles'\nimport InfiniteScrollable from '@operato/utils/mixins/infinite-scrollable.js'\nimport { createBoard, fetchBoardList, fetchGroupList } from '@fmsim/api'\n\n@customElement('ox-board-selector')\nexport class BoardSelector extends InfiniteScrollable(localize(i18next)(LitElement)) {\n static get styles() {\n return [\n ScrollbarStyles,\n css`\n :host {\n display: grid;\n grid-template-rows: auto auto 1fr;\n overflow: hidden;\n background-color: var(--popup-content-background-color);\n }\n\n #main {\n overflow: auto;\n padding: var(--popup-content-padding);\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));\n grid-auto-rows: var(--card-list-rows-height);\n grid-gap: 20px;\n }\n\n .card {\n display: flex;\n flex-direction: column;\n align-items: center;\n overflow: hidden;\n border-radius: var(--card-list-border-radius);\n background-color: var(--card-list-background-color);\n }\n\n .card[selected] {\n border: 3px solid var(--md-sys-color-primary, #6750a4);\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--md-sys-color-primary, #6750a4) 30%, transparent), 0 4px 12px rgba(0, 0, 0, 0.25);\n transform: scale(1.02);\n transition: all 0.2s ease;\n }\n\n .card.create {\n overflow: visible;\n }\n\n .card:hover {\n cursor: pointer;\n }\n\n .card > .name {\n background-color: var(--board-renderer-name-background-color);\n opacity: 0.8;\n margin-top: -35px;\n width: 100%;\n color: #fff;\n font-weight: bolder;\n font-size: 13px;\n text-indent: 7px;\n }\n\n .card > .description {\n background-color: rgba(0, 0, 0, 0.7);\n width: 100%;\n min-height: 15px;\n font-size: 0.6rem;\n color: #fff;\n text-indent: 7px;\n }\n .card img {\n max-height: 100%;\n min-height: 100%;\n }\n\n #filter {\n padding: var(--popup-content-padding);\n background-color: #fff;\n box-shadow: var(--box-shadow);\n }\n\n #filter > div {\n float: right;\n margin-left: 10px;\n }\n\n #filter * {\n font-size: 15px;\n }\n\n select {\n text-transform: capitalize;\n }\n `\n ]\n }\n\n @property({ type: Array }) groups: { id: string; name: string; description: string }[] = []\n @property({ type: Array }) boards: any[] = []\n @property({ type: String }) group?: string\n // @property({ type: String }) inherited?: InheritedValueType = InheritedValueType.Include\n @property({ type: Boolean }) creatable: boolean = false\n @property({ type: String }) value?: string\n\n private _page: number = 1\n private _total: number = 0\n\n constructor() {\n super()\n\n this._infiniteScrollOptions.limit = 50\n }\n\n render() {\n return html`\n <div id=\"filter\">\n <div>\n <label for=\"group\">Group</label>\n <select\n id=\"group\"\n @change=${(e: Event) => {\n this.group = (e.currentTarget as any)?.value\n this.requestUpdate()\n }}\n >\n <option value=\"\">${i18next.t('label.all')}</option>\n ${this.groups.map(group => html` <option value=${group.id}>${group.description}</option> `)}\n </select>\n </div>\n </div>\n\n <div\n id=\"main\"\n @scroll=${(e: Event) => {\n this.onScroll(e)\n }}\n >\n ${this.creatable\n ? html`\n <ox-board-creation-card\n class=\"card create\"\n .groups=${this.groups}\n .defaultGroup=${this.group}\n @create-board=${(e: CustomEvent) => this.onCreateBoard(e)}\n ></ox-board-creation-card>\n `\n : html``}\n ${this.boards.map(\n board => html`\n <div class=\"card\" @click=${(e: Event) => this.onClickSelect(board)} ?selected=${this.value === board.id}>\n <img src=${board.thumbnail} />\n <div class=\"name\">${board.name}</div>\n <div class=\"description\">${board.description}</div>\n </div>\n `\n )}\n </div>\n `\n }\n\n get scrollTargetEl(): HTMLElement | null {\n return this.renderRoot.querySelector('#main') as HTMLElement\n }\n\n async scrollAction() {\n return this.appendBoards()\n }\n\n firstUpdated() {\n this.refreshGroups()\n }\n\n async updated(changed: PropertyValues<this>) {\n if (changed.has('group')) {\n this.refreshBoards()\n }\n\n // 선택된 카드로 자동 스크롤\n if (changed.has('boards') || changed.has('value')) {\n await this.updateComplete\n const selected = this.renderRoot.querySelector('.card[selected]') as HTMLElement\n if (selected) {\n selected.scrollIntoView({ behavior: 'smooth', block: 'center' })\n }\n }\n }\n\n onClickSelect(board: any) {\n this.dispatchEvent(\n new CustomEvent('board-selected', {\n composed: true,\n bubbles: true,\n detail: {\n board\n }\n })\n )\n }\n\n async onCreateBoard(e: CustomEvent) {\n const { name, description, groupId } = e.detail\n\n await this.createBoard(name, description, groupId)\n this.refreshBoards()\n }\n\n async refreshGroups() {\n const fetched = await fetchGroupList()\n\n const groups = 'groups' in fetched /* graphql */ ? fetched.groups.items : fetched.data.groups\n\n this.group = groups.filter((group: { id: string }) => group.id == this.group).length > 0 ? this.group : ''\n }\n\n async refreshBoards() {\n const boards = await this.getBoards()\n this.boards = [...boards]\n\n const creationCard = this.renderRoot.querySelector('ox-board-creation-card')\n if (creationCard) {\n ;(creationCard as any).reset()\n }\n }\n\n async appendBoards() {\n const boards = await this.getBoards({ page: this._page + 1 })\n this.boards = [...this.boards, ...boards]\n }\n\n async getBoards({ page = 1, limit = this._infiniteScrollOptions.limit } = {}) {\n const filters = []\n const sortings = [] as any[]\n const pagination = {\n limit,\n page\n }\n\n if (this.group)\n filters.push({\n name: 'groupId',\n operator: 'eq',\n value: this.group\n })\n\n const variables = {\n filters,\n sortings,\n pagination\n // inherited: this.inherited || InheritedValueType.Include\n }\n\n const fetched = await fetchBoardList(variables)\n\n if ('boards' in fetched /* graphql */) {\n const { total, items } = fetched.boards\n\n this._total = total\n this._page = page\n\n return items\n } else {\n const { boards } = fetched.data\n this._total = boards.length\n this._page = 1\n\n return boards\n }\n }\n\n async createBoard(name: string, description: string, groupId: string) {\n const model = JSON.stringify({\n width: 1600,\n height: 1200,\n fillStyle: 'white'\n })\n\n const { data } = await createBoard({\n name,\n description,\n groupId,\n model\n })\n\n return data\n }\n}\n"]}
|