@fmsim/board 1.0.47 → 1.0.51
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 +196 -205
- package/demo/index-player.html +2 -3
- package/demo/index-viewer.html +2 -3
- package/demo/index.html +2 -3
- package/dist/src/layers/mcs-mouse-event-handler.js +6 -6
- package/dist/src/layers/mcs-mouse-event-handler.js.map +1 -1
- package/dist/src/layers/movement-layer.d.ts +6 -2
- package/dist/src/layers/movement-layer.js +27 -1
- package/dist/src/layers/movement-layer.js.map +1 -1
- package/dist/src/modeller/property-sidebar/data-binding/data-binding.js +8 -9
- package/dist/src/modeller/property-sidebar/data-binding/data-binding.js.map +1 -1
- package/dist/src/modeller/property-sidebar/inspector/inspector.js +2 -2
- package/dist/src/modeller/property-sidebar/inspector/inspector.js.map +1 -1
- package/dist/src/ox-board-component-info.js +10 -6
- package/dist/src/ox-board-component-info.js.map +1 -1
- package/dist/src/ox-board-modeller.js +1 -1
- package/dist/src/ox-board-modeller.js.map +1 -1
- package/dist/src/ox-board-viewer.js +22 -33
- package/dist/src/ox-board-viewer.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/dist/src/layers/tooltip-decorator.d.ts +0 -2
- package/dist/src/layers/tooltip-decorator.js +0 -41
- package/dist/src/layers/tooltip-decorator.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ox-board-modeller.js","sourceRoot":"","sources":["../../src/ox-board-modeller.ts"],"names":[],"mappings":";AAAA,OAAO,mBAAmB,CAAA;AAC1B,OAAO,oBAAoB,CAAA;AAE3B,OAAO,wBAAwB,CAAA;AAC/B,OAAO,6CAA6C,CAAA;AACpD,OAAO,2CAA2C,CAAA;AAClD,OAAO,8CAA8C,CAAA;AACrD,OAAO,4CAA4C,CAAA;AACnD,OAAO,mBAAmB,CAAA;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA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'@hatiolab/things-scene'\nimport './modeller/scene-viewer/ox-scene-handler.js'\nimport './modeller/scene-viewer/ox-scene-layer.js'\nimport './modeller/scene-viewer/ox-scene-property.js'\nimport './modeller/scene-viewer/ox-scene-viewer.js'\nimport './ox-board-viewer'\n\nimport { saveAs } from 'file-saver'\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, query } from 'lit/decorators.js'\n\nimport { Scene, SCENE_MODE } from '@hatiolab/things-scene'\nimport { ScopedElementsMixin } from '@open-wc/scoped-elements'\nimport { OxPopup } from '@operato/popup'\nimport { isMacOS, togglefullscreen } from '@operato/utils'\nimport { navigate } from '@operato/shell'\n\nimport { ComponentToolbar } from './modeller/component-toolbar/component-toolbar'\nimport { EditToolbar } from './modeller/edit-toolbar'\nimport { PropertySidebar } from './modeller/property-sidebar/property-sidebar'\nimport { ComponentGroup, ComponentTemplate } from './types'\n\nconst MACOS = isMacOS()\n\nconst ICON_PROPERTIES = new URL('../../icons/icon-properties.png', import.meta.url).href\nconst ICON_PROPERTIES_LINE_TYPE = new URL('../../icons/icon-properties-line-type.png', import.meta.url).href\nconst ICON_PROPERTIES_ARROW_TYPE = new URL('../../icons/icon-properties-arrow-type.png', import.meta.url).href\nconst ICON_PROPERTIES_LABEL = new URL('../../icons/icon-properties-label.png', import.meta.url).href\nconst ICON_PROPERTIES_PADDING = new URL('../../icons/icon-properties-padding.png', import.meta.url).href\n\nconst ICON_HTOOLBAR = new URL('../../icons/icon-htoolbar.png', import.meta.url).href\nconst ICON_FULLSCREEN = new URL('../../icons/icon-fullscreen.png', import.meta.url).href\nconst ICON_COLLAPSE = new URL('../../icons/icon-collapse.png', import.meta.url).href\nconst ICON_COLLAPSE_ACTIVE = new URL('../../icons/icon-collapse-active.png', import.meta.url).href\n\nconst ICON_SHELL_INSPECTOR = new URL('../../icons/icon-shell-inspector.png', import.meta.url).href\n\nvar Registry: ComponentGroup[] = []\n\n@customElement('ox-board-modeller')\nexport class BoardModeller extends ScopedElementsMixin(LitElement) {\n static styles = [\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n height: 100%;\n overflow: hidden;\n }\n\n edit-toolbar {\n flex: 45px;\n max-height: 45px;\n }\n\n div[content] {\n flex: 1;\n max-height: calc(100% - 45px);\n\n display: flex;\n flex-direction: row;\n }\n\n component-toolbar {\n max-height: 100%;\n }\n\n property-sidebar {\n overflow: hidden;\n }\n\n #scene-wrap {\n position: relative;\n\n flex: 1;\n display: flex;\n flex-direction: row;\n }\n\n ox-scene-viewer {\n flex: 1;\n width: 100%;\n height: 100%;\n }\n\n mwc-fab {\n position: absolute;\n right: 15px;\n bottom: 15px;\n }\n\n ox-popup {\n width: 90%;\n height: 90%;\n left: 50%;\n top: 50%;\n transform: translateX(-50%) translateY(-50%);\n background: var(--secondary-color, black);\n\n display: flex;\n justify-content: center;\n flex-direction: column;\n }\n\n ox-board-viewer {\n width: 98%;\n height: 98%;\n margin: auto;\n padding: 0;\n background-color: white;\n }\n\n [brand] {\n display: flex;\n white-space: nowrap;\n flex-direction: row;\n align-items: center;\n gap: 3px;\n }\n `\n ]\n\n static registerGroup(group: ComponentGroup) {\n var found = Registry.find(inRegisterGroup => inRegisterGroup.name == group.name)\n\n if (found) {\n found = {\n ...found,\n ...group\n }\n } else {\n Registry.push(group)\n }\n }\n\n static registerTemplate(templates: ComponentTemplate[]): void {\n templates &&\n templates.forEach(template => {\n var groups: string[] = typeof template.group == 'string' ? [template.group] : template.group\n\n Registry.filter(group => groups.includes(group.name)).forEach(group => {\n if (!group.templates.find(inGroupTemplate => inGroupTemplate.type == template.type)) {\n group.templates.push(template)\n }\n })\n })\n }\n\n static get groups(): ComponentGroup[] {\n return Registry\n }\n\n static getGroup(name: string) {\n return Registry.find(group => group.name === name)\n }\n\n @property({ type: String }) boardName: string = ''\n @property({ type: Object }) model: any = null\n @property({ type: String }) baseUrl: string = ''\n @property({ type: Array }) selected: any[] = []\n @property({ type: Number }) mode: SCENE_MODE = SCENE_MODE.EDIT\n @property({ type: Object }) provider: any = null\n @property({ type: Boolean }) hideProperty: boolean = false\n @property({ type: String }) overlay: string = ''\n @property({ type: Object }) scene?: Scene\n @property({ type: Array }) componentGroupList: any[] = []\n @property({ type: Array }) fonts: any[] = []\n @property({ type: Object }) themes: any = null\n @property({ type: Array }) propertyEditor: any[] = []\n\n @query('edit-toolbar') private editToolbar!: EditToolbar\n\n private group: string = ''\n private shortcutHandler?: (e: KeyboardEvent) => void\n\n constructor() {\n super()\n\n document.addEventListener('get-all-scene-component-ids', (e: Event) => {\n var { component, callback } = (e as CustomEvent).detail\n\n if (!this.scene) return\n\n var ids\n if (component) {\n ids = this.scene.findAll(component).map(c => c.model.id)\n } else {\n ids = this.scene.ids.map(({ key }) => key)\n }\n\n ids = ids.filter(Boolean).sort()\n callback(ids)\n })\n\n this.style.setProperty('--url-icon-properties', `url(${ICON_PROPERTIES})`)\n this.style.setProperty('--url-icon-properties-label', `url(${ICON_PROPERTIES_LABEL})`)\n this.style.setProperty('--url-icon-properties-padding', `url(${ICON_PROPERTIES_PADDING})`)\n this.style.setProperty('--url-icon-properties-line-type', `url(${ICON_PROPERTIES_LINE_TYPE})`)\n this.style.setProperty('--url-icon-properties-arrow-type', `url(${ICON_PROPERTIES_ARROW_TYPE})`)\n\n this.style.setProperty('--url-icon-htoolbar', `url(${ICON_HTOOLBAR})`)\n this.style.setProperty('--url-icon-fullscreen', `url(${ICON_FULLSCREEN})`)\n this.style.setProperty('--url-icon-collapse', `url(${ICON_COLLAPSE})`)\n this.style.setProperty('--url-icon-collapse-active', `url(${ICON_COLLAPSE_ACTIVE})`)\n\n this.style.setProperty('--url-icon-shell-inspector', `url(${ICON_SHELL_INSPECTOR})`)\n }\n\n static get scopedElements() {\n return {\n 'edit-toolbar': EditToolbar,\n 'property-sidebar': PropertySidebar,\n 'component-toolbar': ComponentToolbar\n }\n }\n\n render() {\n return html`\n <edit-toolbar\n .scene=${this.scene}\n .selected=${this.selected}\n @hide-property-changed=${(e: CustomEvent) => (this.hideProperty = e.detail.value)}\n @open-preview=${() => this.preview()}\n @download-model=${() => this.downloadModel()}\n @modeller-fullscreen=${() => togglefullscreen(this)}\n >\n ${this.renderBrandingZone()}\n </edit-toolbar>\n\n <div content>\n <component-toolbar\n .scene=${this.scene}\n .mode=${this.mode}\n @mode-changed=${(e: CustomEvent) => {\n this.mode = e.detail.value\n }}\n .componentGroupList=${this.componentGroupList}\n .group=${this.group}\n >\n </component-toolbar>\n\n <div id=\"scene-wrap\">\n <ox-scene-viewer\n id=\"scene\"\n .scene=${this.scene}\n @scene-changed=${(e: CustomEvent) => {\n this.scene = e.detail.value\n }}\n .model=${this.model}\n .themes=${this.themes}\n .selected=${this.selected}\n @selected-changed=${(e: CustomEvent) => {\n this.selected = e.detail.value\n }}\n .mode=${this.mode}\n @mode-changed=${(e: CustomEvent) => {\n this.mode = e.detail.value\n }}\n fit=\"ratio\"\n .baseUrl=${this.baseUrl}\n @contextmenu=${() => this.onContextMenu()}\n .provider=${this.provider}\n name=\"modeller\"\n >\n <ox-scene-layer type=\"selection-layer\"></ox-scene-layer>\n <ox-scene-layer type=\"modeling-layer\"></ox-scene-layer>\n <ox-scene-layer type=\"add-layer\"> </ox-scene-layer>\n <ox-scene-layer type=\"guide-layer\">\n <ox-scene-property name=\"ruler\" value=\"disabled\"></ox-scene-property>\n </ox-scene-layer>\n <ox-scene-layer type=\"shift-layer\">\n <ox-scene-property name=\"text\" value=\"${this.overlay}\"></ox-scene-property>\n <ox-scene-property name=\"alpha\" value=\"0.3\"></ox-scene-property>\n <ox-scene-property name=\"fontFamily\" value=\"arial\"></ox-scene-property>\n <ox-scene-property name=\"fontSize\" value=\"30\" type=\"number\"></ox-scene-property>\n <ox-scene-property name=\"fontColor\" value=\"navy\"></ox-scene-property>\n <ox-scene-property name=\"textBaseline\" value=\"top\"></ox-scene-property>\n <ox-scene-property name=\"textAlign\" value=\"left\"></ox-scene-property>\n <ox-scene-property name=\"paddingTop\" value=\"50\" type=\"number\"></ox-scene-property>\n <ox-scene-property name=\"paddingLeft\" value=\"50\" type=\"number\"></ox-scene-property>\n </ox-scene-layer>\n <ox-scene-layer type=\"decotag-layer\"></ox-scene-layer>\n <ox-scene-handler type=\"text-editor\"></ox-scene-handler>\n <ox-scene-handler type=\"move-handler\"></ox-scene-handler>\n </ox-scene-viewer>\n\n <mwc-fab icon=\"save\" @click=${() => this.onTapSave()} title=\"save\"> </mwc-fab>\n </div>\n\n <property-sidebar\n .scene=${this.scene}\n .selected=${this.selected}\n .collapsed=${this.hideProperty}\n .fonts=${this.fonts}\n .propertyEditor=${this.propertyEditor}\n >\n </property-sidebar>\n </div>\n `\n }\n\n connectedCallback(): void {\n super.connectedCallback()\n this.bindShortcutEvent()\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback()\n this.unbindShortcutEvent()\n }\n\n close() {\n this.model = null\n this.requestUpdate()\n }\n\n onShortcut(e: KeyboardEvent) {\n if (MACOS) var ctrlKey = e.metaKey\n else var ctrlKey = e.ctrlKey\n\n switch (e.code) {\n case 'KeyS':\n if (ctrlKey) {\n this.onTapSave()\n e.preventDefault()\n }\n break\n }\n }\n\n preview() {\n const board = {\n id: 'preview',\n model: this.scene?.model ? JSON.parse(JSON.stringify(this.scene.model)) : null,\n style: this.scene?.rootContainer.style\n }\n\n OxPopup.open({\n template: html` <ox-board-viewer .provider=${this.provider} .board=${board}></ox-board-viewer> `,\n parent: this.renderRoot as Element\n })\n\n requestAnimationFrame(() => {\n dispatchEvent(new Event('resize'))\n })\n }\n\n downloadModel() {\n if (!this.scene) return\n\n var model = JSON.stringify(this.model, null, 2)\n var filename = (this.boardName || 'NONAME') + '-' + Date.now() + '.json'\n saveAs(new Blob([model], { type: 'application/octet-stream' }), filename)\n }\n\n renderBrandingZone() {\n return html`\n <div brand>\n <mwc-icon\n @click=${() => {\n navigate('board-list')\n return false\n }}\n >home</mwc-icon\n >\n <div board_name>${this.boardName}</div>\n </div>\n `\n }\n\n onTapSave() {\n this.dispatchEvent(new CustomEvent('save-model', { bubbles: true, composed: true, detail: { model: this.model } }))\n }\n\n bindShortcutEvent() {\n // TODO: Global Hotkey에 대한 정의를 edit-toolbar에서 가져올 수 있도록 수정해야 함.\n const GLOBAL_HOTKEYS = ['Digit1', 'Digit2', 'F11', 'KeyD', 'KeyP', 'KeyS']\n\n this.shortcutHandler = (e: KeyboardEvent) => {\n const target = e.composedPath()[0] as HTMLElement\n var tagName = target.tagName\n var isInput = target.isContentEditable || tagName == 'INPUT' || tagName == 'SELECT' || tagName == 'TEXTAREA'\n var isGlobalHotkey = GLOBAL_HOTKEYS.includes(e.code)\n\n if (!isGlobalHotkey && isInput) return\n if (!this.editToolbar.onShortcut(e)) this.onShortcut(e)\n }\n\n document.addEventListener('keydown', this.shortcutHandler)\n }\n\n unbindShortcutEvent() {\n if (this.shortcutHandler) {\n document.removeEventListener('keydown', this.shortcutHandler)\n delete this.shortcutHandler\n }\n }\n\n onContextMenu() {}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ox-board-modeller.js","sourceRoot":"","sources":["../../src/ox-board-modeller.ts"],"names":[],"mappings":";AAAA,OAAO,mBAAmB,CAAA;AAC1B,OAAO,oBAAoB,CAAA;AAE3B,OAAO,wBAAwB,CAAA;AAC/B,OAAO,6CAA6C,CAAA;AACpD,OAAO,2CAA2C,CAAA;AAClD,OAAO,8CAA8C,CAAA;AACrD,OAAO,4CAA4C,CAAA;AACnD,OAAO,mBAAmB,CAAA;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AACnC,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,EAAS,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,C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AAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;8CAAqB;AACrB;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;+CAAqB;AACnB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;2CAAmC;AAClC;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;+CAAqB;AACnB;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;mDAA8B;AAC9B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;8CAAqB;AACpB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4CAAc;AACd;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;yDAA+B;AAC9B;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;4CAAkB;AAChB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CAAmB;AACnB;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;qDAA2B;AAEtB;IAA9B,KAAK,CAAC,cAAc,CAAC;kDAAkC;AAnI7C,aAAa;IADzB,aAAa,CAAC,mBAAmB,CAAC;GACtB,aAAa,CAwWzB","sourcesContent":["import '@material/mwc-fab'\nimport '@material/mwc-icon'\n\nimport '@hatiolab/things-scene'\nimport './modeller/scene-viewer/ox-scene-handler.js'\nimport './modeller/scene-viewer/ox-scene-layer.js'\nimport './modeller/scene-viewer/ox-scene-property.js'\nimport './modeller/scene-viewer/ox-scene-viewer.js'\nimport './ox-board-viewer'\n\nimport { saveAs } from 'file-saver'\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, query } from 'lit/decorators.js'\n\nimport { Scene, SCENE_MODE } from '@hatiolab/things-scene'\nimport { ScopedElementsMixin } from '@open-wc/scoped-elements'\nimport { OxPopup } from '@operato/popup'\nimport { isMacOS, togglefullscreen } from '@operato/utils'\nimport { navigate } from '@operato/shell'\n\nimport { ComponentToolbar } from './modeller/component-toolbar/component-toolbar'\nimport { EditToolbar } from './modeller/edit-toolbar'\nimport { PropertySidebar } from './modeller/property-sidebar/property-sidebar'\nimport { ComponentGroup, ComponentTemplate } from './types'\n\nconst MACOS = isMacOS()\n\nconst ICON_PROPERTIES = new URL('../../icons/icon-properties.png', import.meta.url).href\nconst ICON_PROPERTIES_LINE_TYPE = new URL('../../icons/icon-properties-line-type.png', import.meta.url).href\nconst ICON_PROPERTIES_ARROW_TYPE = new URL('../../icons/icon-properties-arrow-type.png', import.meta.url).href\nconst ICON_PROPERTIES_LABEL = new URL('../../icons/icon-properties-label.png', import.meta.url).href\nconst ICON_PROPERTIES_PADDING = new URL('../../icons/icon-properties-padding.png', import.meta.url).href\n\nconst ICON_HTOOLBAR = new URL('../../icons/icon-htoolbar.png', import.meta.url).href\nconst ICON_FULLSCREEN = new URL('../../icons/icon-fullscreen.png', import.meta.url).href\nconst ICON_COLLAPSE = new URL('../../icons/icon-collapse.png', import.meta.url).href\nconst ICON_COLLAPSE_ACTIVE = new URL('../../icons/icon-collapse-active.png', import.meta.url).href\n\nconst ICON_SHELL_INSPECTOR = new URL('../../icons/icon-shell-inspector.png', import.meta.url).href\n\nvar Registry: ComponentGroup[] = []\n\n@customElement('ox-board-modeller')\nexport class BoardModeller extends ScopedElementsMixin(LitElement) {\n static styles = [\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n height: 100%;\n overflow: hidden;\n }\n\n edit-toolbar {\n flex: 45px;\n max-height: 45px;\n }\n\n div[content] {\n flex: 1;\n max-height: calc(100% - 45px);\n\n display: flex;\n flex-direction: row;\n }\n\n component-toolbar {\n max-height: 100%;\n }\n\n property-sidebar {\n overflow: hidden;\n }\n\n #scene-wrap {\n position: relative;\n\n flex: 1;\n display: flex;\n flex-direction: row;\n }\n\n ox-scene-viewer {\n flex: 1;\n width: 100%;\n height: 100%;\n }\n\n mwc-fab {\n position: absolute;\n right: 15px;\n bottom: 15px;\n }\n\n ox-popup {\n width: 90%;\n height: 90%;\n left: 50%;\n top: 50%;\n transform: translateX(-50%) translateY(-50%);\n background: var(--secondary-color, black);\n\n display: flex;\n justify-content: center;\n flex-direction: column;\n }\n\n ox-board-viewer {\n width: 98%;\n height: 98%;\n margin: auto;\n padding: 0;\n background-color: white;\n }\n\n [brand] {\n display: flex;\n white-space: nowrap;\n flex-direction: row;\n align-items: center;\n gap: 3px;\n }\n `\n ]\n\n static registerGroup(group: ComponentGroup) {\n var found = Registry.find(inRegisterGroup => inRegisterGroup.name == group.name)\n\n if (found) {\n found = {\n ...found,\n ...group\n }\n } else {\n Registry.push(group)\n }\n }\n\n static registerTemplate(templates: ComponentTemplate[]): void {\n templates &&\n templates.forEach(template => {\n var groups: string[] = typeof template.group == 'string' ? [template.group] : template.group\n\n Registry.filter(group => groups.includes(group.name)).forEach(group => {\n if (!group.templates.find(inGroupTemplate => inGroupTemplate.type == template.type)) {\n group.templates.push(template)\n }\n })\n })\n }\n\n static get groups(): ComponentGroup[] {\n return Registry\n }\n\n static getGroup(name: string) {\n return Registry.find(group => group.name === name)\n }\n\n @property({ type: String }) boardName: string = ''\n @property({ type: Object }) model: any = null\n @property({ type: String }) baseUrl: string = ''\n @property({ type: Array }) selected: any[] = []\n @property({ type: Number }) mode: SCENE_MODE = SCENE_MODE.EDIT\n @property({ type: Object }) provider: any = null\n @property({ type: Boolean }) hideProperty: boolean = false\n @property({ type: String }) overlay: string = ''\n @property({ type: Object }) scene?: Scene\n @property({ type: Array }) componentGroupList: any[] = []\n @property({ type: Array }) fonts: any[] = []\n @property({ type: Object }) themes: any = null\n @property({ type: Array }) propertyEditor: any[] = []\n\n @query('edit-toolbar') private editToolbar!: EditToolbar\n\n private group: string = ''\n private shortcutHandler?: (e: KeyboardEvent) => void\n\n constructor() {\n super()\n\n document.addEventListener('get-all-scene-component-ids', (e: Event) => {\n var { component, callback } = (e as CustomEvent).detail\n\n if (!this.scene) return\n\n var ids\n if (component) {\n ids = this.scene.findAll(component).map(c => c.model.id)\n } else {\n ids = this.scene.ids.map(({ key }) => key)\n }\n\n ids = ids.filter(Boolean).sort()\n callback(ids)\n })\n\n this.style.setProperty('--url-icon-properties', `url(${ICON_PROPERTIES})`)\n this.style.setProperty('--url-icon-properties-label', `url(${ICON_PROPERTIES_LABEL})`)\n this.style.setProperty('--url-icon-properties-padding', `url(${ICON_PROPERTIES_PADDING})`)\n this.style.setProperty('--url-icon-properties-line-type', `url(${ICON_PROPERTIES_LINE_TYPE})`)\n this.style.setProperty('--url-icon-properties-arrow-type', `url(${ICON_PROPERTIES_ARROW_TYPE})`)\n\n this.style.setProperty('--url-icon-htoolbar', `url(${ICON_HTOOLBAR})`)\n this.style.setProperty('--url-icon-fullscreen', `url(${ICON_FULLSCREEN})`)\n this.style.setProperty('--url-icon-collapse', `url(${ICON_COLLAPSE})`)\n this.style.setProperty('--url-icon-collapse-active', `url(${ICON_COLLAPSE_ACTIVE})`)\n\n this.style.setProperty('--url-icon-shell-inspector', `url(${ICON_SHELL_INSPECTOR})`)\n }\n\n static get scopedElements() {\n return {\n 'edit-toolbar': EditToolbar,\n 'property-sidebar': PropertySidebar,\n 'component-toolbar': ComponentToolbar\n }\n }\n\n render() {\n return html`\n <edit-toolbar\n .scene=${this.scene}\n .selected=${this.selected}\n @hide-property-changed=${(e: CustomEvent) => (this.hideProperty = e.detail.value)}\n @open-preview=${() => this.preview()}\n @download-model=${() => this.downloadModel()}\n @modeller-fullscreen=${() => togglefullscreen(this)}\n >\n ${this.renderBrandingZone()}\n </edit-toolbar>\n\n <div content>\n <component-toolbar\n .scene=${this.scene}\n .mode=${this.mode}\n @mode-changed=${(e: CustomEvent) => {\n this.mode = e.detail.value\n }}\n .componentGroupList=${this.componentGroupList}\n .group=${this.group}\n >\n </component-toolbar>\n\n <div id=\"scene-wrap\">\n <ox-scene-viewer\n id=\"scene\"\n .scene=${this.scene}\n @scene-changed=${(e: CustomEvent) => {\n this.scene = e.detail.value\n }}\n .model=${this.model}\n .themes=${this.themes}\n .selected=${this.selected}\n @selected-changed=${(e: CustomEvent) => {\n this.selected = e.detail.value\n }}\n .mode=${this.mode}\n @mode-changed=${(e: CustomEvent) => {\n this.mode = e.detail.value\n }}\n fit=\"ratio\"\n .baseUrl=${this.baseUrl}\n @contextmenu=${() => this.onContextMenu()}\n .provider=${this.provider}\n name=\"modeller\"\n >\n <ox-scene-layer type=\"selection-layer\"></ox-scene-layer>\n <ox-scene-layer type=\"modeling-layer\"></ox-scene-layer>\n <ox-scene-layer type=\"add-layer\"> </ox-scene-layer>\n <ox-scene-layer type=\"guide-layer\">\n <ox-scene-property name=\"ruler\" value=\"disabled\"></ox-scene-property>\n </ox-scene-layer>\n <ox-scene-layer type=\"shift-layer\">\n <ox-scene-property name=\"text\" value=\"${this.overlay}\"></ox-scene-property>\n <ox-scene-property name=\"alpha\" value=\"0.3\"></ox-scene-property>\n <ox-scene-property name=\"fontFamily\" value=\"arial\"></ox-scene-property>\n <ox-scene-property name=\"fontSize\" value=\"30\" type=\"number\"></ox-scene-property>\n <ox-scene-property name=\"fontColor\" value=\"navy\"></ox-scene-property>\n <ox-scene-property name=\"textBaseline\" value=\"top\"></ox-scene-property>\n <ox-scene-property name=\"textAlign\" value=\"left\"></ox-scene-property>\n <ox-scene-property name=\"paddingTop\" value=\"50\" type=\"number\"></ox-scene-property>\n <ox-scene-property name=\"paddingLeft\" value=\"50\" type=\"number\"></ox-scene-property>\n </ox-scene-layer>\n <ox-scene-layer type=\"decorator-layer\"></ox-scene-layer>\n <ox-scene-handler type=\"text-editor\"></ox-scene-handler>\n <ox-scene-handler type=\"move-handler\"></ox-scene-handler>\n </ox-scene-viewer>\n\n <mwc-fab icon=\"save\" @click=${() => this.onTapSave()} title=\"save\"> </mwc-fab>\n </div>\n\n <property-sidebar\n .scene=${this.scene}\n .selected=${this.selected}\n .collapsed=${this.hideProperty}\n .fonts=${this.fonts}\n .propertyEditor=${this.propertyEditor}\n >\n </property-sidebar>\n </div>\n `\n }\n\n connectedCallback(): void {\n super.connectedCallback()\n this.bindShortcutEvent()\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback()\n this.unbindShortcutEvent()\n }\n\n close() {\n this.model = null\n this.requestUpdate()\n }\n\n onShortcut(e: KeyboardEvent) {\n if (MACOS) var ctrlKey = e.metaKey\n else var ctrlKey = e.ctrlKey\n\n switch (e.code) {\n case 'KeyS':\n if (ctrlKey) {\n this.onTapSave()\n e.preventDefault()\n }\n break\n }\n }\n\n preview() {\n const board = {\n id: 'preview',\n model: this.scene?.model ? JSON.parse(JSON.stringify(this.scene.model)) : null,\n style: this.scene?.rootContainer.style\n }\n\n OxPopup.open({\n template: html` <ox-board-viewer .provider=${this.provider} .board=${board}></ox-board-viewer> `,\n parent: this.renderRoot as Element\n })\n\n requestAnimationFrame(() => {\n dispatchEvent(new Event('resize'))\n })\n }\n\n downloadModel() {\n if (!this.scene) return\n\n var model = JSON.stringify(this.model, null, 2)\n var filename = (this.boardName || 'NONAME') + '-' + Date.now() + '.json'\n saveAs(new Blob([model], { type: 'application/octet-stream' }), filename)\n }\n\n renderBrandingZone() {\n return html`\n <div brand>\n <mwc-icon\n @click=${() => {\n navigate('board-list')\n return false\n }}\n >home</mwc-icon\n >\n <div board_name>${this.boardName}</div>\n </div>\n `\n }\n\n onTapSave() {\n this.dispatchEvent(new CustomEvent('save-model', { bubbles: true, composed: true, detail: { model: this.model } }))\n }\n\n bindShortcutEvent() {\n // TODO: Global Hotkey에 대한 정의를 edit-toolbar에서 가져올 수 있도록 수정해야 함.\n const GLOBAL_HOTKEYS = ['Digit1', 'Digit2', 'F11', 'KeyD', 'KeyP', 'KeyS']\n\n this.shortcutHandler = (e: KeyboardEvent) => {\n const target = e.composedPath()[0] as HTMLElement\n var tagName = target.tagName\n var isInput = target.isContentEditable || tagName == 'INPUT' || tagName == 'SELECT' || tagName == 'TEXTAREA'\n var isGlobalHotkey = GLOBAL_HOTKEYS.includes(e.code)\n\n if (!isGlobalHotkey && isInput) return\n if (!this.editToolbar.onShortcut(e)) this.onShortcut(e)\n }\n\n document.addEventListener('keydown', this.shortcutHandler)\n }\n\n unbindShortcutEvent() {\n if (this.shortcutHandler) {\n document.removeEventListener('keydown', this.shortcutHandler)\n delete this.shortcutHandler\n }\n }\n\n onContextMenu() {}\n}\n"]}
|
|
@@ -35,8 +35,7 @@ let BoardViewer = class BoardViewer extends LitElement {
|
|
|
35
35
|
console.log('No equipment was found.');
|
|
36
36
|
return;
|
|
37
37
|
}
|
|
38
|
-
components[0]
|
|
39
|
-
components.forEach(component => component.trigger('reaction'));
|
|
38
|
+
window.dispatchEvent(new CustomEvent('clickComponent', { detail: components[0] }));
|
|
40
39
|
(_b = this._scene) === null || _b === void 0 ? void 0 : _b.centerTo(components[0], true /* animated */);
|
|
41
40
|
};
|
|
42
41
|
// 모니터링에서 Movement Data를 보여준다.
|
|
@@ -56,28 +55,23 @@ let BoardViewer = class BoardViewer extends LitElement {
|
|
|
56
55
|
};
|
|
57
56
|
// BoardComponentInfo popup을 보여준다.
|
|
58
57
|
this.clickComponentHandler = (e) => {
|
|
58
|
+
var _a, _b;
|
|
59
59
|
const component = e.detail;
|
|
60
60
|
const { type } = component.state;
|
|
61
|
-
if (this.lastComponent) {
|
|
62
|
-
this.lastComponent.trigger('animatoroff');
|
|
63
|
-
this.lastComponent = null;
|
|
64
|
-
}
|
|
65
61
|
if (type == 'model-layer') {
|
|
62
|
+
(_a = this.lastComponent) === null || _a === void 0 ? void 0 : _a.trigger('deco-border-off');
|
|
63
|
+
// this.lastComponent?.trigger('deco-arrow-reset')
|
|
66
64
|
this.hidePopup();
|
|
67
|
-
component.trigger('reactionreset');
|
|
68
65
|
return;
|
|
69
66
|
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
// lineWidth: 8
|
|
79
|
-
// })
|
|
80
|
-
this.togglePopup(component);
|
|
67
|
+
if ('isLVComponent' in component) {
|
|
68
|
+
(_b = this.lastComponent) === null || _b === void 0 ? void 0 : _b.trigger('deco-border-off');
|
|
69
|
+
// this.lastComponent?.trigger('deco-arrow-reset')
|
|
70
|
+
this.lastComponent = component;
|
|
71
|
+
component.trigger('deco-border', { distance: 8, lineWidth: 4, color: '#f007' });
|
|
72
|
+
// component.trigger('deco-arrow', { color: 'red', animation: true, size: 20 })
|
|
73
|
+
this.togglePopup(component);
|
|
74
|
+
}
|
|
81
75
|
};
|
|
82
76
|
this.fmbStartAnimation = (e) => {
|
|
83
77
|
var _a;
|
|
@@ -93,16 +87,16 @@ let BoardViewer = class BoardViewer extends LitElement {
|
|
|
93
87
|
component.started = true;
|
|
94
88
|
}
|
|
95
89
|
if (decorator) {
|
|
96
|
-
component.trigger('
|
|
97
|
-
component.trigger('icon', decorator);
|
|
90
|
+
component.trigger('deco-icon-off');
|
|
91
|
+
component.trigger('deco-icon', decorator);
|
|
98
92
|
}
|
|
99
93
|
if (border) {
|
|
100
|
-
component.trigger('
|
|
101
|
-
component.trigger('border', border);
|
|
94
|
+
component.trigger('deco-border-off');
|
|
95
|
+
component.trigger('deco-border', border);
|
|
102
96
|
}
|
|
103
97
|
if (arrow) {
|
|
104
|
-
component.trigger('
|
|
105
|
-
component.trigger('
|
|
98
|
+
component.trigger('deco-arrow-off');
|
|
99
|
+
component.trigger('deco-arrow', arrow);
|
|
106
100
|
}
|
|
107
101
|
});
|
|
108
102
|
}
|
|
@@ -113,7 +107,7 @@ let BoardViewer = class BoardViewer extends LitElement {
|
|
|
113
107
|
const { id, type } = target || {};
|
|
114
108
|
if (id) {
|
|
115
109
|
(_a = this._scene) === null || _a === void 0 ? void 0 : _a.findAllById(id).filter(component => !type || component.getState('type') == type).forEach(component => {
|
|
116
|
-
component.trigger('
|
|
110
|
+
component.trigger('deco-off');
|
|
117
111
|
component.resetAnimation();
|
|
118
112
|
component.setState('animation', {
|
|
119
113
|
oncreate: null
|
|
@@ -123,7 +117,7 @@ let BoardViewer = class BoardViewer extends LitElement {
|
|
|
123
117
|
};
|
|
124
118
|
this.fmbResetAnimation = () => {
|
|
125
119
|
var _a;
|
|
126
|
-
(_a = this._scene) === null || _a === void 0 ? void 0 : _a.root.trigger('
|
|
120
|
+
(_a = this._scene) === null || _a === void 0 ? void 0 : _a.root.trigger('deco-reset');
|
|
127
121
|
};
|
|
128
122
|
}
|
|
129
123
|
render() {
|
|
@@ -251,13 +245,8 @@ let BoardViewer = class BoardViewer extends LitElement {
|
|
|
251
245
|
},
|
|
252
246
|
style: this.board.style,
|
|
253
247
|
mode: SCENE_MODE.VIEW,
|
|
254
|
-
handlers: ['mcs-event-handler', 'zoom-handler', 'shift-handler', '
|
|
255
|
-
layers: [
|
|
256
|
-
{ type: 'decotag-layer' },
|
|
257
|
-
{ type: 'reaction-layer' },
|
|
258
|
-
{ type: 'scroll-layer' },
|
|
259
|
-
{ type: 'movement-layer', id: 'movement-layer' }
|
|
260
|
-
],
|
|
248
|
+
handlers: ['mcs-event-handler', 'zoom-handler', 'shift-handler', 'waypoint-handler'],
|
|
249
|
+
layers: [{ type: 'decorator-layer' }, { type: 'scroll-layer' }, { type: 'movement-layer', id: 'movement-layer' }],
|
|
261
250
|
refProvider: this.provider,
|
|
262
251
|
dataStorage: this.board.id !== 'preview' ? new DataStorage(this.board.id) : undefined,
|
|
263
252
|
dataSubscriptionProvider: isRestfulAvailable() ? undefined : new DataSubscriptionProviderImpl()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ox-board-viewer.js","sourceRoot":"","sources":["../../src/ox-board-viewer.ts"],"names":[],"mappings":";AAAA,OAAO,mBAAmB,CAAA;AAC1B,OAAO,oBAAoB,CAAA;AAC3B,OAAO,4BAA4B,CAAA;AACnC,OAAO,8BAA8B,CAAA;AACrC,OAAO,qCAAqC,CAAA;AAE5C,OA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CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CAA0C;AACzC;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yCAAU;AACT;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;2CAAY;AAEmC;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;2CAA4B;AAC3B;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;AA5GpC,WAAW;IADvB,aAAa,CAAC,iBAAiB,CAAC;GACpB,WAAW,CAorBvB","sourcesContent":["import '@material/mwc-fab'\nimport '@material/mwc-icon'\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 } 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 */\n mwc-icon {\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 --mdc-icon-size: 3em;\n }\n\n mwc-icon[hidden] {\n display: none;\n }\n\n mwc-icon: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 }\n\n @media print {\n mwc-fab,\n mwc-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: Scene | null = 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\n private lastComponent: Component | null = null\n\n render() {\n var fullscreen =\n !isIOS() && !this.hideFullscreen\n ? html`\n <mwc-fab\n id=\"fullscreen\"\n .icon=${document.fullscreenElement ? 'fullscreen_exit' : 'fullscreen'}\n @click=${(e: Event) => this.onTapFullscreen()}\n @mouseover=${(e: Event) => this.transientShowButtons(true)}\n @mouseout=${(e: Event) => this.transientShowButtons()}\n title=\"fullscreen\"\n ></mwc-fab>\n `\n : html``\n\n var prev = !this.hideNavigation\n ? html`\n <mwc-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</mwc-icon\n >\n `\n : html``\n\n var next = !this.hideNavigation\n ? html`\n <mwc-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</mwc-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 components[0].trigger('reactionreset')\n components.forEach(component => component.trigger('reaction'))\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 // BoardComponentInfo popup을 보여준다.\n clickComponentHandler = (e: Event) => {\n const component = (e as CustomEvent).detail\n const { type } = component.state\n\n if (this.lastComponent) {\n this.lastComponent.trigger('animatoroff')\n this.lastComponent = null\n }\n\n if (type == 'model-layer') {\n this.hidePopup()\n component.trigger('reactionreset')\n return\n }\n\n this.lastComponent = component\n\n /* reaction reset */\n component.trigger('reactionreset')\n component.trigger('reaction', { decorator: 'bouncing-arrow', animation: false, color: 'red' })\n\n /* border effect */\n // component.trigger('border', {\n // distance: 8,\n // color: '#f007',\n // lineWidth: 8\n // })\n\n this.togglePopup(component)\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 => !type || component.getState('type') == type)\n .forEach(component => {\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('animatoroff')\n component.trigger('icon', decorator)\n }\n\n if (border) {\n component.trigger('animatoroff')\n component.trigger('border', border)\n }\n\n if (arrow) {\n component.trigger('animatoroff')\n component.trigger('bouncing', 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 => !type || component.getState('type') == type)\n .forEach(component => {\n component.trigger('animatoroff')\n component.resetAnimation()\n component.setState('animation', {\n oncreate: null\n })\n })\n }\n }\n\n fmbResetAnimation = () => {\n this._scene?.root.trigger('animatorreset')\n }\n\n connectedCallback() {\n super.connectedCallback()\n\n window.addEventListener('resize', () => {\n this._scene && this._scene.fit()\n })\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 disconnectedCallback() {\n super.disconnectedCallback()\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 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', 'animator-handler', 'waypoint-handler'],\n layers: [\n { type: 'decotag-layer' },\n { type: 'reaction-layer' },\n { type: 'scroll-layer' },\n { type: 'movement-layer', id: 'movement-layer' }\n ],\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 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 }\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 }\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 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 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 delete this.popup\n }\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ox-board-viewer.js","sourceRoot":"","sources":["../../src/ox-board-viewer.ts"],"names":[],"mappings":";AAAA,OAAO,mBAAmB,CAAA;AAC1B,OAAO,oBAAoB,CAAA;AAC3B,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,EAAE,MAAM,wBAAwB,CAAA;AAChG,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,E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vB;IAAf,KAAK,CAAC,OAAO,CAAC;0CAAoB;AACnB;IAAf,KAAK,CAAC,OAAO,CAAC;0CAAoB;AACb;IAArB,KAAK,CAAC,aAAa,CAAC;gDAA0B;AA5GpC,WAAW;IADvB,aAAa,CAAC,iBAAiB,CAAC;GACpB,WAAW,CAuqBvB","sourcesContent":["import '@material/mwc-fab'\nimport '@material/mwc-icon'\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 } 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 */\n mwc-icon {\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 --mdc-icon-size: 3em;\n }\n\n mwc-icon[hidden] {\n display: none;\n }\n\n mwc-icon: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 }\n\n @media print {\n mwc-fab,\n mwc-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: Scene | null = 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\n private lastComponent: Component | null = null\n\n render() {\n var fullscreen =\n !isIOS() && !this.hideFullscreen\n ? html`\n <mwc-fab\n id=\"fullscreen\"\n .icon=${document.fullscreenElement ? 'fullscreen_exit' : 'fullscreen'}\n @click=${(e: Event) => this.onTapFullscreen()}\n @mouseover=${(e: Event) => this.transientShowButtons(true)}\n @mouseout=${(e: Event) => this.transientShowButtons()}\n title=\"fullscreen\"\n ></mwc-fab>\n `\n : html``\n\n var prev = !this.hideNavigation\n ? html`\n <mwc-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</mwc-icon\n >\n `\n : html``\n\n var next = !this.hideNavigation\n ? html`\n <mwc-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</mwc-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 // 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 => !type || component.getState('type') == type)\n .forEach(component => {\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 => !type || component.getState('type') == type)\n .forEach(component => {\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', () => {\n this._scene && this._scene.fit()\n })\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 disconnectedCallback() {\n super.disconnectedCallback()\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 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: 'decorator-layer' }, { 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 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 }\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 }\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 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 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 delete this.popup\n }\n }\n}\n"]}
|