@fmsim/board 0.0.77 → 0.0.78
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 +491 -483
- package/dist/src/modeller/property-sidebar/styles/styles.d.ts +1 -0
- package/dist/src/modeller/property-sidebar/styles/styles.js +19 -10
- package/dist/src/modeller/property-sidebar/styles/styles.js.map +1 -1
- package/dist/src/ox-board-viewer.js +1 -0
- package/dist/src/ox-board-viewer.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
|
@@ -15,6 +15,7 @@ export declare class PropertyStyles extends AbstractProperty {
|
|
|
15
15
|
value: any;
|
|
16
16
|
selected: Component[];
|
|
17
17
|
fonts: any[];
|
|
18
|
+
fontAvailable: boolean;
|
|
18
19
|
firstUpdated(): void;
|
|
19
20
|
render(): import("lit-html").TemplateResult<1>;
|
|
20
21
|
_isLine(selected: Component[]): boolean;
|
|
@@ -10,7 +10,7 @@ import '@operato/app/input/ox-input-fill-style.js';
|
|
|
10
10
|
import '@operato/font/ox-font-selector.js';
|
|
11
11
|
import '@operato/i18n/ox-i18n.js';
|
|
12
12
|
import { css, html } from 'lit';
|
|
13
|
-
import { property } from 'lit/decorators.js';
|
|
13
|
+
import { property, state } from 'lit/decorators.js';
|
|
14
14
|
import { AbstractProperty } from '../abstract-property.js';
|
|
15
15
|
import { PropertySharedStyle } from '../property-shared-style.js';
|
|
16
16
|
export class PropertyStyles extends AbstractProperty {
|
|
@@ -19,8 +19,10 @@ export class PropertyStyles extends AbstractProperty {
|
|
|
19
19
|
this.value = {};
|
|
20
20
|
this.selected = [];
|
|
21
21
|
this.fonts = [];
|
|
22
|
+
this.fontAvailable = false;
|
|
22
23
|
}
|
|
23
24
|
firstUpdated() {
|
|
25
|
+
this.fontAvailable = !sessionStorage.getItem('ThingsFactory-UseExternServer');
|
|
24
26
|
this.renderRoot.addEventListener('change', this._onValueChange.bind(this));
|
|
25
27
|
}
|
|
26
28
|
render() {
|
|
@@ -41,16 +43,20 @@ export class PropertyStyles extends AbstractProperty {
|
|
|
41
43
|
</legend>
|
|
42
44
|
|
|
43
45
|
<div class="property-grid">
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
46
|
+
${this.fontAvailable
|
|
47
|
+
? html `
|
|
48
|
+
<label class="property-full-label">
|
|
49
|
+
<ox-i18n msgid="label.font-family">Font Family</ox-i18n>
|
|
50
|
+
</label>
|
|
47
51
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
<ox-font-selector
|
|
53
|
+
value-key="fontFamily"
|
|
54
|
+
.value=${fontFamily}
|
|
55
|
+
class="property-full-input"
|
|
56
|
+
custom-editor
|
|
57
|
+
></ox-font-selector>
|
|
58
|
+
`
|
|
59
|
+
: html ``}
|
|
54
60
|
|
|
55
61
|
<label class="property-half-label icon-only-label font-size"></label>
|
|
56
62
|
<input type="number" value-key="fontSize" .value=${fontSize} class="property-half-input" />
|
|
@@ -556,4 +562,7 @@ __decorate([
|
|
|
556
562
|
__decorate([
|
|
557
563
|
property({ type: Array })
|
|
558
564
|
], PropertyStyles.prototype, "fonts", void 0);
|
|
565
|
+
__decorate([
|
|
566
|
+
state()
|
|
567
|
+
], PropertyStyles.prototype, "fontAvailable", void 0);
|
|
559
568
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../../src/modeller/property-sidebar/styles/styles.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,OAAO,kDAAkD,CAAA;AACzD,OAAO,qCAAqC,CAAA;AAC5C,OAAO,kCAAkC,CAAA;AACzC,OAAO,kCAAkC,CAAA;AACzC,OAAO,2CAA2C,CAAA;AAClD,OAAO,mCAAmC,CAAA;AAC1C,OAAO,0BAA0B,CAAA;AAEjC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA8SF;CACF,AAjTY,CAiTZ;AAC2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CAAgB;AAChB;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;gDAA2B;AAC1B;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;6CAAkB","sourcesContent":["/**\n * @license Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport '@polymer/paper-dropdown-menu/paper-dropdown-menu'\nimport '@operato/help/ox-title-with-help.js'\nimport '@operato/input/ox-input-color.js'\nimport '@operato/input/ox-input-range.js'\nimport '@operato/app/input/ox-input-fill-style.js'\nimport '@operato/font/ox-font-selector.js'\nimport '@operato/i18n/ox-i18n.js'\n\nimport { css, html } from 'lit'\nimport { property } from 'lit/decorators.js'\n\nimport { Component } from '@hatiolab/things-scene'\n\nimport { AbstractProperty } from '../abstract-property.js'\nimport { PropertySharedStyle } from '../property-shared-style.js'\n\nexport class PropertyStyles extends AbstractProperty {\n static styles = [\n PropertySharedStyle,\n css`\n ox-input-range {\n width: 100%;\n }\n\n .btn-group {\n height: 24px;\n }\n\n .btn-group paper-button {\n width: 30px;\n height: 24px;\n min-width: initial;\n margin: 0 4px 0 0;\n padding: 0;\n border-radius: 0;\n display: inline-block;\n border-bottom: 2px solid #fff;\n\n background: var(--url-icon-properties) no-repeat;\n background-size: 70%;\n }\n\n .btn-group paper-button.tbold {\n background-position: 50% -170px;\n }\n\n .btn-group paper-button.titalic {\n background-position: 50% -205px;\n }\n\n .btn-group paper-button.tunderline {\n background-position: 50% -240px;\n }\n\n .btn-group paper-button.tstrikethrough {\n background-position: 50% -415px;\n }\n\n .btn-group paper-button[active] {\n border-color: #f2471c;\n }\n\n .line-type paper-listbox {\n overflow: hidden;\n max-width: 100px;\n }\n .line-type paper-item {\n background: var(--url-icon-properties-line-type) 50% 0 no-repeat;\n min-height: 25px;\n padding: 3px 9px;\n width: 80px;\n }\n\n .line-type paper-item.solid {\n background-position: 50% 10px;\n }\n .line-type paper-item.round-dot {\n background-position: 50% -40px;\n }\n .line-type paper-item.square-dot {\n background-position: 50% -90px;\n }\n .line-type paper-item.dash {\n background-position: 50% -140px;\n }\n .line-type paper-item.dash-dot {\n background-position: 50% -190px;\n }\n .line-type paper-item.long-dash {\n background-position: 50% -240px;\n }\n .line-type paper-item.long-dash-dot {\n background-position: 50% -290px;\n }\n .line-type paper-item.long-dash-dot-dot {\n background-position: 50% -340px;\n }\n\n .line-type .paper-input-container input {\n background: var(--url-icon-properties-line-type) 50% 0 no-repeat !important;\n }\n .line-type.solid .paper-input-container input {\n background-position: 50% 5px !important;\n }\n .line-type.round-dot .paper-input-container input {\n background-position: 50% -45px !important;\n }\n .line-type.square-dot .paper-input-container input {\n background-position: 50% -85px !important;\n }\n .line-type.dash .paper-input-container input {\n background-position: 50% -145px !important;\n }\n .line-type.dash-dot .paper-input-container input {\n background-position: 50% -185px !important;\n }\n .line-type.long-dash .paper-input-container input {\n background-position: 50% -245px !important;\n }\n .line-type.long-dash-dot .paper-input-container input {\n background-position: 50% -285px !important;\n }\n .line-type.long-dash-dot-dot .paper-input-container input {\n background-position: 50% -345px !important;\n }\n\n .arrow-type paper-menu {\n overflow: hidden;\n max-width: 140px;\n }\n .arrow-type paper-item {\n background: var(--url-icon-properties-arrow-type) 50% 0 no-repeat;\n min-height: 30px;\n padding: 3px 7px;\n width: 30px;\n float: left;\n }\n .arrow-type paper-item.begin-no {\n background-position: 50% 16px;\n }\n .arrow-type paper-item.begin-arrow {\n background-position: 50% -39px;\n }\n .arrow-type paper-item.begin-open-arrow {\n background-position: 50% -89px;\n }\n .arrow-type paper-item.begin-stealth-arrow {\n background-position: 50% -139px;\n }\n .arrow-type paper-item.begin-diamond-arrow {\n background-position: 50% -190px;\n }\n .arrow-type paper-item.begin-oval-arrow {\n background-position: 50% -238px;\n }\n .arrow-type paper-item.begin-size1 {\n background-position: 50% -286px;\n }\n .arrow-type paper-item.begin-size2 {\n background-position: 50% -336px;\n }\n .arrow-type paper-item.begin-size3 {\n background-position: 50% -386px;\n }\n .arrow-type paper-item.begin-size4 {\n background-position: 50% -436px;\n }\n .arrow-type paper-item.begin-size5 {\n background-position: 50% -486px;\n }\n .arrow-type paper-item.begin-size6 {\n background-position: 50% -536px;\n }\n .arrow-type paper-item.begin-size7 {\n background-position: 50% -589px;\n }\n .arrow-type paper-item.begin-size8 {\n background-position: 50% -639px;\n }\n .arrow-type paper-item.begin-size9 {\n background-position: 50% -689px;\n }\n .arrow-type paper-item.end-no {\n background-position: 50% 16px;\n }\n .arrow-type paper-item.end-arrow {\n background-position: 50% -739px;\n }\n .arrow-type paper-item.end-open-arrow {\n background-position: 50% -789px;\n }\n .arrow-type paper-item.end-stealth-arrow {\n background-position: 50% -839px;\n }\n .arrow-type paper-item.end-diamond-arrow {\n background-position: 50% -890px;\n }\n .arrow-type paper-item.end-oval-arrow {\n background-position: 50% -938px;\n }\n .arrow-type paper-item.end-size1 {\n background-position: 50% -986px;\n }\n .arrow-type paper-item.end-size2 {\n background-position: 50% -1036px;\n }\n .arrow-type paper-item.end-size3 {\n background-position: 50% -1086px;\n }\n .arrow-type paper-item.end-size4 {\n background-position: 50% -1136px;\n }\n .arrow-type paper-item.end-size5 {\n background-position: 50% -1186px;\n }\n .arrow-type paper-item.end-size6 {\n background-position: 50% -1236px;\n }\n .arrow-type paper-item.end-size7 {\n background-position: 50% -1289px;\n }\n .arrow-type paper-item.end-size8 {\n background-position: 50% -1339px;\n }\n .arrow-type paper-item.end-size9 {\n background-position: 50% -1389px;\n }\n\n .arrow-type .paper-input-container input {\n background: var(--url-icon-properties-arrow-type) 110% 0 no-repeat !important;\n }\n .arrow-type.begin-no .paper-input-container input {\n background-position: 110% 5px !important;\n }\n .arrow-type.begin-arrow .paper-input-container input {\n background-position: 110% -50px !important;\n }\n .arrow-type.begin-open-arrow .paper-input-container input {\n background-position: 110% -100px !important;\n }\n .arrow-type.begin-stealth-arrow .paper-input-container input {\n background-position: 110% -150px !important;\n }\n .arrow-type.begin-diamond-arrow .paper-input-container input {\n background-position: 110% -200px !important;\n }\n .arrow-type.begin-oval-arrow .paper-input-container input {\n background-position: 110% -250px !important;\n }\n .arrow-type.begin-size1 .paper-input-container input {\n background-position: 110% -298px !important;\n }\n .arrow-type.begin-size2 .paper-input-container input {\n background-position: 110% -348px !important;\n }\n .arrow-type.begin-size3 .paper-input-container input {\n background-position: 110% -398px !important;\n }\n .arrow-type.begin-size4 .paper-input-container input {\n background-position: 110% -448px !important;\n }\n .arrow-type.begin-size5 .paper-input-container input {\n background-position: 110% -498px !important;\n }\n .arrow-type.begin-size6 .paper-input-container input {\n background-position: 110% -548px !important;\n }\n .arrow-type.begin-size7 .paper-input-container input {\n background-position: 110% -600px !important;\n }\n .arrow-type.begin-size8 .paper-input-container input {\n background-position: 110% -650px !important;\n }\n .arrow-type.begin-size9 .paper-input-container input {\n background-position: 110% -700px !important;\n }\n .arrow-type.end-no .paper-input-container input {\n background-position: 110% 5px !important;\n }\n .arrow-type.end-arrow .paper-input-container input {\n background-position: 110% -750px !important;\n }\n .arrow-type.end-open-arrow .paper-input-container input {\n background-position: 110% -800px !important;\n }\n .arrow-type.end-stealth-arrow .paper-input-container input {\n background-position: 110% -850px !important;\n }\n .arrow-type.end-diamond-arrow .paper-input-container input {\n background-position: 110% -900px !important;\n }\n .arrow-type.end-oval-arrow .paper-input-container input {\n background-position: 110% -950px !important;\n }\n .arrow-type.end-size1 .paper-input-container input {\n background-position: 110% -998px !important;\n }\n .arrow-type.end-size2 .paper-input-container input {\n background-position: 110% -1048px !important;\n }\n .arrow-type.end-size3 .paper-input-container input {\n background-position: 110% -1098px !important;\n }\n .arrow-type.end-size4 .paper-input-container input {\n background-position: 110% -1148px !important;\n }\n .arrow-type.end-size5 .paper-input-container input {\n background-position: 110% -1198px !important;\n }\n .arrow-type.end-size6 .paper-input-container input {\n background-position: 110% -1248px !important;\n }\n .arrow-type.end-size7 .paper-input-container input {\n background-position: 110% -1300px !important;\n }\n .arrow-type.end-size8 .paper-input-container input {\n background-position: 110% -1350px !important;\n }\n .arrow-type.end-size9 .paper-input-container input {\n background-position: 110% -1400px !important;\n }\n `\n ]\n @property({ type: Object }) value: any = {}\n @property({ type: Array }) selected: Component[] = []\n @property({ type: Array }) fonts: any[] = []\n\n firstUpdated() {\n this.renderRoot.addEventListener('change', this._onValueChange.bind(this))\n }\n\n render() {\n var {\n alpha = 1,\n fontFamily,\n fontSize,\n lineHeight,\n fontColor,\n bold,\n italic,\n fillStyle,\n lineWidth,\n strokeStyle,\n lineDash,\n lineCap,\n lineJoin,\n begin,\n beginSize,\n end,\n endSize\n } = this.value || {}\n\n return html`\n <fieldset>\n <legend>\n <ox-title-with-help topic=\"board-modeller/styles/opacity\" msgid=\"label.opacity\">opacity</ox-title-with-help>\n </legend>\n <ox-input-range min=\"0\" max=\"1\" step=\"0.1\" value-key=\"alpha\" .value=${alpha} editable> </ox-input-range>\n </fieldset>\n\n <fieldset>\n <legend>\n <ox-title-with-help topic=\"board-modeller/styles/text-style\" msgid=\"label.text-style\"\n >text style</ox-title-with-help\n >\n </legend>\n\n <div class=\"property-grid\">\n <label class=\"property-full-label\">\n <ox-i18n msgid=\"label.font-family\">Font Family</ox-i18n>\n </label>\n\n <ox-font-selector\n value-key=\"fontFamily\"\n .value=${fontFamily}\n class=\"property-full-input\"\n custom-editor\n ></ox-font-selector>\n\n <label class=\"property-half-label icon-only-label font-size\"></label>\n <input type=\"number\" value-key=\"fontSize\" .value=${fontSize} class=\"property-half-input\" />\n\n <label class=\"property-half-label icon-only-label lineHeight\"></label>\n <input type=\"number\" value-key=\"lineHeight\" .value=${lineHeight} class=\"property-half-input\" />\n\n <label class=\"property-half-label icon-only-label color\"></label>\n <ox-input-color value-key=\"fontColor\" .value=${fontColor} class=\"property-half-input\"> </ox-input-color>\n\n <label class=\"property-half-label\"></label>\n <div class=\"property-half-input btn-group\">\n <paper-button toggles value-key=\"bold\" ?active=${bold} class=\"tbold\"> </paper-button>\n <paper-button toggles value-key=\"italic\" ?active=${italic} class=\"titalic\"> </paper-button>\n </div>\n </div>\n </fieldset>\n\n <fieldset>\n <legend>\n <ox-title-with-help topic=\"board-modeller/styles/fill-style\" msgid=\"label.fill-style\"\n >fill style</ox-title-with-help\n >\n </legend>\n\n <ox-input-fill-style value-key=\"fillStyle\" .value=${fillStyle}> </ox-input-fill-style>\n </fieldset>\n\n <fieldset>\n <legend>\n <ox-title-with-help msgid=\"label.line-style\" topic=\"board-modeller/styles/line-style\"></ox-title-with-help>\n </legend>\n\n <div class=\"property-grid\">\n <label class=\"property-half-label icon-only-label linewidth\"></label>\n <input type=\"number\" value-key=\"lineWidth\" .value=${lineWidth} class=\"property-half-input\" />\n\n <label class=\"property-half-label icon-only-label color\"></label>\n <ox-input-color value-key=\"strokeStyle\" .value=${strokeStyle} class=\"property-half-input\"> </ox-input-color>\n\n <label class=\"property-full-label\">\n <ox-i18n msgid=\"label.line-type\">line type</ox-i18n>\n </label>\n <paper-dropdown-menu no-label-float=\"true\" class=\"property-full-input line-type solid\">\n <!-- solid는 선택된 항목 보여주기위한 class로 하위 paper-item의 class와 동일하게 -->\n <paper-listbox\n value-key=\"lineDash\"\n @selected-changed=${(e: CustomEvent) => this._onValueChange(e)}\n slot=\"dropdown-content\"\n .selected=${lineDash}\n attr-for-selected=\"name\"\n >\n <paper-item class=\"solid\" name=\"solid\"></paper-item>\n <paper-item class=\"round-dot\" name=\"round-dot\"></paper-item>\n <paper-item class=\"square-dot\" name=\"square-dot\"></paper-item>\n <paper-item class=\"dash\" name=\"dash\"></paper-item>\n <paper-item class=\"dash-dot\" name=\"dash-dot\"></paper-item>\n <paper-item class=\"long-dash\" name=\"long-dash\"></paper-item>\n <paper-item class=\"long-dash-dot\" name=\"long-dash-dot\"></paper-item>\n <paper-item class=\"long-dash-dot-dot\" name=\"long-dash-dot-dot\"></paper-item>\n </paper-listbox>\n </paper-dropdown-menu>\n\n <label class=\"property-full-label\">\n <ox-i18n msgid=\"label.cap-type\">cap type</ox-i18n>\n </label>\n <select class=\"property-full-input select-content\" value-key=\"lineCap\" .value=${lineCap}>\n <option value=\"butt\"><ox-i18n msgid=\"label.square\">square</ox-i18n></option>\n <option value=\"round\"><ox-i18n msgid=\"label.round\">round</ox-i18n></option>\n </select>\n\n <label class=\"property-full-label\">\n <ox-i18n msgid=\"label.join-type\">join type</ox-i18n>\n </label>\n <select class=\"property-full-input select-content\" value-key=\"lineJoin\" .value=${lineJoin}>\n <option value=\"miter\"><ox-i18n msgid=\"label.miter\">miter</ox-i18n></option>\n <option value=\"round\"><ox-i18n msgid=\"label.round\">round</ox-i18n></option>\n <option value=\"bevel\"><ox-i18n msgid=\"label.bevel\">bevel</ox-i18n></option>\n </select>\n\n ${this._isLine(this.selected)\n ? html`\n <label class=\"property-full-label\">\n <ox-i18n msgid=\"label.begin-type\">begin type</ox-i18n>\n </label>\n <paper-dropdown-menu no-label-float=\"true\" class=\"property-full-input arrow-type begin-no\">\n <!-- begin-no는 선택된 항목 보여주기위한 class로 하위 paper-item의 class와 동일하게 -->\n <paper-listbox\n value-key=\"begin\"\n @selected-changed=${(e: CustomEvent) => this._onValueChange(e)}\n slot=\"dropdown-content\"\n .selected=${begin}\n attr-for-selected=\"name\"\n >\n <paper-item class=\"begin-no\" name=\"none\"></paper-item>\n <paper-item class=\"begin-arrow\" name=\"arrow\"></paper-item>\n <paper-item class=\"begin-open-arrow\" name=\"open-arrow\"></paper-item>\n <paper-item class=\"begin-stealth-arrow\" name=\"sharp-arrow\"></paper-item>\n <paper-item class=\"begin-diamond-arrow\" name=\"diamond\"></paper-item>\n <paper-item class=\"begin-oval-arrow\" name=\"oval\"></paper-item>\n </paper-listbox>\n </paper-dropdown-menu>\n\n <label class=\"property-full-label\">\n <ox-i18n msgid=\"label.begin-size\">begin size</ox-i18n>\n </label>\n <paper-dropdown-menu no-label-float=\"true\" class=\"property-full-input arrow-type begin-size1\">\n <!-- begin-size1는 선택된 항목 보여주기위한 class로 하위 paper-item의 class와 동일하게 -->\n <paper-listbox\n value-key=\"beginSize\"\n @selected-changed=${(e: CustomEvent) => this._onValueChange(e)}\n slot=\"dropdown-content\"\n .selected=${beginSize}\n attr-for-selected=\"name\"\n >\n <paper-item class=\"begin-size1\" name=\"size1\"></paper-item>\n <paper-item class=\"begin-size2\" name=\"size2\"></paper-item>\n <paper-item class=\"begin-size3\" name=\"size3\"></paper-item>\n <paper-item class=\"begin-size4\" name=\"size4\"></paper-item>\n <paper-item class=\"begin-size5\" name=\"size5\"></paper-item>\n <paper-item class=\"begin-size6\" name=\"size6\"></paper-item>\n <paper-item class=\"begin-size7\" name=\"size7\"></paper-item>\n <paper-item class=\"begin-size8\" name=\"size8\"></paper-item>\n <paper-item class=\"begin-size9\" name=\"size9\"></paper-item>\n </paper-listbox>\n </paper-dropdown-menu>\n\n <label class=\"property-full-label\">\n <ox-i18n msgid=\"label.end-type\">end type</ox-i18n>\n </label>\n <paper-dropdown-menu no-label-float=\"true\" class=\"property-full-input arrow-type end-no\">\n <!-- end-no는 선택된 항목 보여주기위한 class로 하위 paper-item의 class와 동일하게 -->\n <paper-listbox\n value-key=\"end\"\n @selected-changed=${(e: CustomEvent) => this._onValueChange(e)}\n slot=\"dropdown-content\"\n .selected=${end}\n attr-for-selected=\"name\"\n >\n <paper-item class=\"end-no\" name=\"none\"></paper-item>\n <paper-item class=\"end-arrow\" name=\"arrow\"></paper-item>\n <paper-item class=\"end-open-arrow\" name=\"open-arrow\"></paper-item>\n <paper-item class=\"end-stealth-arrow\" name=\"sharp-arrow\"></paper-item>\n <paper-item class=\"end-diamond-arrow\" name=\"diamond\"></paper-item>\n <paper-item class=\"end-oval-arrow\" name=\"oval\"></paper-item>\n </paper-listbox>\n </paper-dropdown-menu>\n\n <label class=\"property-full-label\">\n <ox-i18n msgid=\"label.end-size\">end size</ox-i18n>\n </label>\n <paper-dropdown-menu no-label-float=\"true\" class=\"property-full-input arrow-type end-size1\">\n <!-- end-size1는 선택된 항목 보여주기위한 class로 하위 paper-item의 class와 동일하게 -->\n <paper-listbox\n value-key=\"endSize\"\n @selected-changed=${(e: CustomEvent) => this._onValueChange(e)}\n slot=\"dropdown-content\"\n .selected=${endSize}\n attr-for-selected=\"name\"\n >\n <paper-item class=\"end-size1\" name=\"size1\"></paper-item>\n <paper-item class=\"end-size2\" name=\"size2\"></paper-item>\n <paper-item class=\"end-size3\" name=\"size3\"></paper-item>\n <paper-item class=\"end-size4\" name=\"size4\"></paper-item>\n <paper-item class=\"end-size5\" name=\"size5\"></paper-item>\n <paper-item class=\"end-size6\" name=\"size6\"></paper-item>\n <paper-item class=\"end-size7\" name=\"size7\"></paper-item>\n <paper-item class=\"end-size8\" name=\"size8\"></paper-item>\n <paper-item class=\"end-size9\" name=\"size9\"></paper-item>\n </paper-listbox>\n </paper-dropdown-menu>\n `\n : html``}\n </div>\n </fieldset>\n `\n }\n\n _isLine(selected: Component[]) {\n var isLine = false\n\n for (var i = 0; i < selected.length; i++) {\n var comp = selected[i]\n\n if (!comp.isLine || !comp.isLine()) {\n isLine = false\n return isLine\n }\n\n isLine = true\n }\n\n return isLine\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../../src/modeller/property-sidebar/styles/styles.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,OAAO,kDAAkD,CAAA;AACzD,OAAO,qCAAqC,CAAA;AAC5C,OAAO,kCAAkC,CAAA;AACzC,OAAO,kCAAkC,CAAA;AACzC,OAAO,2CAA2C,CAAA;AAClD,OAAO,mCAAmC,CAAA;AAC1C,OAAO,0BAA0B,CAAA;AAEjC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC/B,OAAO,EAAE,QAAQ,EAAE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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA8SF;CACF,AAjTY,CAiTZ;AAC2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CAAgB;AAChB;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;gDAA2B;AAC1B;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;6CAAkB;AAEnC;IAAR,KAAK,EAAE;qDAA+B","sourcesContent":["/**\n * @license Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport '@polymer/paper-dropdown-menu/paper-dropdown-menu'\nimport '@operato/help/ox-title-with-help.js'\nimport '@operato/input/ox-input-color.js'\nimport '@operato/input/ox-input-range.js'\nimport '@operato/app/input/ox-input-fill-style.js'\nimport '@operato/font/ox-font-selector.js'\nimport '@operato/i18n/ox-i18n.js'\n\nimport { css, html } from 'lit'\nimport { property, state } from 'lit/decorators.js'\n\nimport { Component } from '@hatiolab/things-scene'\n\nimport { AbstractProperty } from '../abstract-property.js'\nimport { PropertySharedStyle } from '../property-shared-style.js'\n\nexport class PropertyStyles extends AbstractProperty {\n static styles = [\n PropertySharedStyle,\n css`\n ox-input-range {\n width: 100%;\n }\n\n .btn-group {\n height: 24px;\n }\n\n .btn-group paper-button {\n width: 30px;\n height: 24px;\n min-width: initial;\n margin: 0 4px 0 0;\n padding: 0;\n border-radius: 0;\n display: inline-block;\n border-bottom: 2px solid #fff;\n\n background: var(--url-icon-properties) no-repeat;\n background-size: 70%;\n }\n\n .btn-group paper-button.tbold {\n background-position: 50% -170px;\n }\n\n .btn-group paper-button.titalic {\n background-position: 50% -205px;\n }\n\n .btn-group paper-button.tunderline {\n background-position: 50% -240px;\n }\n\n .btn-group paper-button.tstrikethrough {\n background-position: 50% -415px;\n }\n\n .btn-group paper-button[active] {\n border-color: #f2471c;\n }\n\n .line-type paper-listbox {\n overflow: hidden;\n max-width: 100px;\n }\n .line-type paper-item {\n background: var(--url-icon-properties-line-type) 50% 0 no-repeat;\n min-height: 25px;\n padding: 3px 9px;\n width: 80px;\n }\n\n .line-type paper-item.solid {\n background-position: 50% 10px;\n }\n .line-type paper-item.round-dot {\n background-position: 50% -40px;\n }\n .line-type paper-item.square-dot {\n background-position: 50% -90px;\n }\n .line-type paper-item.dash {\n background-position: 50% -140px;\n }\n .line-type paper-item.dash-dot {\n background-position: 50% -190px;\n }\n .line-type paper-item.long-dash {\n background-position: 50% -240px;\n }\n .line-type paper-item.long-dash-dot {\n background-position: 50% -290px;\n }\n .line-type paper-item.long-dash-dot-dot {\n background-position: 50% -340px;\n }\n\n .line-type .paper-input-container input {\n background: var(--url-icon-properties-line-type) 50% 0 no-repeat !important;\n }\n .line-type.solid .paper-input-container input {\n background-position: 50% 5px !important;\n }\n .line-type.round-dot .paper-input-container input {\n background-position: 50% -45px !important;\n }\n .line-type.square-dot .paper-input-container input {\n background-position: 50% -85px !important;\n }\n .line-type.dash .paper-input-container input {\n background-position: 50% -145px !important;\n }\n .line-type.dash-dot .paper-input-container input {\n background-position: 50% -185px !important;\n }\n .line-type.long-dash .paper-input-container input {\n background-position: 50% -245px !important;\n }\n .line-type.long-dash-dot .paper-input-container input {\n background-position: 50% -285px !important;\n }\n .line-type.long-dash-dot-dot .paper-input-container input {\n background-position: 50% -345px !important;\n }\n\n .arrow-type paper-menu {\n overflow: hidden;\n max-width: 140px;\n }\n .arrow-type paper-item {\n background: var(--url-icon-properties-arrow-type) 50% 0 no-repeat;\n min-height: 30px;\n padding: 3px 7px;\n width: 30px;\n float: left;\n }\n .arrow-type paper-item.begin-no {\n background-position: 50% 16px;\n }\n .arrow-type paper-item.begin-arrow {\n background-position: 50% -39px;\n }\n .arrow-type paper-item.begin-open-arrow {\n background-position: 50% -89px;\n }\n .arrow-type paper-item.begin-stealth-arrow {\n background-position: 50% -139px;\n }\n .arrow-type paper-item.begin-diamond-arrow {\n background-position: 50% -190px;\n }\n .arrow-type paper-item.begin-oval-arrow {\n background-position: 50% -238px;\n }\n .arrow-type paper-item.begin-size1 {\n background-position: 50% -286px;\n }\n .arrow-type paper-item.begin-size2 {\n background-position: 50% -336px;\n }\n .arrow-type paper-item.begin-size3 {\n background-position: 50% -386px;\n }\n .arrow-type paper-item.begin-size4 {\n background-position: 50% -436px;\n }\n .arrow-type paper-item.begin-size5 {\n background-position: 50% -486px;\n }\n .arrow-type paper-item.begin-size6 {\n background-position: 50% -536px;\n }\n .arrow-type paper-item.begin-size7 {\n background-position: 50% -589px;\n }\n .arrow-type paper-item.begin-size8 {\n background-position: 50% -639px;\n }\n .arrow-type paper-item.begin-size9 {\n background-position: 50% -689px;\n }\n .arrow-type paper-item.end-no {\n background-position: 50% 16px;\n }\n .arrow-type paper-item.end-arrow {\n background-position: 50% -739px;\n }\n .arrow-type paper-item.end-open-arrow {\n background-position: 50% -789px;\n }\n .arrow-type paper-item.end-stealth-arrow {\n background-position: 50% -839px;\n }\n .arrow-type paper-item.end-diamond-arrow {\n background-position: 50% -890px;\n }\n .arrow-type paper-item.end-oval-arrow {\n background-position: 50% -938px;\n }\n .arrow-type paper-item.end-size1 {\n background-position: 50% -986px;\n }\n .arrow-type paper-item.end-size2 {\n background-position: 50% -1036px;\n }\n .arrow-type paper-item.end-size3 {\n background-position: 50% -1086px;\n }\n .arrow-type paper-item.end-size4 {\n background-position: 50% -1136px;\n }\n .arrow-type paper-item.end-size5 {\n background-position: 50% -1186px;\n }\n .arrow-type paper-item.end-size6 {\n background-position: 50% -1236px;\n }\n .arrow-type paper-item.end-size7 {\n background-position: 50% -1289px;\n }\n .arrow-type paper-item.end-size8 {\n background-position: 50% -1339px;\n }\n .arrow-type paper-item.end-size9 {\n background-position: 50% -1389px;\n }\n\n .arrow-type .paper-input-container input {\n background: var(--url-icon-properties-arrow-type) 110% 0 no-repeat !important;\n }\n .arrow-type.begin-no .paper-input-container input {\n background-position: 110% 5px !important;\n }\n .arrow-type.begin-arrow .paper-input-container input {\n background-position: 110% -50px !important;\n }\n .arrow-type.begin-open-arrow .paper-input-container input {\n background-position: 110% -100px !important;\n }\n .arrow-type.begin-stealth-arrow .paper-input-container input {\n background-position: 110% -150px !important;\n }\n .arrow-type.begin-diamond-arrow .paper-input-container input {\n background-position: 110% -200px !important;\n }\n .arrow-type.begin-oval-arrow .paper-input-container input {\n background-position: 110% -250px !important;\n }\n .arrow-type.begin-size1 .paper-input-container input {\n background-position: 110% -298px !important;\n }\n .arrow-type.begin-size2 .paper-input-container input {\n background-position: 110% -348px !important;\n }\n .arrow-type.begin-size3 .paper-input-container input {\n background-position: 110% -398px !important;\n }\n .arrow-type.begin-size4 .paper-input-container input {\n background-position: 110% -448px !important;\n }\n .arrow-type.begin-size5 .paper-input-container input {\n background-position: 110% -498px !important;\n }\n .arrow-type.begin-size6 .paper-input-container input {\n background-position: 110% -548px !important;\n }\n .arrow-type.begin-size7 .paper-input-container input {\n background-position: 110% -600px !important;\n }\n .arrow-type.begin-size8 .paper-input-container input {\n background-position: 110% -650px !important;\n }\n .arrow-type.begin-size9 .paper-input-container input {\n background-position: 110% -700px !important;\n }\n .arrow-type.end-no .paper-input-container input {\n background-position: 110% 5px !important;\n }\n .arrow-type.end-arrow .paper-input-container input {\n background-position: 110% -750px !important;\n }\n .arrow-type.end-open-arrow .paper-input-container input {\n background-position: 110% -800px !important;\n }\n .arrow-type.end-stealth-arrow .paper-input-container input {\n background-position: 110% -850px !important;\n }\n .arrow-type.end-diamond-arrow .paper-input-container input {\n background-position: 110% -900px !important;\n }\n .arrow-type.end-oval-arrow .paper-input-container input {\n background-position: 110% -950px !important;\n }\n .arrow-type.end-size1 .paper-input-container input {\n background-position: 110% -998px !important;\n }\n .arrow-type.end-size2 .paper-input-container input {\n background-position: 110% -1048px !important;\n }\n .arrow-type.end-size3 .paper-input-container input {\n background-position: 110% -1098px !important;\n }\n .arrow-type.end-size4 .paper-input-container input {\n background-position: 110% -1148px !important;\n }\n .arrow-type.end-size5 .paper-input-container input {\n background-position: 110% -1198px !important;\n }\n .arrow-type.end-size6 .paper-input-container input {\n background-position: 110% -1248px !important;\n }\n .arrow-type.end-size7 .paper-input-container input {\n background-position: 110% -1300px !important;\n }\n .arrow-type.end-size8 .paper-input-container input {\n background-position: 110% -1350px !important;\n }\n .arrow-type.end-size9 .paper-input-container input {\n background-position: 110% -1400px !important;\n }\n `\n ]\n @property({ type: Object }) value: any = {}\n @property({ type: Array }) selected: Component[] = []\n @property({ type: Array }) fonts: any[] = []\n\n @state() fontAvailable: boolean = false\n\n firstUpdated() {\n this.fontAvailable = !sessionStorage.getItem('ThingsFactory-UseExternServer')\n\n this.renderRoot.addEventListener('change', this._onValueChange.bind(this))\n }\n\n render() {\n var {\n alpha = 1,\n fontFamily,\n fontSize,\n lineHeight,\n fontColor,\n bold,\n italic,\n fillStyle,\n lineWidth,\n strokeStyle,\n lineDash,\n lineCap,\n lineJoin,\n begin,\n beginSize,\n end,\n endSize\n } = this.value || {}\n\n return html`\n <fieldset>\n <legend>\n <ox-title-with-help topic=\"board-modeller/styles/opacity\" msgid=\"label.opacity\">opacity</ox-title-with-help>\n </legend>\n <ox-input-range min=\"0\" max=\"1\" step=\"0.1\" value-key=\"alpha\" .value=${alpha} editable> </ox-input-range>\n </fieldset>\n\n <fieldset>\n <legend>\n <ox-title-with-help topic=\"board-modeller/styles/text-style\" msgid=\"label.text-style\"\n >text style</ox-title-with-help\n >\n </legend>\n\n <div class=\"property-grid\">\n ${this.fontAvailable\n ? html`\n <label class=\"property-full-label\">\n <ox-i18n msgid=\"label.font-family\">Font Family</ox-i18n>\n </label>\n\n <ox-font-selector\n value-key=\"fontFamily\"\n .value=${fontFamily}\n class=\"property-full-input\"\n custom-editor\n ></ox-font-selector>\n `\n : html``}\n\n <label class=\"property-half-label icon-only-label font-size\"></label>\n <input type=\"number\" value-key=\"fontSize\" .value=${fontSize} class=\"property-half-input\" />\n\n <label class=\"property-half-label icon-only-label lineHeight\"></label>\n <input type=\"number\" value-key=\"lineHeight\" .value=${lineHeight} class=\"property-half-input\" />\n\n <label class=\"property-half-label icon-only-label color\"></label>\n <ox-input-color value-key=\"fontColor\" .value=${fontColor} class=\"property-half-input\"> </ox-input-color>\n\n <label class=\"property-half-label\"></label>\n <div class=\"property-half-input btn-group\">\n <paper-button toggles value-key=\"bold\" ?active=${bold} class=\"tbold\"> </paper-button>\n <paper-button toggles value-key=\"italic\" ?active=${italic} class=\"titalic\"> </paper-button>\n </div>\n </div>\n </fieldset>\n\n <fieldset>\n <legend>\n <ox-title-with-help topic=\"board-modeller/styles/fill-style\" msgid=\"label.fill-style\"\n >fill style</ox-title-with-help\n >\n </legend>\n\n <ox-input-fill-style value-key=\"fillStyle\" .value=${fillStyle}> </ox-input-fill-style>\n </fieldset>\n\n <fieldset>\n <legend>\n <ox-title-with-help msgid=\"label.line-style\" topic=\"board-modeller/styles/line-style\"></ox-title-with-help>\n </legend>\n\n <div class=\"property-grid\">\n <label class=\"property-half-label icon-only-label linewidth\"></label>\n <input type=\"number\" value-key=\"lineWidth\" .value=${lineWidth} class=\"property-half-input\" />\n\n <label class=\"property-half-label icon-only-label color\"></label>\n <ox-input-color value-key=\"strokeStyle\" .value=${strokeStyle} class=\"property-half-input\"> </ox-input-color>\n\n <label class=\"property-full-label\">\n <ox-i18n msgid=\"label.line-type\">line type</ox-i18n>\n </label>\n <paper-dropdown-menu no-label-float=\"true\" class=\"property-full-input line-type solid\">\n <!-- solid는 선택된 항목 보여주기위한 class로 하위 paper-item의 class와 동일하게 -->\n <paper-listbox\n value-key=\"lineDash\"\n @selected-changed=${(e: CustomEvent) => this._onValueChange(e)}\n slot=\"dropdown-content\"\n .selected=${lineDash}\n attr-for-selected=\"name\"\n >\n <paper-item class=\"solid\" name=\"solid\"></paper-item>\n <paper-item class=\"round-dot\" name=\"round-dot\"></paper-item>\n <paper-item class=\"square-dot\" name=\"square-dot\"></paper-item>\n <paper-item class=\"dash\" name=\"dash\"></paper-item>\n <paper-item class=\"dash-dot\" name=\"dash-dot\"></paper-item>\n <paper-item class=\"long-dash\" name=\"long-dash\"></paper-item>\n <paper-item class=\"long-dash-dot\" name=\"long-dash-dot\"></paper-item>\n <paper-item class=\"long-dash-dot-dot\" name=\"long-dash-dot-dot\"></paper-item>\n </paper-listbox>\n </paper-dropdown-menu>\n\n <label class=\"property-full-label\">\n <ox-i18n msgid=\"label.cap-type\">cap type</ox-i18n>\n </label>\n <select class=\"property-full-input select-content\" value-key=\"lineCap\" .value=${lineCap}>\n <option value=\"butt\"><ox-i18n msgid=\"label.square\">square</ox-i18n></option>\n <option value=\"round\"><ox-i18n msgid=\"label.round\">round</ox-i18n></option>\n </select>\n\n <label class=\"property-full-label\">\n <ox-i18n msgid=\"label.join-type\">join type</ox-i18n>\n </label>\n <select class=\"property-full-input select-content\" value-key=\"lineJoin\" .value=${lineJoin}>\n <option value=\"miter\"><ox-i18n msgid=\"label.miter\">miter</ox-i18n></option>\n <option value=\"round\"><ox-i18n msgid=\"label.round\">round</ox-i18n></option>\n <option value=\"bevel\"><ox-i18n msgid=\"label.bevel\">bevel</ox-i18n></option>\n </select>\n\n ${this._isLine(this.selected)\n ? html`\n <label class=\"property-full-label\">\n <ox-i18n msgid=\"label.begin-type\">begin type</ox-i18n>\n </label>\n <paper-dropdown-menu no-label-float=\"true\" class=\"property-full-input arrow-type begin-no\">\n <!-- begin-no는 선택된 항목 보여주기위한 class로 하위 paper-item의 class와 동일하게 -->\n <paper-listbox\n value-key=\"begin\"\n @selected-changed=${(e: CustomEvent) => this._onValueChange(e)}\n slot=\"dropdown-content\"\n .selected=${begin}\n attr-for-selected=\"name\"\n >\n <paper-item class=\"begin-no\" name=\"none\"></paper-item>\n <paper-item class=\"begin-arrow\" name=\"arrow\"></paper-item>\n <paper-item class=\"begin-open-arrow\" name=\"open-arrow\"></paper-item>\n <paper-item class=\"begin-stealth-arrow\" name=\"sharp-arrow\"></paper-item>\n <paper-item class=\"begin-diamond-arrow\" name=\"diamond\"></paper-item>\n <paper-item class=\"begin-oval-arrow\" name=\"oval\"></paper-item>\n </paper-listbox>\n </paper-dropdown-menu>\n\n <label class=\"property-full-label\">\n <ox-i18n msgid=\"label.begin-size\">begin size</ox-i18n>\n </label>\n <paper-dropdown-menu no-label-float=\"true\" class=\"property-full-input arrow-type begin-size1\">\n <!-- begin-size1는 선택된 항목 보여주기위한 class로 하위 paper-item의 class와 동일하게 -->\n <paper-listbox\n value-key=\"beginSize\"\n @selected-changed=${(e: CustomEvent) => this._onValueChange(e)}\n slot=\"dropdown-content\"\n .selected=${beginSize}\n attr-for-selected=\"name\"\n >\n <paper-item class=\"begin-size1\" name=\"size1\"></paper-item>\n <paper-item class=\"begin-size2\" name=\"size2\"></paper-item>\n <paper-item class=\"begin-size3\" name=\"size3\"></paper-item>\n <paper-item class=\"begin-size4\" name=\"size4\"></paper-item>\n <paper-item class=\"begin-size5\" name=\"size5\"></paper-item>\n <paper-item class=\"begin-size6\" name=\"size6\"></paper-item>\n <paper-item class=\"begin-size7\" name=\"size7\"></paper-item>\n <paper-item class=\"begin-size8\" name=\"size8\"></paper-item>\n <paper-item class=\"begin-size9\" name=\"size9\"></paper-item>\n </paper-listbox>\n </paper-dropdown-menu>\n\n <label class=\"property-full-label\">\n <ox-i18n msgid=\"label.end-type\">end type</ox-i18n>\n </label>\n <paper-dropdown-menu no-label-float=\"true\" class=\"property-full-input arrow-type end-no\">\n <!-- end-no는 선택된 항목 보여주기위한 class로 하위 paper-item의 class와 동일하게 -->\n <paper-listbox\n value-key=\"end\"\n @selected-changed=${(e: CustomEvent) => this._onValueChange(e)}\n slot=\"dropdown-content\"\n .selected=${end}\n attr-for-selected=\"name\"\n >\n <paper-item class=\"end-no\" name=\"none\"></paper-item>\n <paper-item class=\"end-arrow\" name=\"arrow\"></paper-item>\n <paper-item class=\"end-open-arrow\" name=\"open-arrow\"></paper-item>\n <paper-item class=\"end-stealth-arrow\" name=\"sharp-arrow\"></paper-item>\n <paper-item class=\"end-diamond-arrow\" name=\"diamond\"></paper-item>\n <paper-item class=\"end-oval-arrow\" name=\"oval\"></paper-item>\n </paper-listbox>\n </paper-dropdown-menu>\n\n <label class=\"property-full-label\">\n <ox-i18n msgid=\"label.end-size\">end size</ox-i18n>\n </label>\n <paper-dropdown-menu no-label-float=\"true\" class=\"property-full-input arrow-type end-size1\">\n <!-- end-size1는 선택된 항목 보여주기위한 class로 하위 paper-item의 class와 동일하게 -->\n <paper-listbox\n value-key=\"endSize\"\n @selected-changed=${(e: CustomEvent) => this._onValueChange(e)}\n slot=\"dropdown-content\"\n .selected=${endSize}\n attr-for-selected=\"name\"\n >\n <paper-item class=\"end-size1\" name=\"size1\"></paper-item>\n <paper-item class=\"end-size2\" name=\"size2\"></paper-item>\n <paper-item class=\"end-size3\" name=\"size3\"></paper-item>\n <paper-item class=\"end-size4\" name=\"size4\"></paper-item>\n <paper-item class=\"end-size5\" name=\"size5\"></paper-item>\n <paper-item class=\"end-size6\" name=\"size6\"></paper-item>\n <paper-item class=\"end-size7\" name=\"size7\"></paper-item>\n <paper-item class=\"end-size8\" name=\"size8\"></paper-item>\n <paper-item class=\"end-size9\" name=\"size9\"></paper-item>\n </paper-listbox>\n </paper-dropdown-menu>\n `\n : html``}\n </div>\n </fieldset>\n `\n }\n\n _isLine(selected: Component[]) {\n var isLine = false\n\n for (var i = 0; i < selected.length; i++) {\n var comp = selected[i]\n\n if (!comp.isLine || !comp.isLine()) {\n isLine = false\n return isLine\n }\n\n isLine = true\n }\n\n return isLine\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ox-board-viewer.js","sourceRoot":"","sources":["../../src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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'\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 }\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\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 (type == 'model-layer') {\n this.hidePopup()\n return\n }\n\n this.togglePopup(component)\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\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 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'],\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) return\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,EA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AAC,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,CAylBvB","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'\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\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 (type == 'model-layer') {\n this.hidePopup()\n return\n }\n\n this.togglePopup(component)\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\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 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'],\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) return\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"]}
|