@fmsim/board 1.0.65 → 1.0.69
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 +646 -637
- package/dist/src/modeller/property-sidebar/effects/property-event-tap.js +2 -0
- package/dist/src/modeller/property-sidebar/effects/property-event-tap.js.map +1 -1
- package/dist/src/ox-board-viewer.d.ts +2 -0
- package/dist/src/ox-board-viewer.js +14 -0
- package/dist/src/ox-board-viewer.js.map +1 -1
- package/dist/src/selector/ox-board-selector.d.ts +0 -2
- package/dist/src/selector/ox-board-selector.js +5 -26
- package/dist/src/selector/ox-board-selector.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
|
@@ -29,6 +29,8 @@ export class PropertyEventTap extends LitElement {
|
|
|
29
29
|
<option value="link-move">move to target link</option>
|
|
30
30
|
<option value="data-toggle">toggle data</option>
|
|
31
31
|
<option value="legend-toggle">toggle legend</option>
|
|
32
|
+
<option value="popup">popup target board</option>
|
|
33
|
+
<option value="modal-popup">modal popup target board</option>
|
|
32
34
|
</select>
|
|
33
35
|
|
|
34
36
|
<label> <ox-i18n msgid="label.target">target</ox-i18n> </label>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"property-event-tap.js","sourceRoot":"","sources":["../../../../../src/modeller/property-sidebar/effects/property-event-tap.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,OAAO,iCAAiC,CAAA;AACxC,OAAO,0BAA0B,CAAA;AAEjC,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AACtC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAInD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAE3C,MAAM,OAAO,gBAAiB,SAAQ,UAAU;IAAhD;;QAMW,eAAU,GAA6C,EAAE,CAAA;
|
|
1
|
+
{"version":3,"file":"property-event-tap.js","sourceRoot":"","sources":["../../../../../src/modeller/property-sidebar/effects/property-event-tap.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,OAAO,iCAAiC,CAAA;AACxC,OAAO,0BAA0B,CAAA;AAEjC,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AACtC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAInD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAE3C,MAAM,OAAO,gBAAiB,SAAQ,UAAU;IAAhD;;QAMW,eAAU,GAA6C,EAAE,CAAA;IAwEpE,CAAC;IAtEC,KAAK,CAAC,YAAY;QAChB,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,QAAQ,EAAE,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA;IAC5E,CAAC;IAED,MAAM;QACJ,IAAI,EAAE,MAAM,EAAE,MAAM,GAAG,EAAE,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,KAAK,IAAI,EAAE,CAAA;QAEvD,OAAO,IAAI,CAAA;kFACmE,OAAO;;;;0DAI/B,MAAM,IAAI,EAAE;;;;;;;;;;;yCAW7B,MAAM,iBAAiB,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC;KACtF,CAAA;IACH,CAAC;IAED,cAAc,CAAC,MAAc;QAC3B,QAAQ,MAAM,EAAE,CAAC;YACf,KAAK,WAAW,CAAC;YACjB,KAAK,WAAW;gBACd,OAAO,0BAA0B,CAAA;YACnC;gBACE,OAAO,EAAE,CAAA;QACb,CAAC;IACH,CAAC;IAED,cAAc,CAAC,CAAQ;QACrB,IAAI,OAAO,GAAG,CAAC,CAAC,MAAqB,CAAA;QACrC,IAAI,GAAG,GAAG,OAAO,CAA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yright © HatioLab Inc. All rights reserved.\n */\n\nimport '@operato/input/ox-input-data.js'\nimport '@operato/i18n/ox-i18n.js'\n\nimport { html, LitElement } from 'lit'\nimport { property, state } from 'lit/decorators.js'\n\nimport { Properties, Scene } from '@hatiolab/things-scene'\n\nimport { EffectsSharedStyle } from './effects-shared-style'\nimport { convert } from './value-converter'\n\nexport class PropertyEventTap extends LitElement {\n static styles = [EffectsSharedStyle]\n\n @property({ type: Object }) value?: Properties\n @property({ type: Object }) scene?: Scene\n\n @state() targetList: { value: string; description: string }[] = []\n\n async firstUpdated() {\n this.renderRoot.addEventListener('change', this._onValueChange.bind(this))\n }\n\n render() {\n var { action, target = '', pressed } = this.value || {}\n\n return html`\n <input id=\"checkbox-pressed\" type=\"checkbox\" value-key=\"pressed\" .checked=${pressed} />\n <label for=\"checkbox-pressed\" class=\"checkbox-label\"> <ox-i18n msgid=\"label.pressed\">pressed</ox-i18n> </label>\n\n <label> <ox-i18n msgid=\"label.action\">action</ox-i18n> </label>\n <select id=\"tap-select\" value-key=\"action\" .value=${action || ''}>\n <option value=\"\"></option>\n <option value=\"link-open\">open new window for target link</option>\n <option value=\"link-move\">move to target link</option>\n <option value=\"data-toggle\">toggle data</option>\n <option value=\"legend-toggle\">toggle legend</option>\n <option value=\"popup\">popup target board</option>\n <option value=\"modal-popup\">modal popup target board</option>\n </select>\n\n <label> <ox-i18n msgid=\"label.target\">target</ox-i18n> </label>\n <input value-key=\"target\" .value=${target} .placeholder=${this._getPlaceHoder(action)} />\n `\n }\n\n _getPlaceHoder(action: string) {\n switch (action) {\n case 'link-open':\n case 'link-move':\n return 'http://www.hatiolab.com/'\n default:\n return ''\n }\n }\n\n _onValueChange(e: Event) {\n var element = e.target as HTMLElement\n var key = element.getAttribute('value-key')\n\n if (!key) {\n return\n }\n\n if (key === 'input' || key === 'output') {\n var { options = {} } = this.value || {}\n\n this.value = {\n ...this.value,\n options: {\n ...options,\n [key]: convert(element)\n }\n }\n } else {\n this.value = {\n ...this.value,\n [key]: convert(element)\n }\n }\n\n var { action } = this.value\n if (action !== 'goto' && !action?.includes('popup')) {\n /* clear unused options */\n delete this.value.options\n }\n\n this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }))\n }\n}\n"]}
|
|
@@ -68,6 +68,8 @@ export declare class BoardViewer extends LitElement {
|
|
|
68
68
|
onStartScenario(scenario: string, value: string | number | object, component: Component): Promise<void>;
|
|
69
69
|
onRunScenario(scenario: string, value: string | number | object, component: Component): Promise<void>;
|
|
70
70
|
onLegendToggle(): void;
|
|
71
|
+
onPopup(component: Component): void;
|
|
72
|
+
onModalPopup(component: Component): void;
|
|
71
73
|
getSceneData(): object | undefined;
|
|
72
74
|
getSceneValues(): object | undefined;
|
|
73
75
|
togglePopup(component: Component): void;
|
|
@@ -492,6 +492,20 @@ let BoardViewer = class BoardViewer extends LitElement {
|
|
|
492
492
|
}
|
|
493
493
|
legendLayer.hidden = !legendLayer.hidden;
|
|
494
494
|
}
|
|
495
|
+
onPopup(component) {
|
|
496
|
+
if (this._scene) {
|
|
497
|
+
this._scene.target = null;
|
|
498
|
+
this._scene.target = this._target;
|
|
499
|
+
}
|
|
500
|
+
// this.togglePopup(component)
|
|
501
|
+
}
|
|
502
|
+
onModalPopup(component) {
|
|
503
|
+
if (this._scene) {
|
|
504
|
+
this._scene.target = null;
|
|
505
|
+
this._scene.target = this._target;
|
|
506
|
+
}
|
|
507
|
+
// this.togglePopup(component)
|
|
508
|
+
}
|
|
495
509
|
getSceneData() {
|
|
496
510
|
var _a;
|
|
497
511
|
return (_a = this._scene) === null || _a === void 0 ? void 0 : _a.data;
|
|
@@ -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,qCAAq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AAuB;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,CAwsBvB","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 // 모니터링에서 범례를 보여준다.\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 // 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 window.addEventListener('fmbShowLegend', this.fmbShowLegendHandler)\n window.addEventListener('fmbHideLegend', this.fmbHideLegendHandler)\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 this._scene!.on('legend-toggle', this.onLegendToggle, 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 }\n\n transientShowButtons(stop?: boolean) {\n var buttons = []\n !this.hideNavigation && buttons.push(this._next, this._prev)\n !this.hideFullscreen && buttons.push(this._fullscreen)\n\n if (buttons.length == 0) {\n return\n }\n\n if (!this._fade_animations) {\n this._fade_animations = buttons\n .filter(button => button)\n .map(button => {\n let animation = button.animate(\n [\n {\n opacity: 1,\n easing: 'ease-in'\n },\n { opacity: 0 }\n ],\n { delay: 1000, duration: 2000 }\n )\n\n animation.onfinish = () => {\n button.setAttribute('hidden', '')\n }\n\n return animation\n })\n }\n\n this._forward.length <= 0 ? this._next.setAttribute('hidden', '') : this._next.removeAttribute('hidden')\n this._backward.length <= 0 ? this._prev.setAttribute('hidden', '') : this._prev.removeAttribute('hidden')\n this._fullscreen && this._fullscreen.removeAttribute('hidden')\n\n this._fade_animations.forEach(animation => {\n animation.cancel()\n if (stop) return\n\n animation.play()\n })\n }\n\n /* event handlers */\n\n onTapNext() {\n var { id, scene } = this._forward.pop() || {}\n if (!scene) return\n\n if (this._scene) {\n this._scene.target = null\n /* 원래의 target에 되돌린다. */\n this._scene!.target = this._oldtarget\n this.unbindSceneEvents(this._scene)\n this._backward.push({ id: id!, scene: this._scene })\n }\n\n this.setupScene({ id: id!, scene })\n }\n\n onTapPrev() {\n var { id, scene } = this._backward.pop() || {}\n if (!scene) return\n\n if (this._scene) {\n this._scene.target = null\n /* 원래의 target에 되돌린다. */\n this._scene.target = this._oldtarget\n this.unbindSceneEvents(this._scene)\n this._forward.push({ id: id!, scene: this._scene })\n }\n\n this.setupScene({ id: id!, scene })\n }\n\n onTapFullscreen() {\n togglefullscreen(\n this,\n () => this.requestUpdate(),\n () => this.requestUpdate()\n )\n }\n\n onRunBoard() {\n this.dispatchEvent(new CustomEvent('run-board', { bubbles: true, composed: true, detail: this.board.id }))\n }\n\n onLinkGoto(targetBoardId: string, options: any, fromComponent: any) {\n const { input, output } = options || { input: '(self)' }\n const data = input && fromComponent.root.findFirst(input, fromComponent)?.data\n this.showScene(targetBoardId, data)\n }\n\n onLinkOpen(url: string, value: any, fromComponent: Component) {\n if (!url) {\n return\n }\n\n try {\n window.open(url)\n } catch (ex) {\n document.dispatchEvent(\n new CustomEvent('notify', {\n detail: {\n level: 'error',\n message: ex,\n ex\n }\n })\n )\n }\n }\n\n onLinkMove(url: string, value: any, fromComponent: Component) {\n if (!url) return\n\n location.href = url\n }\n\n onRoutePage(page: string) {\n if (!page) {\n return\n }\n\n history.pushState({}, '', page)\n window.dispatchEvent(new Event('popstate'))\n }\n\n async onStartScenario(scenario: string, value: string | number | object, component: Component) {\n try {\n await startScenario(scenario, scenario, value)\n } catch (e) {\n console.error(e)\n }\n }\n\n async onRunScenario(scenario: string, value: string | number | object, component: Component) {\n try {\n component.data = await runScenario(scenario, value)\n } catch (e) {\n console.error(e)\n }\n }\n\n onLegendToggle() {\n const legendLayer = this._scene?.findById(`legend`)\n if (!legendLayer) {\n return\n }\n\n legendLayer.hidden = !legendLayer.hidden\n }\n\n 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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AAE,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,CA0tBvB","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 // 모니터링에서 범례를 보여준다.\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 // 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 window.addEventListener('fmbShowLegend', this.fmbShowLegendHandler)\n window.addEventListener('fmbHideLegend', this.fmbHideLegendHandler)\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 this._scene!.on('legend-toggle', this.onLegendToggle, 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 }\n\n transientShowButtons(stop?: boolean) {\n var buttons = []\n !this.hideNavigation && buttons.push(this._next, this._prev)\n !this.hideFullscreen && buttons.push(this._fullscreen)\n\n if (buttons.length == 0) {\n return\n }\n\n if (!this._fade_animations) {\n this._fade_animations = buttons\n .filter(button => button)\n .map(button => {\n let animation = button.animate(\n [\n {\n opacity: 1,\n easing: 'ease-in'\n },\n { opacity: 0 }\n ],\n { delay: 1000, duration: 2000 }\n )\n\n animation.onfinish = () => {\n button.setAttribute('hidden', '')\n }\n\n return animation\n })\n }\n\n this._forward.length <= 0 ? this._next.setAttribute('hidden', '') : this._next.removeAttribute('hidden')\n this._backward.length <= 0 ? this._prev.setAttribute('hidden', '') : this._prev.removeAttribute('hidden')\n this._fullscreen && this._fullscreen.removeAttribute('hidden')\n\n this._fade_animations.forEach(animation => {\n animation.cancel()\n if (stop) return\n\n animation.play()\n })\n }\n\n /* event handlers */\n\n onTapNext() {\n var { id, scene } = this._forward.pop() || {}\n if (!scene) return\n\n if (this._scene) {\n this._scene.target = null\n /* 원래의 target에 되돌린다. */\n this._scene!.target = this._oldtarget\n this.unbindSceneEvents(this._scene)\n this._backward.push({ id: id!, scene: this._scene })\n }\n\n this.setupScene({ id: id!, scene })\n }\n\n onTapPrev() {\n var { id, scene } = this._backward.pop() || {}\n if (!scene) return\n\n if (this._scene) {\n this._scene.target = null\n /* 원래의 target에 되돌린다. */\n this._scene.target = this._oldtarget\n this.unbindSceneEvents(this._scene)\n this._forward.push({ id: id!, scene: this._scene })\n }\n\n this.setupScene({ id: id!, scene })\n }\n\n onTapFullscreen() {\n togglefullscreen(\n this,\n () => this.requestUpdate(),\n () => this.requestUpdate()\n )\n }\n\n onRunBoard() {\n this.dispatchEvent(new CustomEvent('run-board', { bubbles: true, composed: true, detail: this.board.id }))\n }\n\n onLinkGoto(targetBoardId: string, options: any, fromComponent: any) {\n const { input, output } = options || { input: '(self)' }\n const data = input && fromComponent.root.findFirst(input, fromComponent)?.data\n this.showScene(targetBoardId, data)\n }\n\n onLinkOpen(url: string, value: any, fromComponent: Component) {\n if (!url) {\n return\n }\n\n try {\n window.open(url)\n } catch (ex) {\n document.dispatchEvent(\n new CustomEvent('notify', {\n detail: {\n level: 'error',\n message: ex,\n ex\n }\n })\n )\n }\n }\n\n onLinkMove(url: string, value: any, fromComponent: Component) {\n if (!url) return\n\n location.href = url\n }\n\n onRoutePage(page: string) {\n if (!page) {\n return\n }\n\n history.pushState({}, '', page)\n window.dispatchEvent(new Event('popstate'))\n }\n\n async onStartScenario(scenario: string, value: string | number | object, component: Component) {\n try {\n await startScenario(scenario, scenario, value)\n } catch (e) {\n console.error(e)\n }\n }\n\n async onRunScenario(scenario: string, value: string | number | object, component: Component) {\n try {\n component.data = await runScenario(scenario, value)\n } catch (e) {\n console.error(e)\n }\n }\n\n onLegendToggle() {\n const legendLayer = this._scene?.findById(`legend`)\n if (!legendLayer) {\n return\n }\n\n legendLayer.hidden = !legendLayer.hidden\n }\n\n onPopup(component: Component) {\n if (this._scene) {\n this._scene.target = null\n this._scene.target = this._target\n }\n\n // this.togglePopup(component)\n }\n\n onModalPopup(component: Component) {\n if (this._scene) {\n this._scene.target = null\n this._scene.target = this._target\n }\n\n // this.togglePopup(component)\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,6 +1,5 @@
|
|
|
1
1
|
import './ox-board-creation-card';
|
|
2
2
|
import { LitElement, PropertyValues } from 'lit';
|
|
3
|
-
import { InheritedValueType } from '@operato/shell';
|
|
4
3
|
declare const BoardSelector_base: (new (...args: any[]) => {
|
|
5
4
|
_infiniteScrollOptions: {
|
|
6
5
|
threshold: number;
|
|
@@ -20,7 +19,6 @@ export declare class BoardSelector extends BoardSelector_base {
|
|
|
20
19
|
}[];
|
|
21
20
|
boards: any[];
|
|
22
21
|
group?: string;
|
|
23
|
-
inherited?: InheritedValueType;
|
|
24
22
|
creatable: boolean;
|
|
25
23
|
value?: string;
|
|
26
24
|
private _page;
|
|
@@ -5,7 +5,6 @@ import { customElement, property } from 'lit/decorators.js';
|
|
|
5
5
|
import { i18next, localize } from '@operato/i18n';
|
|
6
6
|
import { ScrollbarStyles } from '@operato/styles';
|
|
7
7
|
import InfiniteScrollable from '@operato/utils/mixins/infinite-scrollable.js';
|
|
8
|
-
import { InheritedValueType } from '@operato/shell';
|
|
9
8
|
import { createBoard, fetchBoardList, fetchGroupList } from '@fmsim/api';
|
|
10
9
|
let BoardSelector = class BoardSelector extends InfiniteScrollable(localize(i18next)(LitElement)) {
|
|
11
10
|
static get styles() {
|
|
@@ -98,7 +97,7 @@ let BoardSelector = class BoardSelector extends InfiniteScrollable(localize(i18n
|
|
|
98
97
|
super();
|
|
99
98
|
this.groups = [];
|
|
100
99
|
this.boards = [];
|
|
101
|
-
|
|
100
|
+
// @property({ type: String }) inherited?: InheritedValueType = InheritedValueType.Include
|
|
102
101
|
this.creatable = false;
|
|
103
102
|
this._page = 1;
|
|
104
103
|
this._total = 0;
|
|
@@ -121,22 +120,6 @@ let BoardSelector = class BoardSelector extends InfiniteScrollable(localize(i18n
|
|
|
121
120
|
${this.groups.map(group => html ` <option value=${group.id}>${group.description}</option> `)}
|
|
122
121
|
</select>
|
|
123
122
|
</div>
|
|
124
|
-
|
|
125
|
-
<div>
|
|
126
|
-
<label for="inherited">Inherited</label>
|
|
127
|
-
<select
|
|
128
|
-
id="inherited"
|
|
129
|
-
@change=${(e) => {
|
|
130
|
-
var _a;
|
|
131
|
-
this.inherited = (_a = e.currentTarget) === null || _a === void 0 ? void 0 : _a.value;
|
|
132
|
-
this.requestUpdate();
|
|
133
|
-
}}
|
|
134
|
-
>
|
|
135
|
-
<option value="Include">Include</option>
|
|
136
|
-
<option value="Only">Only</option>
|
|
137
|
-
<option value="None">None</option>
|
|
138
|
-
</select>
|
|
139
|
-
</div>
|
|
140
123
|
</div>
|
|
141
124
|
|
|
142
125
|
<div
|
|
@@ -175,7 +158,7 @@ let BoardSelector = class BoardSelector extends InfiniteScrollable(localize(i18n
|
|
|
175
158
|
this.refreshGroups();
|
|
176
159
|
}
|
|
177
160
|
async updated(changed) {
|
|
178
|
-
if (changed.has('group')
|
|
161
|
+
if (changed.has('group')) {
|
|
179
162
|
this.refreshBoards();
|
|
180
163
|
}
|
|
181
164
|
}
|
|
@@ -194,8 +177,7 @@ let BoardSelector = class BoardSelector extends InfiniteScrollable(localize(i18n
|
|
|
194
177
|
this.refreshBoards();
|
|
195
178
|
}
|
|
196
179
|
async refreshGroups() {
|
|
197
|
-
const groups = await fetchGroupList();
|
|
198
|
-
this.groups = [...groups];
|
|
180
|
+
const groups = (await fetchGroupList()).groups.items;
|
|
199
181
|
this.group = groups.filter((group) => group.id == this.group).length > 0 ? this.group : '';
|
|
200
182
|
}
|
|
201
183
|
async refreshBoards() {
|
|
@@ -227,8 +209,8 @@ let BoardSelector = class BoardSelector extends InfiniteScrollable(localize(i18n
|
|
|
227
209
|
var variables = {
|
|
228
210
|
filters,
|
|
229
211
|
sortings,
|
|
230
|
-
pagination
|
|
231
|
-
inherited: this.inherited || InheritedValueType.Include
|
|
212
|
+
pagination
|
|
213
|
+
// inherited: this.inherited || InheritedValueType.Include
|
|
232
214
|
};
|
|
233
215
|
const boardList = await fetchBoardList(variables);
|
|
234
216
|
this._total = boardList.boards.total;
|
|
@@ -259,9 +241,6 @@ __decorate([
|
|
|
259
241
|
__decorate([
|
|
260
242
|
property({ type: String })
|
|
261
243
|
], BoardSelector.prototype, "group", void 0);
|
|
262
|
-
__decorate([
|
|
263
|
-
property({ type: String })
|
|
264
|
-
], BoardSelector.prototype, "inherited", void 0);
|
|
265
244
|
__decorate([
|
|
266
245
|
property({ type: Boolean })
|
|
267
246
|
], BoardSelector.prototype, "creatable", void 0);
|
|
@@ -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,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AACnD,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;SACF,CAAA;IACH,CAAC;IAYD;QACE,KAAK,EAAE,CAAA;QAXkB,WAAM,GAAwD,EAAE,CAAA;QAChE,WAAM,GAAU,EAAE,CAAA;QAEjB,cAAS,GAAwB,kBAAkB,CAAC,OAAO,CAAA;QAC1D,cAAS,GAAY,KAAK,CAAA;QAG/C,UAAK,GAAW,CAAC,CAAA;QACjB,WAAM,GAAW,CAAC,CAAA;QAKxB,IAAI,CAAC,sBAAsB,CAAC,KAAK,GAAG,EAAE,CAAA;IACxC,CAAC;IAED,MAAM;QACJ,OA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G,IAAI,CAAA;QAEjB,OAAO,SAAS,CAAC,MAAM,CAAC,KAAK,CAAA;IAC/B,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,IAAY,EAAE,WAAmB,EAAE,OAAe;QAClE,IAAI,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC;YACzB,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;AAxL4B;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;AACd;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;gDAA4D;AAC1D;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;gDAA2B;AAC3B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4CAAe;AA7F/B,aAAa;IADzB,aAAa,CAAC,mBAAmB,CAAC;GACtB,aAAa,CAgRzB","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 { InheritedValueType } from '@operato/shell'\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\n <div>\n <label for=\"inherited\">Inherited</label>\n <select\n id=\"inherited\"\n @change=${(e: Event) => {\n this.inherited = (e.currentTarget as any)?.value\n this.requestUpdate()\n }}\n >\n <option value=\"Include\">Include</option>\n <option value=\"Only\">Only</option>\n <option value=\"None\">None</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') || changed.has('inherited')) {\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 var { name, description, groupId } = e.detail\n\n await this.createBoard(name, description, groupId)\n this.refreshBoards()\n }\n\n async refreshGroups() {\n const groups = await fetchGroupList()\n\n this.groups = [...groups]\n\n this.group = groups.filter((group: { id: string }) => group.id == this.group).length > 0 ? this.group : ''\n }\n\n async refreshBoards() {\n var boards = await this.getBoards()\n this.boards = [...boards]\n\n var creationCard = this.renderRoot.querySelector('ox-board-creation-card')\n if (creationCard) {\n ;(creationCard as any).reset()\n }\n }\n\n async appendBoards() {\n var 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 var filters = []\n var sortings = [] as any[]\n var 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 var variables = {\n filters,\n sortings,\n pagination,\n inherited: this.inherited || InheritedValueType.Include\n }\n\n const boardList = await fetchBoardList(variables)\n\n this._total = boardList.boards.total\n this._page = page\n\n return boardList.boards.items\n }\n\n async createBoard(name: string, description: string, groupId: string) {\n var 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;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;;;;;;;;;;;;;;;;;;;;;;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AC,CAAA;QAEjD,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC,MAAM,CAAC,KAAK,CAAA;QACpC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAA;QAEjB,OAAO,SAAS,CAAC,MAAM,CAAC,KAAK,CAAA;IAC/B,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,IAAY,EAAE,WAAmB,EAAE,OAAe;QAClE,IAAI,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC;YACzB,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;AAvK4B;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;AA7F/B,aAAa;IADzB,aAAa,CAAC,mBAAmB,CAAC;GACtB,aAAa,CA+PzB","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 var { name, description, groupId } = e.detail\n\n await this.createBoard(name, description, groupId)\n this.refreshBoards()\n }\n\n async refreshGroups() {\n const groups = (await fetchGroupList()).groups.items\n\n this.group = groups.filter((group: { id: string }) => group.id == this.group).length > 0 ? this.group : ''\n }\n\n async refreshBoards() {\n var boards = await this.getBoards()\n this.boards = [...boards]\n\n var creationCard = this.renderRoot.querySelector('ox-board-creation-card')\n if (creationCard) {\n ;(creationCard as any).reset()\n }\n }\n\n async appendBoards() {\n var 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 var filters = []\n var sortings = [] as any[]\n var 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 var variables = {\n filters,\n sortings,\n pagination\n // inherited: this.inherited || InheritedValueType.Include\n }\n\n const boardList = await fetchBoardList(variables)\n\n this._total = boardList.boards.total\n this._page = page\n\n return boardList.boards.items\n }\n\n async createBoard(name: string, description: string, groupId: string) {\n var 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"]}
|