@operato/board 9.0.0-beta.10 → 9.0.0-beta.11
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/CHANGELOG.md +9 -0
- package/dist/src/data-storage/data-storage.js +0 -18
- package/dist/src/data-storage/data-storage.js.map +1 -1
- package/dist/src/modeller/component-toolbar/component-detail.js +5 -15
- package/dist/src/modeller/component-toolbar/component-detail.js.map +1 -1
- package/dist/src/modeller/component-toolbar/component-menu.js +8 -45
- package/dist/src/modeller/component-toolbar/component-menu.js.map +1 -1
- package/dist/src/modeller/component-toolbar/component-toolbar.js +6 -62
- package/dist/src/modeller/component-toolbar/component-toolbar.js.map +1 -1
- package/dist/src/modeller/edit-toolbar.js +3 -126
- package/dist/src/modeller/edit-toolbar.js.map +1 -1
- package/dist/src/modeller/property-sidebar/data-binding/data-binding-mapper.js +26 -85
- package/dist/src/modeller/property-sidebar/data-binding/data-binding-mapper.js.map +1 -1
- package/dist/src/modeller/property-sidebar/data-binding/data-binding-value-map.js +1 -6
- package/dist/src/modeller/property-sidebar/data-binding/data-binding-value-map.js.map +1 -1
- package/dist/src/modeller/property-sidebar/data-binding/data-binding-value-range.js +1 -6
- package/dist/src/modeller/property-sidebar/data-binding/data-binding-value-range.js.map +1 -1
- package/dist/src/modeller/property-sidebar/data-binding/data-binding.js +7 -63
- package/dist/src/modeller/property-sidebar/data-binding/data-binding.js.map +1 -1
- package/dist/src/modeller/property-sidebar/effects/effects.js +1 -21
- package/dist/src/modeller/property-sidebar/effects/effects.js.map +1 -1
- package/dist/src/modeller/property-sidebar/effects/property-animation.js +1 -21
- package/dist/src/modeller/property-sidebar/effects/property-animation.js.map +1 -1
- package/dist/src/modeller/property-sidebar/effects/property-animations.js +5 -27
- package/dist/src/modeller/property-sidebar/effects/property-animations.js.map +1 -1
- package/dist/src/modeller/property-sidebar/effects/property-event-hover.js +4 -24
- package/dist/src/modeller/property-sidebar/effects/property-event-hover.js.map +1 -1
- package/dist/src/modeller/property-sidebar/effects/property-event-tap.js +4 -36
- package/dist/src/modeller/property-sidebar/effects/property-event-tap.js.map +1 -1
- package/dist/src/modeller/property-sidebar/effects/property-event.js +1 -21
- package/dist/src/modeller/property-sidebar/effects/property-event.js.map +1 -1
- package/dist/src/modeller/property-sidebar/effects/property-shadow.js +3 -17
- package/dist/src/modeller/property-sidebar/effects/property-shadow.js.map +1 -1
- package/dist/src/modeller/property-sidebar/inspector/inspector.js +6 -38
- package/dist/src/modeller/property-sidebar/inspector/inspector.js.map +1 -1
- package/dist/src/modeller/property-sidebar/property-sidebar.js +13 -69
- package/dist/src/modeller/property-sidebar/property-sidebar.js.map +1 -1
- package/dist/src/modeller/property-sidebar/shapes/shapes.js +9 -35
- package/dist/src/modeller/property-sidebar/shapes/shapes.js.map +1 -1
- package/dist/src/modeller/property-sidebar/specifics/specific-properties-builder.js +1 -18
- package/dist/src/modeller/property-sidebar/specifics/specific-properties-builder.js.map +1 -1
- package/dist/src/modeller/property-sidebar/specifics/specifics.js +9 -45
- package/dist/src/modeller/property-sidebar/specifics/specifics.js.map +1 -1
- package/dist/src/modeller/property-sidebar/styles/styles.js +7 -27
- package/dist/src/modeller/property-sidebar/styles/styles.js.map +1 -1
- package/dist/src/modeller/scene-viewer/ox-scene-handler.js +0 -15
- package/dist/src/modeller/scene-viewer/ox-scene-handler.js.map +1 -1
- package/dist/src/modeller/scene-viewer/ox-scene-layer.js +0 -15
- package/dist/src/modeller/scene-viewer/ox-scene-layer.js.map +1 -1
- package/dist/src/modeller/scene-viewer/ox-scene-property.js +0 -21
- package/dist/src/modeller/scene-viewer/ox-scene-property.js.map +1 -1
- package/dist/src/modeller/scene-viewer/ox-scene-viewer.js +13 -97
- package/dist/src/modeller/scene-viewer/ox-scene-viewer.js.map +1 -1
- package/dist/src/ox-board-component-info.js +6 -33
- package/dist/src/ox-board-component-info.js.map +1 -1
- package/dist/src/ox-board-list.js +6 -55
- package/dist/src/ox-board-list.js.map +1 -1
- package/dist/src/ox-board-modeller.js +15 -104
- package/dist/src/ox-board-modeller.js.map +1 -1
- package/dist/src/ox-board-player.js +10 -96
- package/dist/src/ox-board-player.js.map +1 -1
- package/dist/src/ox-board-template-list.js +5 -21
- package/dist/src/ox-board-template-list.js.map +1 -1
- package/dist/src/ox-board-template-viewer.js +9 -35
- package/dist/src/ox-board-template-viewer.js.map +1 -1
- package/dist/src/ox-board-viewer.js +17 -131
- package/dist/src/ox-board-viewer.js.map +1 -1
- package/dist/src/ox-editor-board-selector.js +0 -21
- package/dist/src/ox-editor-board-selector.js.map +1 -1
- package/dist/src/player/ox-board-player-carousel.js +12 -92
- package/dist/src/player/ox-board-player-carousel.js.map +1 -1
- package/dist/src/player/ox-board-player-grid.js +5 -32
- package/dist/src/player/ox-board-player-grid.js.map +1 -1
- package/dist/src/player/ox-board-wrapper.js +4 -50
- package/dist/src/player/ox-board-wrapper.js.map +1 -1
- package/dist/src/selector/board-creation-popup.js +0 -21
- package/dist/src/selector/board-creation-popup.js.map +1 -1
- package/dist/src/selector/board-thumbnail-card.js +0 -15
- package/dist/src/selector/board-thumbnail-card.js.map +1 -1
- package/dist/src/selector/ox-board-creation-card.js +0 -22
- package/dist/src/selector/ox-board-creation-card.js.map +1 -1
- package/dist/src/selector/ox-board-selector.js +6 -54
- package/dist/src/selector/ox-board-selector.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +14 -14
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"shapes.js","sourceRoot":"","sources":["../../../../../src/modeller/property-sidebar/shapes/shapes.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,OAAO,kCAAkC,CAAA;AACzC,OAAO,oCAAoC,CAAA;AAC3C,OAAO,4BAA4B,CAAA;AACnC,OAAO,0BAA0B,CAAA;AACjC,OAAO,qCAAqC,CAAA;AAE5C,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC/B,OAAO,EAAE,QAAQ,EAAE,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,CAAC,QAAQ,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;YAAE,OAAO,KAAK,CAAA;QAErE,OAAO,IAAI,CAAA;IACb,CAAC;IAED,OAAO,CAAC,QAAqB;QAC3B,IAAI,CAAC,QAAQ,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;YAAE,OAAO,KAAK,CAAA;QAErE,OAAO,IAAI,CAAA;IACb,CAAC;IAED,QAAQ,CAAC,QAAqB;QAC5B,IAAI,CAAC,QAAQ,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;YAAE,OAAO,KAAK,CAAA;QAEtE,OAAO,IAAI,CAAA;IACb,CAAC;;AAhaM;;;;WAAS;QACd,mBAAmB;QACnB,sBAAsB;QACtB,GAAG,CAAA;;;;;;;;;;;;;;;;KAgBF;QACD,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA2FF;KACF;EAhHY,CAgHZ;AAE2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CAAmB;AAClB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;8CAA6B;AAC7B;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;gDAA2B;AAEpC;IAAhB,KAAK,EAAE;mDAAqC","sourcesContent":["/**\n * @license Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport '@operato/input/ox-input-angle.js'\nimport '@operato/input/ox-buttons-radio.js'\nimport '@material/web/icon/icon.js'\nimport '@operato/i18n/ox-i18n.js'\nimport '@operato/help/ox-title-with-help.js'\n\nimport { css, html } from 'lit'\nimport { property, state } from 'lit/decorators.js'\nimport { keyed } from 'lit/directives/keyed.js'\n\nimport { BOUNDS, Component, Properties } from '@hatiolab/things-scene'\n\nimport { AbstractProperty } from '../abstract-property.js'\nimport { PropertySharedStyle } from '../property-shared-style.js'\nimport { BoxPaddingEditorStyles } from './box-padding-editor-styles.js'\n\nexport class PropertyShapes extends AbstractProperty {\n static styles = [\n PropertySharedStyle,\n BoxPaddingEditorStyles,\n css`\n fieldset[collapsable] legend {\n box-sizing: border-box;\n width: 100%;\n }\n\n fieldset[collapsable] legend md-icon {\n float: right;\n font-size: medium;\n margin: 0;\n cursor: pointer;\n }\n\n fieldset[collapsable][collapsed] > :not(legend) {\n display: none;\n }\n `,\n css`\n .icon-label label {\n background: var(--url-icon-properties-label) 7px -900px no-repeat;\n }\n\n .icon-label label.width {\n background-position: 7px -96px;\n }\n\n .icon-label label.height {\n background-position: 7px 4px;\n }\n\n .icon-label label.rotate {\n background-position: 7px -198px;\n }\n\n .icon-label label.twidth {\n background-position: 7px -296px;\n }\n\n .icon-label label.theight {\n background-position: 7px -396px;\n }\n\n .icon-label label.zPos {\n background-position: 5px -1098px;\n }\n\n .icon-label label.depth {\n background-position: 5px -1198px;\n }\n\n .icon-label label.rotationX {\n background-position: 5px -1296px;\n }\n\n .icon-label label.rotationY {\n background-position: 5px -1396px;\n }\n\n .icon-label label.rotationZ {\n background-position: 5px -1496px;\n }\n\n ox-buttons-radio > * {\n width: 30px;\n height: 25px;\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\n ox-buttons-radio div {\n background: var(--url-icon-properties) no-repeat;\n }\n\n ox-buttons-radio div[data-value='left'] {\n background-position: 50% 3px;\n }\n\n ox-buttons-radio div[data-value='center'] {\n background-position: 50% -47px;\n }\n\n ox-buttons-radio div[data-value='right'] {\n background-position: 50% -97px;\n }\n\n ox-buttons-radio div[data-value='justify'] {\n background-position: 50% -147px;\n }\n\n ox-buttons-radio div[data-value='top'] {\n background-position: 50% -197px;\n }\n\n ox-buttons-radio div[data-value='middle'] {\n background-position: 50% -193px;\n }\n\n ox-buttons-radio div[data-value='bottom'] {\n background-position: 50% -188px;\n }\n\n ox-buttons-radio div[active] {\n border-color: #f2471c;\n }\n `\n ]\n\n @property({ type: Object }) value?: Properties\n @property({ type: Object }) bounds: BOUNDS | null = null\n @property({ type: Array }) selected: Component[] = []\n\n @state() private _3dExpanded: boolean = false\n\n firstUpdated() {\n this.renderRoot.addEventListener('change', this._onValueChange.bind(this))\n }\n\n render() {\n const value = this.value || {}\n const { width, height } = this.bounds || {}\n\n return html`\n <fieldset>\n <div class=\"property-grid\">\n ${this._isIdentifiable(this.selected)\n ? html`\n <label> <ox-i18n msgid=\"label.id\">ID</ox-i18n> </label>\n <input value-key=\"id\" .value=${value.id || ''} />\n `\n : html``}\n ${this._isClassIdentifiable(this.selected)\n ? html`\n <label> <ox-i18n msgid=\"label.class\">Class</ox-i18n> </label>\n <input value-key=\"class\" .value=${value.class || ''} />\n `\n : html``}\n ${this._hasTextProperty(this.selected)\n ? html`\n <label> <ox-i18n msgid=\"label.text\">Text</ox-i18n> </label>\n <input value-key=\"text\" .value=${value.text || ''} />\n <label> <ox-i18n msgid=\"label.text-format\">Text Format</ox-i18n> </label>\n <input value-key=\"textFormat\" .value=${value.textFormat || ''} list=\"format-list\" />\n <datalist id=\"format-list\">\n <option value=\"#,###.\"></option>\n <option value=\"#,###.#\"></option>\n <option value=\"#,###.0\"></option>\n <option value=\"#,##0.#\"></option>\n <option value=\"#,##0.0\"></option>\n <option value=\"#,##0.0%\"></option>\n </datalist>\n `\n : html``}\n ${this._hasProperties(this.selected)\n ? html`\n <div class=\"checkbox-row\">\n <input id=\"checkbox-hidden\" value-key=\"hidden\" type=\"checkbox\" .checked=${value.hidden} />\n <label for=\"checkbox-hidden\"> <ox-i18n msgid=\"label.item-hidden\">Item Hidden</ox-i18n> </label>\n\n <input id=\"checkbox-locked\" value-key=\"locked\" type=\"checkbox\" .checked=${value.locked} />\n <label for=\"checkbox-locked\"> <ox-i18n msgid=\"label.locked\">Locked</ox-i18n> </label>\n </div>\n `\n : html``}\n </div>\n </fieldset>\n\n ${!this._isLine(this.selected)\n ? keyed(\n this.selected,\n html`\n <fieldset class=\"icon-label unit ratio\">\n <legend>\n <ox-title-with-help topic=\"board-modeller/shapes/size\" msgid=\"label.size\">size</ox-title-with-help>\n </legend>\n\n <div class=\"property-grid\">\n <label class=\"width\"> <ox-i18n msgid=\"label.width\">width</ox-i18n> </label>\n <input type=\"number\" value-key=\"bounds.width\" .value=${String(width)} />\n <label class=\"height\"> <ox-i18n msgid=\"label.height\">height</ox-i18n> </label>\n <input type=\"number\" value-key=\"bounds.height\" .value=${String(height)} />\n\n ${this.selected.length && this.selected[0].isRootModel()\n ? html``\n : html`\n <label class=\"rotate\"> <ox-i18n msgid=\"label.rotate\">rotate</ox-i18n> </label>\n <ox-input-angle value-key=\"rotation\" .value=${value.rotation}> </ox-input-angle>\n `}\n </div>\n </fieldset>\n `\n )\n : html``}\n ${this._is3dish(this.selected)\n ? html`\n <fieldset class=\"icon-label unit ratio\" collapsable ?collapsed=${!this._3dExpanded}>\n <legend>\n <ox-title-with-help topic=\"board-modeller/shapes/3dish\" msgid=\"label.3dish\">3D</ox-title-with-help>\n <md-icon\n @click=${(e: Event) => {\n this._3dExpanded = !this._3dExpanded\n }}\n >${this._3dExpanded ? 'expand_less' : 'expand_more'}</md-icon\n >\n </legend>\n\n <div class=\"property-grid\">\n <label class=\"zPos\"> <ox-i18n msgid=\"label.z-pos\">pos. Z</ox-i18n> </label>\n <input type=\"number\" value-key=\"zPos\" .value=${value.zPos} />\n <label class=\"depth\"> <ox-i18n msgid=\"label.depth\">depth</ox-i18n> </label>\n <input type=\"number\" value-key=\"depth\" .value=${value.depth} />\n\n <label class=\"rotationX\"> <ox-i18n msgid=\"label.rotation-x\">rot. X</ox-i18n> </label>\n <ox-input-angle value-key=\"rotationX\" .value=${value.rotationX}> </ox-input-angle>\n\n <label class=\"rotationY\"> <ox-i18n msgid=\"label.rotation-y\">rot. Y</ox-i18n> </label>\n <ox-input-angle value-key=\"rotationY\" .value=${value.rotationY}> </ox-input-angle>\n\n <label class=\"rotationZ\"> <ox-i18n msgid=\"label.rotation-z\">rot. Z</ox-i18n> </label>\n <ox-input-angle value-key=\"rotation\" .value=${value.rotation}> </ox-input-angle>\n </div>\n </fieldset>\n `\n : html``}\n ${this._hasTextProperty(this.selected)\n ? html`\n <fieldset>\n <legend>\n <ox-title-with-help topic=\"board-modeller/shapes/text-box\" msgid=\"label.text-box\"\n >text box</ox-title-with-help\n >\n </legend>\n\n <div class=\"property-grid\">\n <label> <ox-i18n msgid=\"label.horizontal\">horizontal</ox-i18n> </label>\n <ox-buttons-radio value-key=\"textAlign\" .value=${value.textAlign}>\n <div data-value=\"left\"></div>\n <div data-value=\"center\"></div>\n <div data-value=\"right\"></div>\n <div data-value=\"justify\"></div>\n </ox-buttons-radio>\n\n <label> <ox-i18n msgid=\"label.vertical\">vertical</ox-i18n> </label>\n <ox-buttons-radio value-key=\"textBaseline\" .value=${value.textBaseline}>\n <div data-value=\"top\"></div>\n <div data-value=\"middle\"></div>\n <div data-value=\"bottom\"></div>\n </ox-buttons-radio>\n\n <div class=\"checkbox-row\">\n <input\n id=\"checkbox-support-markdown\"\n type=\"checkbox\"\n value-key=\"supportMarkdown\"\n .checked=${value.supportMarkdown}\n />\n <label for=\"checkbox-support-markdown\">\n <ox-i18n msgid=\"label.support-markdown\">Support Markdown</ox-i18n>\n </label>\n </div>\n\n <div class=\"checkbox-row\">\n <input id=\"checkbox-textwrap\" type=\"checkbox\" value-key=\"textWrap\" .checked=${value.textWrap} />\n <label for=\"checkbox-textwrap\"> <ox-i18n msgid=\"label.text-wrap\">Text Wrap</ox-i18n> </label>\n </div>\n\n ${!value.textWrap\n ? html` <label for=\"checkbox-textOverflow\">\n <ox-i18n msgid=\"label.text-overflow\">Text Overflow</ox-i18n>\n </label>\n <select value-key=\"textOverflow\" .value=${value.textOverflow || ''}>\n <option value=\"\" selected>none</option>\n <option value=\"ellipsis\">ellipsis</option>\n <option value=\"clip\">clip</option>\n </select>`\n : ''}\n\n <label> <ox-i18n msgid=\"label.padding\">padding</ox-i18n> </label>\n <table class=\"box-padding\">\n <tr>\n <td class=\"slide1\"></td>\n <td class=\"slide2\"></td>\n <td class=\"slide3\"></td>\n </tr>\n <tr>\n <td class=\"slide4\"></td>\n <td class=\"slide5\">\n <input type=\"number\" value-key=\"paddingTop\" .value=${value.paddingTop || 0} />\n <input type=\"number\" value-key=\"paddingLeft\" .value=${value.paddingLeft || 0} />\n <input type=\"number\" value-key=\"paddingRight\" .value=${value.paddingRight || 0} />\n <input type=\"number\" value-key=\"paddingBottom\" .value=${value.paddingBottom || 0} />\n </td>\n <td class=\"slide6\"></td>\n </tr>\n <tr>\n <td class=\"slide7\"></td>\n <td class=\"slide8\"></td>\n <td class=\"slide9\"></td>\n </tr>\n </table>\n </div>\n </fieldset>\n `\n : html``}\n ${this.selected.length && this.selected[0].isRootModel()\n ? html`\n <fieldset class=\"icon-label\">\n <legend>\n <ox-title-with-help topic=\"board-modeller/shapes/viewer-option\" msgid=\"label.viewer-option\"\n >Viewer Option</ox-title-with-help\n >\n </legend>\n\n <div class=\"property-grid\">\n <label><ox-i18n msgid=\"label.fit\">Fit</ox-i18n></label>\n <select value-key=\"fitMode\" .value=${value.fitMode || 'ratio'}>\n <option value=\"none\">none</option>\n <option value=\"center\">center</option>\n <option value=\"ratio\" selected>ratio</option>\n <option value=\"both\">both</option>\n <option value=\"width\">width</option>\n <option value=\"height\">height</option>\n </select>\n </div>\n </fieldset>\n <fieldset class=\"icon-label\">\n <legend>\n <ox-title-with-help topic=\"board-modeller/shapes/print-option\" msgid=\"label.label-print\"\n >Print Option</ox-title-with-help\n >\n </legend>\n\n <div class=\"property-grid\">\n <label class=\"rotate\"><ox-i18n msgid=\"label.label-rotation\">Label Rotation</ox-i18n></label>\n <select value-key=\"labelRotation\" .value=${value.labelRotation || 'N'}>\n <option value=\"N\" selected>0°</option>\n <option value=\"B\">90°</option>\n <option value=\"I\">180°</option>\n <option value=\"R\">270°</option>\n </select>\n </div>\n </fieldset>\n `\n : html``}\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 var value = this._getValueFromEventTarget(element)\n\n if (key.indexOf('bounds.') == 0) {\n if (isNaN(value)) return\n this.dispatchEvent(\n new CustomEvent('bounds-change', {\n bubbles: true,\n composed: true,\n detail: {\n [key.substr(7)]: value\n }\n })\n )\n } else {\n this._onAfterValueChange(key, value)\n }\n }\n\n _hasTextProperty(selected: Component[]) {\n for (let i = 0; i < selected.length; i++) {\n if (!selected[i].hasTextProperty) return false\n }\n\n return true\n }\n\n _hasProperties(selected: Component[]) {\n if (!selected || selected.length == 0 || (selected[0] && selected[0].isLayer && selected[0].isLayer())) return false\n\n return true\n }\n\n _isIdentifiable(selected: Component[]) {\n if (!selected || selected.length == 0 || selected.length > 1 || (selected[0].isLayer && selected[0].isLayer()))\n return false\n\n return true\n }\n\n _isClassIdentifiable(selected: Component[]) {\n if (!selected || (selected[0] && selected[0].isLayer())) return false\n\n return true\n }\n\n _isLine(selected: Component[]) {\n if (!selected || !(selected[0] && selected[0].isLine())) return false\n\n return true\n }\n\n _is3dish(selected: Component[]) {\n if (!selected || !(selected[0] && selected[0].is3dish())) return false\n\n return true\n }\n}\n"]}
|
1
|
+
{"version":3,"file":"shapes.js","sourceRoot":"","sources":["../../../../../src/modeller/property-sidebar/shapes/shapes.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,OAAO,kCAAkC,CAAA;AACzC,OAAO,oCAAoC,CAAA;AAC3C,OAAO,4BAA4B,CAAA;AACnC,OAAO,0BAA0B,CAAA;AACjC,OAAO,qCAAqC,CAAA;AAE5C,OAAO,EAA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ox-buttons-radio.js'\nimport '@material/web/icon/icon.js'\nimport '@operato/i18n/ox-i18n.js'\nimport '@operato/help/ox-title-with-help.js'\n\nimport { css, html } from 'lit'\nimport { property, state } from 'lit/decorators.js'\nimport { keyed } from 'lit/directives/keyed.js'\n\nimport { BOUNDS, Component, Properties } from '@hatiolab/things-scene'\n\nimport { AbstractProperty } from '../abstract-property.js'\nimport { PropertySharedStyle } from '../property-shared-style.js'\nimport { BoxPaddingEditorStyles } from './box-padding-editor-styles.js'\n\nexport class PropertyShapes extends AbstractProperty {\n static styles = [\n PropertySharedStyle,\n BoxPaddingEditorStyles,\n css`\n fieldset[collapsable] legend {\n box-sizing: border-box;\n width: 100%;\n }\n\n fieldset[collapsable] legend md-icon {\n float: right;\n font-size: medium;\n margin: 0;\n cursor: pointer;\n }\n\n fieldset[collapsable][collapsed] > :not(legend) {\n display: none;\n }\n `,\n css`\n .icon-label label {\n background: var(--url-icon-properties-label) 7px -900px no-repeat;\n }\n\n .icon-label label.width {\n background-position: 7px -96px;\n }\n\n .icon-label label.height {\n background-position: 7px 4px;\n }\n\n .icon-label label.rotate {\n background-position: 7px -198px;\n }\n\n .icon-label label.twidth {\n background-position: 7px -296px;\n }\n\n .icon-label label.theight {\n background-position: 7px -396px;\n }\n\n .icon-label label.zPos {\n background-position: 5px -1098px;\n }\n\n .icon-label label.depth {\n background-position: 5px -1198px;\n }\n\n .icon-label label.rotationX {\n background-position: 5px -1296px;\n }\n\n .icon-label label.rotationY {\n background-position: 5px -1396px;\n }\n\n .icon-label label.rotationZ {\n background-position: 5px -1496px;\n }\n\n ox-buttons-radio > * {\n width: 30px;\n height: 25px;\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\n ox-buttons-radio div {\n background: var(--url-icon-properties) no-repeat;\n }\n\n ox-buttons-radio div[data-value='left'] {\n background-position: 50% 3px;\n }\n\n ox-buttons-radio div[data-value='center'] {\n background-position: 50% -47px;\n }\n\n ox-buttons-radio div[data-value='right'] {\n background-position: 50% -97px;\n }\n\n ox-buttons-radio div[data-value='justify'] {\n background-position: 50% -147px;\n }\n\n ox-buttons-radio div[data-value='top'] {\n background-position: 50% -197px;\n }\n\n ox-buttons-radio div[data-value='middle'] {\n background-position: 50% -193px;\n }\n\n ox-buttons-radio div[data-value='bottom'] {\n background-position: 50% -188px;\n }\n\n ox-buttons-radio div[active] {\n border-color: #f2471c;\n }\n `\n ]\n\n @property({ type: Object }) value?: Properties\n @property({ type: Object }) bounds: BOUNDS | null = null\n @property({ type: Array }) selected: Component[] = []\n\n @state() private _3dExpanded: boolean = false\n\n firstUpdated() {\n this.renderRoot.addEventListener('change', this._onValueChange.bind(this))\n }\n\n render() {\n const value = this.value || {}\n const { width, height } = this.bounds || {}\n\n return html`\n <fieldset>\n <div class=\"property-grid\">\n ${this._isIdentifiable(this.selected)\n ? html`\n <label> <ox-i18n msgid=\"label.id\">ID</ox-i18n> </label>\n <input value-key=\"id\" .value=${value.id || ''} />\n `\n : html``}\n ${this._isClassIdentifiable(this.selected)\n ? html`\n <label> <ox-i18n msgid=\"label.class\">Class</ox-i18n> </label>\n <input value-key=\"class\" .value=${value.class || ''} />\n `\n : html``}\n ${this._hasTextProperty(this.selected)\n ? html`\n <label> <ox-i18n msgid=\"label.text\">Text</ox-i18n> </label>\n <input value-key=\"text\" .value=${value.text || ''} />\n <label> <ox-i18n msgid=\"label.text-format\">Text Format</ox-i18n> </label>\n <input value-key=\"textFormat\" .value=${value.textFormat || ''} list=\"format-list\" />\n <datalist id=\"format-list\">\n <option value=\"#,###.\"></option>\n <option value=\"#,###.#\"></option>\n <option value=\"#,###.0\"></option>\n <option value=\"#,##0.#\"></option>\n <option value=\"#,##0.0\"></option>\n <option value=\"#,##0.0%\"></option>\n </datalist>\n `\n : html``}\n ${this._hasProperties(this.selected)\n ? html`\n <div class=\"checkbox-row\">\n <input id=\"checkbox-hidden\" value-key=\"hidden\" type=\"checkbox\" .checked=${value.hidden} />\n <label for=\"checkbox-hidden\"> <ox-i18n msgid=\"label.item-hidden\">Item Hidden</ox-i18n> </label>\n\n <input id=\"checkbox-locked\" value-key=\"locked\" type=\"checkbox\" .checked=${value.locked} />\n <label for=\"checkbox-locked\"> <ox-i18n msgid=\"label.locked\">Locked</ox-i18n> </label>\n </div>\n `\n : html``}\n </div>\n </fieldset>\n\n ${!this._isLine(this.selected)\n ? keyed(\n this.selected,\n html`\n <fieldset class=\"icon-label unit ratio\">\n <legend>\n <ox-title-with-help topic=\"board-modeller/shapes/size\" msgid=\"label.size\">size</ox-title-with-help>\n </legend>\n\n <div class=\"property-grid\">\n <label class=\"width\"> <ox-i18n msgid=\"label.width\">width</ox-i18n> </label>\n <input type=\"number\" value-key=\"bounds.width\" .value=${String(width)} />\n <label class=\"height\"> <ox-i18n msgid=\"label.height\">height</ox-i18n> </label>\n <input type=\"number\" value-key=\"bounds.height\" .value=${String(height)} />\n\n ${this.selected.length && this.selected[0].isRootModel()\n ? html``\n : html`\n <label class=\"rotate\"> <ox-i18n msgid=\"label.rotate\">rotate</ox-i18n> </label>\n <ox-input-angle value-key=\"rotation\" .value=${value.rotation}> </ox-input-angle>\n `}\n </div>\n </fieldset>\n `\n )\n : html``}\n ${this._is3dish(this.selected)\n ? html`\n <fieldset class=\"icon-label unit ratio\" collapsable ?collapsed=${!this._3dExpanded}>\n <legend>\n <ox-title-with-help topic=\"board-modeller/shapes/3dish\" msgid=\"label.3dish\">3D</ox-title-with-help>\n <md-icon\n @click=${(e: Event) => {\n this._3dExpanded = !this._3dExpanded\n }}\n >${this._3dExpanded ? 'expand_less' : 'expand_more'}</md-icon\n >\n </legend>\n\n <div class=\"property-grid\">\n <label class=\"zPos\"> <ox-i18n msgid=\"label.z-pos\">pos. Z</ox-i18n> </label>\n <input type=\"number\" value-key=\"zPos\" .value=${value.zPos} />\n <label class=\"depth\"> <ox-i18n msgid=\"label.depth\">depth</ox-i18n> </label>\n <input type=\"number\" value-key=\"depth\" .value=${value.depth} />\n\n <label class=\"rotationX\"> <ox-i18n msgid=\"label.rotation-x\">rot. X</ox-i18n> </label>\n <ox-input-angle value-key=\"rotationX\" .value=${value.rotationX}> </ox-input-angle>\n\n <label class=\"rotationY\"> <ox-i18n msgid=\"label.rotation-y\">rot. Y</ox-i18n> </label>\n <ox-input-angle value-key=\"rotationY\" .value=${value.rotationY}> </ox-input-angle>\n\n <label class=\"rotationZ\"> <ox-i18n msgid=\"label.rotation-z\">rot. Z</ox-i18n> </label>\n <ox-input-angle value-key=\"rotation\" .value=${value.rotation}> </ox-input-angle>\n </div>\n </fieldset>\n `\n : html``}\n ${this._hasTextProperty(this.selected)\n ? html`\n <fieldset>\n <legend>\n <ox-title-with-help topic=\"board-modeller/shapes/text-box\" msgid=\"label.text-box\"\n >text box</ox-title-with-help\n >\n </legend>\n\n <div class=\"property-grid\">\n <label> <ox-i18n msgid=\"label.horizontal\">horizontal</ox-i18n> </label>\n <ox-buttons-radio value-key=\"textAlign\" .value=${value.textAlign}>\n <div data-value=\"left\"></div>\n <div data-value=\"center\"></div>\n <div data-value=\"right\"></div>\n <div data-value=\"justify\"></div>\n </ox-buttons-radio>\n\n <label> <ox-i18n msgid=\"label.vertical\">vertical</ox-i18n> </label>\n <ox-buttons-radio value-key=\"textBaseline\" .value=${value.textBaseline}>\n <div data-value=\"top\"></div>\n <div data-value=\"middle\"></div>\n <div data-value=\"bottom\"></div>\n </ox-buttons-radio>\n\n <div class=\"checkbox-row\">\n <input\n id=\"checkbox-support-markdown\"\n type=\"checkbox\"\n value-key=\"supportMarkdown\"\n .checked=${value.supportMarkdown}\n />\n <label for=\"checkbox-support-markdown\">\n <ox-i18n msgid=\"label.support-markdown\">Support Markdown</ox-i18n>\n </label>\n </div>\n\n <div class=\"checkbox-row\">\n <input id=\"checkbox-textwrap\" type=\"checkbox\" value-key=\"textWrap\" .checked=${value.textWrap} />\n <label for=\"checkbox-textwrap\"> <ox-i18n msgid=\"label.text-wrap\">Text Wrap</ox-i18n> </label>\n </div>\n\n ${!value.textWrap\n ? html` <label for=\"checkbox-textOverflow\">\n <ox-i18n msgid=\"label.text-overflow\">Text Overflow</ox-i18n>\n </label>\n <select value-key=\"textOverflow\" .value=${value.textOverflow || ''}>\n <option value=\"\" selected>none</option>\n <option value=\"ellipsis\">ellipsis</option>\n <option value=\"clip\">clip</option>\n </select>`\n : ''}\n\n <label> <ox-i18n msgid=\"label.padding\">padding</ox-i18n> </label>\n <table class=\"box-padding\">\n <tr>\n <td class=\"slide1\"></td>\n <td class=\"slide2\"></td>\n <td class=\"slide3\"></td>\n </tr>\n <tr>\n <td class=\"slide4\"></td>\n <td class=\"slide5\">\n <input type=\"number\" value-key=\"paddingTop\" .value=${value.paddingTop || 0} />\n <input type=\"number\" value-key=\"paddingLeft\" .value=${value.paddingLeft || 0} />\n <input type=\"number\" value-key=\"paddingRight\" .value=${value.paddingRight || 0} />\n <input type=\"number\" value-key=\"paddingBottom\" .value=${value.paddingBottom || 0} />\n </td>\n <td class=\"slide6\"></td>\n </tr>\n <tr>\n <td class=\"slide7\"></td>\n <td class=\"slide8\"></td>\n <td class=\"slide9\"></td>\n </tr>\n </table>\n </div>\n </fieldset>\n `\n : html``}\n ${this.selected.length && this.selected[0].isRootModel()\n ? html`\n <fieldset class=\"icon-label\">\n <legend>\n <ox-title-with-help topic=\"board-modeller/shapes/viewer-option\" msgid=\"label.viewer-option\"\n >Viewer Option</ox-title-with-help\n >\n </legend>\n\n <div class=\"property-grid\">\n <label><ox-i18n msgid=\"label.fit\">Fit</ox-i18n></label>\n <select value-key=\"fitMode\" .value=${value.fitMode || 'ratio'}>\n <option value=\"none\">none</option>\n <option value=\"center\">center</option>\n <option value=\"ratio\" selected>ratio</option>\n <option value=\"both\">both</option>\n <option value=\"width\">width</option>\n <option value=\"height\">height</option>\n </select>\n </div>\n </fieldset>\n <fieldset class=\"icon-label\">\n <legend>\n <ox-title-with-help topic=\"board-modeller/shapes/print-option\" msgid=\"label.label-print\"\n >Print Option</ox-title-with-help\n >\n </legend>\n\n <div class=\"property-grid\">\n <label class=\"rotate\"><ox-i18n msgid=\"label.label-rotation\">Label Rotation</ox-i18n></label>\n <select value-key=\"labelRotation\" .value=${value.labelRotation || 'N'}>\n <option value=\"N\" selected>0°</option>\n <option value=\"B\">90°</option>\n <option value=\"I\">180°</option>\n <option value=\"R\">270°</option>\n </select>\n </div>\n </fieldset>\n `\n : html``}\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 var value = this._getValueFromEventTarget(element)\n\n if (key.indexOf('bounds.') == 0) {\n if (isNaN(value)) return\n this.dispatchEvent(\n new CustomEvent('bounds-change', {\n bubbles: true,\n composed: true,\n detail: {\n [key.substr(7)]: value\n }\n })\n )\n } else {\n this._onAfterValueChange(key, value)\n }\n }\n\n _hasTextProperty(selected: Component[]) {\n for (let i = 0; i < selected.length; i++) {\n if (!selected[i].hasTextProperty) return false\n }\n\n return true\n }\n\n _hasProperties(selected: Component[]) {\n if (!selected || selected.length == 0 || (selected[0] && selected[0].isLayer && selected[0].isLayer())) return false\n\n return true\n }\n\n _isIdentifiable(selected: Component[]) {\n if (!selected || selected.length == 0 || selected.length > 1 || (selected[0].isLayer && selected[0].isLayer()))\n return false\n\n return true\n }\n\n _isClassIdentifiable(selected: Component[]) {\n if (!selected || (selected[0] && selected[0].isLayer())) return false\n\n return true\n }\n\n _isLine(selected: Component[]) {\n if (!selected || !(selected[0] && selected[0].isLine())) return false\n\n return true\n }\n\n _is3dish(selected: Component[]) {\n if (!selected || !(selected[0] && selected[0].is3dish())) return false\n\n return true\n }\n}\n"]}
|
@@ -52,24 +52,7 @@ function convertValue(type, value) {
|
|
52
52
|
export class SpecificPropertiesBuilder extends LitElement {
|
53
53
|
constructor() {
|
54
54
|
super(...arguments);
|
55
|
-
|
56
|
-
enumerable: true,
|
57
|
-
configurable: true,
|
58
|
-
writable: true,
|
59
|
-
value: void 0
|
60
|
-
});
|
61
|
-
Object.defineProperty(this, "props", {
|
62
|
-
enumerable: true,
|
63
|
-
configurable: true,
|
64
|
-
writable: true,
|
65
|
-
value: []
|
66
|
-
});
|
67
|
-
Object.defineProperty(this, "propertyEditor", {
|
68
|
-
enumerable: true,
|
69
|
-
configurable: true,
|
70
|
-
writable: true,
|
71
|
-
value: void 0
|
72
|
-
});
|
55
|
+
this.props = [];
|
73
56
|
}
|
74
57
|
render() {
|
75
58
|
return html `<slot></slot>`;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"specific-properties-builder.js","sourceRoot":"","sources":["../../../../../src/modeller/property-sidebar/specifics/specific-properties-builder.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,OAAO,iCAAiC,CAAA,CAAC,sCAAsC;AAE/E,OAAO,EAAE,IAAI,EAAE,UAAU,EAAkB,MAAM,KAAK,CAAA;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAG5C,OAAO,EAAE,gBAAgB,EAAgB,MAAM,0BAA0B,CAAA;AAEzE;;;;;;;;;;;EAWE;AAEF,MAAM,aAAa,GAAG;IACpB,MAAM,EAAE,EAAE;IACV,oCAAoC;IACpC,KAAK,EAAE,CAAC;IACR,MAAM,EAAE,EAAE;IACV,QAAQ,EAAE,EAAE;IACZ,QAAQ,EAAE,EAAE;IACZ,QAAQ,EAAE,KAAK;IACf,MAAM,EAAE,EAAE;IACV,KAAK,EAAE,SAAS;IAChB,kBAAkB,EAAE,IAAI;IACxB,qBAAqB,EAAE,IAAI;IAC3B,eAAe,EAAE,EAAE;IACnB,gBAAgB,EAAE,EAAE;IACpB,aAAa,EAAE,IAAI;IACnB,WAAW,EAAE,IAAI;IACjB,aAAa,EAAE,EAAE;IACjB,OAAO,EAAE,IAAI;IACb,IAAI,EAAE,IAAI;CACX,CAAA;AAED,SAAS,YAAY,CAAC,IAAY,EAAE,KAAU;IAC5C,IAAI,SAAS,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAA;IAC9D,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,QAAQ,CAAC;QACd,KAAK,OAAO;YACV,SAAS,GAAG,UAAU,CAAC,KAAK,CAAC,CAAA;YAC7B,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAA;YACpD,MAAK;IACT,CAAC;IAED,OAAO,SAAS,CAAA;AAClB,CAAC;AAED,MAAM,OAAO,yBAA0B,SAAQ,UAAU;IAAzD;;
|
1
|
+
{"version":3,"file":"specific-properties-builder.js","sourceRoot":"","sources":["../../../../../src/modeller/property-sidebar/specifics/specific-properties-builder.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,OAAO,iCAAiC,CAAA,CAAC,sCAAsC;AAE/E,OAAO,EAAE,IAAI,EAAE,UAAU,EAAkB,MAAM,KAAK,CAAA;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAG5C,OAAO,EAAE,gBAAgB,EAAgB,MAAM,0BAA0B,CAAA;AAEzE;;;;;;;;;;;EAWE;AAEF,MAAM,aAAa,GAAG;IACpB,MAAM,EAAE,EAAE;IACV,oCAAoC;IACpC,KAAK,EAAE,CAAC;IACR,MAAM,EAAE,EAAE;IACV,QAAQ,EAAE,EAAE;IACZ,QAAQ,EAAE,EAAE;IACZ,QAAQ,EAAE,KAAK;IACf,MAAM,EAAE,EAAE;IACV,KAAK,EAAE,SAAS;IAChB,kBAAkB,EAAE,IAAI;IACxB,qBAAqB,EAAE,IAAI;IAC3B,eAAe,EAAE,EAAE;IACnB,gBAAgB,EAAE,EAAE;IACpB,aAAa,EAAE,IAAI;IACnB,WAAW,EAAE,IAAI;IACjB,aAAa,EAAE,EAAE;IACjB,OAAO,EAAE,IAAI;IACb,IAAI,EAAE,IAAI;CACX,CAA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AAC;wDAAkB;AAChB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;iEAAoB","sourcesContent":["/**\n * @license Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport '@operato/app/property-editor.js' /* for registering property editors */\n\nimport { html, LitElement, PropertyValues } from 'lit'\nimport { property } from 'lit/decorators.js'\n\nimport { Properties } from '@hatiolab/things-scene'\nimport { OxPropertyEditor, PropertySpec } from '@operato/property-editor'\n\n/**\n모든 에디터들은 change 이벤트를 지원해야 한다. 또한, 모든 에디터들은 value속성에 값을 가져야 한다.\n\nExample:\n\n <specific-properties-builder value=\"{{value}}\">\n <label>Center X</label>\n <input type=\"number\" .value=\"${value.cx}\">\n <label>Width</label>\n <input type=\"number\" .value=\"${value.width}\">\n </specific-properties-builder>\n*/\n\nconst DEFAULT_VALUE = {\n legend: '',\n // number: 0, // should be undefined\n angle: 0,\n string: '',\n password: '',\n textarea: '',\n checkbox: false,\n select: '',\n color: '#000000',\n 'solidcolor-stops': null,\n 'gradientcolor-stops': null,\n 'gltf-selector': '',\n 'image-selector': '',\n multiplecolor: null,\n editortable: null,\n imageselector: '',\n options: null,\n date: null\n}\n\nfunction convertValue(type: string, value: any) {\n var converted = String(value).trim() == '' ? undefined : value\n switch (type) {\n case 'number':\n case 'angle':\n converted = parseFloat(value)\n converted = isNaN(converted) ? undefined : converted\n break\n }\n\n return converted\n}\n\nexport class SpecificPropertiesBuilder extends LitElement {\n @property({ type: Object }) value: any\n @property({ type: Array }) props: any[] = []\n @property({ type: Object }) propertyEditor: any\n\n render() {\n return html`<slot></slot>`\n }\n\n firstUpdated() {\n this.addEventListener('change', this._onValueChanged.bind(this))\n }\n\n updated(changes: PropertyValues<this>) {\n changes.has('props') && this._onPropsChanged(this.props)\n changes.has('value') && this._setValues()\n }\n\n _onPropsChanged(props: any[]) {\n this.textContent = ''\n ;(props || []).forEach((spec: PropertySpec) => {\n const { label, type, placeholder, name, observe, property, editor, quantifier, defaultValue, disabled } = spec\n\n let elementType = OxPropertyEditor.getEditor(type)\n if (!elementType) {\n console.warn('Property Editor not defined', type)\n return\n }\n let element = document.createElement(elementType) as OxPropertyEditor\n\n element.label = label\n element.type = type\n element.placeholder = placeholder\n element.name = name\n element.setAttribute('name', name)\n\n if (observe) {\n element.observeHandler = observe\n }\n element.property = property\n element.editor = editor\n element.quantifier = quantifier\n element.defaultValue = defaultValue\n element.setAttribute('property-editor', 'true')\n element.disabled = disabled\n\n this.appendChild(element)\n })\n }\n\n _setValues() {\n this.value &&\n Array.from(this.querySelectorAll('[name]')).forEach((prop: Properties) => {\n let name = prop.getAttribute('name')\n if (!name) {\n return\n }\n var convertedValue = convertValue(prop.type, this.value[name])\n if (convertedValue === undefined) {\n convertedValue = (DEFAULT_VALUE as any)[prop.type]\n }\n prop.value = convertedValue\n prop.observe.call(prop, prop.value)\n })\n }\n\n _onValueChanged(e: Event) {\n e.stopPropagation()\n var target = e.target as Element\n\n const prop = target.closest('[property-editor]') as OxPropertyEditor\n\n var name = prop.getAttribute('name')\n if (!name) {\n return\n }\n\n this.value[name] = prop.value\n\n prop.observe(prop.value)\n this._setValues()\n\n this.dispatchEvent(\n new CustomEvent('property-change', {\n bubbles: true,\n composed: true,\n detail: {\n [name]: prop.value\n }\n })\n )\n }\n}\n"]}
|
@@ -12,42 +12,11 @@ import { SpecificPropertiesBuilder } from './specific-properties-builder.js';
|
|
12
12
|
export class PropertySpecific extends ScopedElementsMixin(LitElement) {
|
13
13
|
constructor() {
|
14
14
|
super(...arguments);
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
});
|
21
|
-
Object.defineProperty(this, "scene", {
|
22
|
-
enumerable: true,
|
23
|
-
configurable: true,
|
24
|
-
writable: true,
|
25
|
-
value: null
|
26
|
-
});
|
27
|
-
Object.defineProperty(this, "selected", {
|
28
|
-
enumerable: true,
|
29
|
-
configurable: true,
|
30
|
-
writable: true,
|
31
|
-
value: []
|
32
|
-
});
|
33
|
-
Object.defineProperty(this, "props", {
|
34
|
-
enumerable: true,
|
35
|
-
configurable: true,
|
36
|
-
writable: true,
|
37
|
-
value: []
|
38
|
-
});
|
39
|
-
Object.defineProperty(this, "propertyEditor", {
|
40
|
-
enumerable: true,
|
41
|
-
configurable: true,
|
42
|
-
writable: true,
|
43
|
-
value: []
|
44
|
-
});
|
45
|
-
Object.defineProperty(this, "boundINeedSelected", {
|
46
|
-
enumerable: true,
|
47
|
-
configurable: true,
|
48
|
-
writable: true,
|
49
|
-
value: this._onINeedSelected.bind(this)
|
50
|
-
});
|
15
|
+
this.scene = null;
|
16
|
+
this.selected = [];
|
17
|
+
this.props = [];
|
18
|
+
this.propertyEditor = [];
|
19
|
+
this.boundINeedSelected = this._onINeedSelected.bind(this);
|
51
20
|
}
|
52
21
|
connectedCallback() {
|
53
22
|
super.connectedCallback();
|
@@ -83,13 +52,9 @@ export class PropertySpecific extends ScopedElementsMixin(LitElement) {
|
|
83
52
|
});
|
84
53
|
}
|
85
54
|
}
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
writable: true,
|
90
|
-
value: [
|
91
|
-
PropertySharedStyle,
|
92
|
-
css `
|
55
|
+
PropertySpecific.styles = [
|
56
|
+
PropertySharedStyle,
|
57
|
+
css `
|
93
58
|
label {
|
94
59
|
display: block;
|
95
60
|
margin: 10px;
|
@@ -100,8 +65,7 @@ Object.defineProperty(PropertySpecific, "styles", {
|
|
100
65
|
text-transform: capitalize;
|
101
66
|
}
|
102
67
|
`
|
103
|
-
|
104
|
-
});
|
68
|
+
];
|
105
69
|
__decorate([
|
106
70
|
property({ type: Object })
|
107
71
|
], PropertySpecific.prototype, "value", void 0);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"specifics.js","sourceRoot":"","sources":["../../../../../src/modeller/property-sidebar/specifics/specifics.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,OAAO,+BAA+B,CAAA;AAEtC,OAAO,EAAE,GAAG,EAAE,IAAI,E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A1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;kDAA2B;AAC1B;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;+CAAkB;AACjB;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;wDAA2B","sourcesContent":["/**\n * @license Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport '@operato/help/ox-help-icon.js'\n\nimport { css, html, LitElement } from 'lit'\nimport { property } from 'lit/decorators.js'\n\nimport { Component, Scene } from '@hatiolab/things-scene'\nimport { ScopedElementsMixin } from '@open-wc/scoped-elements/lit-element.js'\n\nimport { i18next } from '@operato/i18n'\n\nimport { PropertySharedStyle } from '../property-shared-style.js'\nimport { SpecificPropertiesBuilder } from './specific-properties-builder.js'\n\nexport class PropertySpecific extends ScopedElementsMixin(LitElement) {\n static styles = [\n PropertySharedStyle,\n css`\n label {\n display: block;\n margin: 10px;\n\n text-align: right;\n font: bold 14px var(--theme-font);\n color: var(--md-sys-color-on-primary-container);\n text-transform: capitalize;\n }\n `\n ]\n\n @property({ type: Object }) value: any\n @property({ type: Object }) scene: Scene | null = null\n @property({ type: Array }) selected: Component[] = []\n @property({ type: Array }) props: any[] = []\n @property({ type: Array }) propertyEditor: any[] = []\n\n private boundINeedSelected: any = this._onINeedSelected.bind(this)\n\n connectedCallback() {\n super.connectedCallback()\n\n this.addEventListener('i-need-selected', this.boundINeedSelected)\n }\n\n disconnectedCallback() {\n super.disconnectedCallback()\n\n this.removeEventListener('i-need-selected', this.boundINeedSelected)\n }\n static get scopedElements() {\n return {\n 'specific-properties-builder': SpecificPropertiesBuilder\n }\n }\n render() {\n const selected = this.selected && this.selected[0]\n const value = this.value || {}\n\n return html`\n <label\n >${i18next.t(`component.${value.type}`)}<ox-help-icon .topic=${selected?.nature?.help}></ox-help-icon\n ></label>\n\n <specific-properties-builder .value=${value} .props=${this.props} .propertyEditor=${this.propertyEditor}>\n </specific-properties-builder>\n `\n }\n\n _onINeedSelected(e: CustomEvent) {\n e.stopPropagation()\n\n var { callback } = e.detail\n\n this.scene!.undoableChange(() => {\n callback.call(null, this.selected)\n })\n }\n}\n"]}
|
@@ -16,24 +16,9 @@ import { PropertySharedStyle } from '../property-shared-style.js';
|
|
16
16
|
export class PropertyStyles extends AbstractProperty {
|
17
17
|
constructor() {
|
18
18
|
super(...arguments);
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
writable: true,
|
23
|
-
value: {}
|
24
|
-
});
|
25
|
-
Object.defineProperty(this, "selected", {
|
26
|
-
enumerable: true,
|
27
|
-
configurable: true,
|
28
|
-
writable: true,
|
29
|
-
value: []
|
30
|
-
});
|
31
|
-
Object.defineProperty(this, "fonts", {
|
32
|
-
enumerable: true,
|
33
|
-
configurable: true,
|
34
|
-
writable: true,
|
35
|
-
value: []
|
36
|
-
});
|
19
|
+
this.value = {};
|
20
|
+
this.selected = [];
|
21
|
+
this.fonts = [];
|
37
22
|
}
|
38
23
|
firstUpdated() {
|
39
24
|
this.renderRoot.addEventListener('change', this._onValueChange.bind(this));
|
@@ -259,13 +244,9 @@ export class PropertyStyles extends AbstractProperty {
|
|
259
244
|
return isLine;
|
260
245
|
}
|
261
246
|
}
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
writable: true,
|
266
|
-
value: [
|
267
|
-
PropertySharedStyle,
|
268
|
-
css `
|
247
|
+
PropertyStyles.styles = [
|
248
|
+
PropertySharedStyle,
|
249
|
+
css `
|
269
250
|
ox-input-range {
|
270
251
|
width: 100%;
|
271
252
|
}
|
@@ -568,8 +549,7 @@ Object.defineProperty(PropertyStyles, "styles", {
|
|
568
549
|
background-position: 110% -1400px !important;
|
569
550
|
}
|
570
551
|
`
|
571
|
-
|
572
|
-
});
|
552
|
+
];
|
573
553
|
__decorate([
|
574
554
|
property({ type: Object })
|
575
555
|
], PropertyStyles.prototype, "value", void 0);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"styles.js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AAG,IAAI,CAAA;QACf,CAAC;QAED,OAAO,MAAM,CAAA;IACf,CAAC;;AA9iBM;;;;WAAS;QACd,mBAAmB;QACnB,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA8SF;KACF;EAjTY,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.js'\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 letterSpacing,\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-onethird-label icon-only-label font-size\"></label>\n <input type=\"number\" value-key=\"fontSize\" .value=${fontSize} class=\"property-onethird-input\" />\n\n <label class=\"property-onethird-label icon-only-label lineHeight\"></label>\n <input type=\"number\" value-key=\"lineHeight\" .value=${lineHeight} class=\"property-onethird-input\" />\n\n <label class=\"property-onethird-label icon-only-label letterSpacing\"></label>\n <input type=\"number\" value-key=\"letterSpacing\" .value=${letterSpacing} class=\"property-onethird-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,qDAAqD,CAAA;AAC5D,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,MAAM,mBAAmB,CAAA;AAI5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAA;AAEjE,MAAM,OAAO,cAAe,SAAQ,gBAAgB;IAApD;;QAmT8B,UAAK,GAAQ,EAAE,CAAA;QAChB,aAAQ,GAAgB,EAAE,CAAA;QAC1B,UAAK,GAAU,EAAE,CAAA;IA2P9C,CAAC;IAzPC,YAAY;QACV,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,QAAQ,EAAE,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA;IAC5E,CAAC;IAED,MAAM;QACJ,IAAI,EACF,KAAK,GAAG,CAAC,EACT,UAAU,EACV,QAAQ,EACR,UAAU,EACV,SAAS,EACT,aAAa,EACb,IAAI,EACJ,MAAM,EACN,SAAS,EACT,SAAS,EACT,WAAW,EACX,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,KAAK,EACL,SAAS,EACT,GAAG,EACH,OAAO,EACR,GAAG,IAAI,CAAC,KAAK,IAAI,EAAE,CAAA;QAEpB,OAAO,IAAI,CAAA;;;;;8EAK+D,KAA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,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC;gBACnC,MAAM,GAAG,KAAK,CAAA;gBACd,OAAO,MAAM,CAAA;YACf,CAAC;YAED,MAAM,GAAG,IAAI,CAAA;QACf,CAAC;QAED,OAAO,MAAM,CAAA;IACf,CAAC;;AA9iBM,qBAAM,GAAG;IACd,mBAAmB;IACnB,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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.js'\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 letterSpacing,\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-onethird-label icon-only-label font-size\"></label>\n <input type=\"number\" value-key=\"fontSize\" .value=${fontSize} class=\"property-onethird-input\" />\n\n <label class=\"property-onethird-label icon-only-label lineHeight\"></label>\n <input type=\"number\" value-key=\"lineHeight\" .value=${lineHeight} class=\"property-onethird-input\" />\n\n <label class=\"property-onethird-label icon-only-label letterSpacing\"></label>\n <input type=\"number\" value-key=\"letterSpacing\" .value=${letterSpacing} class=\"property-onethird-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"]}
|
@@ -3,21 +3,6 @@ import './ox-scene-property.js';
|
|
3
3
|
import { LitElement, html } from 'lit';
|
4
4
|
import { customElement, property } from 'lit/decorators.js';
|
5
5
|
let OxSceneHandler = class OxSceneHandler extends LitElement {
|
6
|
-
constructor() {
|
7
|
-
super(...arguments);
|
8
|
-
Object.defineProperty(this, "type", {
|
9
|
-
enumerable: true,
|
10
|
-
configurable: true,
|
11
|
-
writable: true,
|
12
|
-
value: void 0
|
13
|
-
});
|
14
|
-
Object.defineProperty(this, "model", {
|
15
|
-
enumerable: true,
|
16
|
-
configurable: true,
|
17
|
-
writable: true,
|
18
|
-
value: void 0
|
19
|
-
});
|
20
|
-
}
|
21
6
|
render() {
|
22
7
|
return html ` <slot select="ox-scene-property"></slot> `;
|
23
8
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ox-scene-handler.js","sourceRoot":"","sources":["../../../../src/modeller/scene-viewer/ox-scene-handler.ts"],"names":[],"mappings":";AAAA,OAAO,wBAAwB,CAAA;AAE/B,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AACtC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAG5C,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,UAAU;
|
1
|
+
{"version":3,"file":"ox-scene-handler.js","sourceRoot":"","sources":["../../../../src/modeller/scene-viewer/ox-scene-handler.ts"],"names":[],"mappings":";AAAA,OAAO,wBAAwB,CAAA;AAE/B,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AACtC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAG5C,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,UAAU;IAOpD,MAAM;QACJ,OAAO,IAAI,CAAA,4CAA4C,CAAA;IACzD,CAAC;IAED,iBAAiB;QACf,KAAK,CAAC,iBAAiB,EAAE,CAAA;QAEzB,IAAI,KAAK,GAAQ;YACf,IAAI,EAAE,IAAI,CAAC,IAAI;SAChB,CAAA;QAED,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,KAAU,EAAE,QAAa,EAAE,EAAE;YAClG,MAAM,IAAI,GAAG,QAAQ,CAAC,YAAY,CAAC,MAAM,CAAC,CAAA;YAC1C,MAAM,KAAK,GAAG,QAAQ,CAAC,YAAY,CAAC,OAAO,CAAC,CAAA;YAE5C,IAAI,IAAI,EAAE,CAAC;gBACT,KAAK,CAAC,IAAI,CAAC,GAAG,KAAK,CAAA;YACrB,CAAC;YAED,OAAO,KAAK,CAAA;QACd,CAAC,EAAE,KAAK,CAAC,CAAA;QAET,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAA;QAErB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;IACpB,CAAC;CACF,CAAA;AAhC6B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4CAAc;AACb;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CAG1B;AALkB,cAAc;IADlC,aAAa,CAAC,kBAAkB,CAAC;GACb,cAAc,CAiClC;eAjCoB,cAAc","sourcesContent":["import './ox-scene-property.js'\n\nimport { LitElement, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\n@customElement('ox-scene-handler')\nexport default class OxSceneHandler extends LitElement {\n @property({ type: String }) type!: string\n @property({ type: Object }) model!: {\n type: Object\n notify: true\n }\n\n render() {\n return html` <slot select=\"ox-scene-property\"></slot> `\n }\n\n connectedCallback() {\n super.connectedCallback()\n\n let model: any = {\n type: this.type\n }\n\n model = Array.from(this.querySelectorAll('ox-scene-property')).reduce((model: any, property: any) => {\n const name = property.getAttribute('name')\n const value = property.getAttribute('value')\n\n if (name) {\n model[name] = value\n }\n\n return model\n }, model)\n\n model.__host__ = this\n\n this.model = model\n }\n}\n"]}
|
@@ -3,21 +3,6 @@ import './ox-scene-property.js';
|
|
3
3
|
import { LitElement, html } from 'lit';
|
4
4
|
import { customElement, property } from 'lit/decorators.js';
|
5
5
|
let OxSceneLayer = class OxSceneLayer extends LitElement {
|
6
|
-
constructor() {
|
7
|
-
super(...arguments);
|
8
|
-
Object.defineProperty(this, "type", {
|
9
|
-
enumerable: true,
|
10
|
-
configurable: true,
|
11
|
-
writable: true,
|
12
|
-
value: void 0
|
13
|
-
});
|
14
|
-
Object.defineProperty(this, "text", {
|
15
|
-
enumerable: true,
|
16
|
-
configurable: true,
|
17
|
-
writable: true,
|
18
|
-
value: void 0
|
19
|
-
});
|
20
|
-
}
|
21
6
|
render() {
|
22
7
|
return html ` <slot select="ox-scene-property"></slot> `;
|
23
8
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ox-scene-layer.js","sourceRoot":"","sources":["../../../../src/modeller/scene-viewer/ox-scene-layer.ts"],"names":[],"mappings":";AAAA,OAAO,wBAAwB,CAAA;AAE/B,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AACtC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAG5C,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,UAAU;
|
1
|
+
{"version":3,"file":"ox-scene-layer.js","sourceRoot":"","sources":["../../../../src/modeller/scene-viewer/ox-scene-layer.ts"],"names":[],"mappings":";AAAA,OAAO,wBAAwB,CAAA;AAE/B,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AACtC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAG5C,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,UAAU;IAIlD,MAAM;QACJ,OAAO,IAAI,CAAA,4CAA4C,CAAA;IACzD,CAAC;IAED,QAAQ;QACN,IAAI,KAAK,GAAG;YACV,IAAI,EAAE,IAAI,CAAC,IAAI;SAChB,CAAA;QAED,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,KAAU,EAAE,QAAa,EAAE,EAAE;YAClG,IAAI,KAAK,GAAQ,QAAQ,CAAC,KAAK,CAAA;YAE/B,IAAI,QAAQ,CAAC,IAAI,EAAE,CAAC;gBAClB,QAAQ,QAAQ,CAAC,IAAI,EAAE,CAAC;oBACtB,KAAK,QAAQ;wBACX,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAA;wBACrB,MAAK;oBACP,KAAK,SAAS;wBACZ,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,CAAA;wBACtB,MAAK;oBACP,QAAQ;gBACV,CAAC;gBAED,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,KAAK,CAAA;YAC9B,CAAC;YAED,OAAO,KAAK,CAAA;QACd,CAAC,EAAE,KAAK,CAAC,CAAA;QAET,OAAO,KAAK,CAAA;IACd,CAAC;CACF,CAAA;AAlC6B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;0CAAc;AACb;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;0CAAc;AAFtB,YAAY;IADhC,aAAa,CAAC,gBAAgB,CAAC;GACX,YAAY,CAmChC;eAnCoB,YAAY","sourcesContent":["import './ox-scene-property.js'\n\nimport { LitElement, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\n@customElement('ox-scene-layer')\nexport default class OxSceneLayer extends LitElement {\n @property({ type: String }) type?: String\n @property({ type: String }) text?: String\n\n render() {\n return html` <slot select=\"ox-scene-property\"></slot> `\n }\n\n getModel() {\n let model = {\n type: this.type\n }\n\n model = Array.from(this.querySelectorAll('ox-scene-property')).reduce((model: any, property: any) => {\n let value: any = property.value\n\n if (property.name) {\n switch (property.type) {\n case 'number':\n value = Number(value)\n break\n case 'boolean':\n value = Boolean(value)\n break\n default:\n }\n\n model[property.name] = value\n }\n\n return model\n }, model)\n\n return model\n }\n}\n"]}
|
@@ -2,27 +2,6 @@ import { __decorate } from "tslib";
|
|
2
2
|
import { customElement, property } from 'lit/decorators.js';
|
3
3
|
import { LitElement } from 'lit';
|
4
4
|
let OxSceneProperty = class OxSceneProperty extends LitElement {
|
5
|
-
constructor() {
|
6
|
-
super(...arguments);
|
7
|
-
Object.defineProperty(this, "name", {
|
8
|
-
enumerable: true,
|
9
|
-
configurable: true,
|
10
|
-
writable: true,
|
11
|
-
value: void 0
|
12
|
-
});
|
13
|
-
Object.defineProperty(this, "value", {
|
14
|
-
enumerable: true,
|
15
|
-
configurable: true,
|
16
|
-
writable: true,
|
17
|
-
value: void 0
|
18
|
-
});
|
19
|
-
Object.defineProperty(this, "type", {
|
20
|
-
enumerable: true,
|
21
|
-
configurable: true,
|
22
|
-
writable: true,
|
23
|
-
value: void 0
|
24
|
-
});
|
25
|
-
}
|
26
5
|
};
|
27
6
|
__decorate([
|
28
7
|
property({ type: String })
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ox-scene-property.js","sourceRoot":"","sources":["../../../../src/modeller/scene-viewer/ox-scene-property.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE3D,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAGjB,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,UAAU;
|
1
|
+
{"version":3,"file":"ox-scene-property.js","sourceRoot":"","sources":["../../../../src/modeller/scene-viewer/ox-scene-property.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE3D,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAGjB,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,UAAU;CAItD,CAAA;AAH6B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CAAc;AACb;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;8CAAe;AACd;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CAAc;AAHtB,eAAe;IADnC,aAAa,CAAC,mBAAmB,CAAC;GACd,eAAe,CAInC;eAJoB,eAAe","sourcesContent":["import { customElement, property } from 'lit/decorators.js'\n\nimport { LitElement } from 'lit'\n\n@customElement('ox-scene-property')\nexport default class OxSceneProperty extends LitElement {\n @property({ type: String }) name!: string\n @property({ type: String }) value!: string\n @property({ type: String }) type!: string\n}\n"]}
|