@operato/board 8.0.1 → 9.0.0-beta.10
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 +272 -37
- package/dist/src/component/3d.d.ts +1 -1
- package/dist/src/component/3d.js.map +1 -1
- package/dist/src/component/chart-and-gauge.d.ts +1 -1
- package/dist/src/component/chart-and-gauge.js.map +1 -1
- package/dist/src/component/container.d.ts +1 -1
- package/dist/src/component/container.js.map +1 -1
- package/dist/src/component/data-source.d.ts +1 -1
- package/dist/src/component/data-source.js.map +1 -1
- package/dist/src/component/etc.d.ts +1 -1
- package/dist/src/component/etc.js.map +1 -1
- package/dist/src/component/form.d.ts +1 -1
- package/dist/src/component/form.js.map +1 -1
- package/dist/src/component/index.d.ts +12 -12
- package/dist/src/component/index.js +12 -12
- package/dist/src/component/index.js.map +1 -1
- package/dist/src/component/iot.d.ts +1 -1
- package/dist/src/component/iot.js.map +1 -1
- package/dist/src/component/line.d.ts +1 -1
- package/dist/src/component/line.js.map +1 -1
- package/dist/src/component/register-default-groups.js +13 -13
- package/dist/src/component/register-default-groups.js.map +1 -1
- package/dist/src/component/shape.d.ts +1 -1
- package/dist/src/component/shape.js.map +1 -1
- package/dist/src/component/table.d.ts +1 -1
- package/dist/src/component/table.js.map +1 -1
- package/dist/src/component/text-and-media.d.ts +1 -1
- package/dist/src/component/text-and-media.js.map +1 -1
- package/dist/src/component/warehouse.d.ts +1 -1
- package/dist/src/component/warehouse.js.map +1 -1
- package/dist/src/data-storage/data-storage.js +18 -0
- package/dist/src/data-storage/data-storage.js.map +1 -1
- package/dist/src/graphql/board.d.ts +1 -1
- package/dist/src/graphql/board.js.map +1 -1
- package/dist/src/graphql/group.d.ts +1 -1
- package/dist/src/graphql/group.js.map +1 -1
- package/dist/src/graphql/index.d.ts +4 -4
- package/dist/src/graphql/index.js +4 -4
- package/dist/src/graphql/index.js.map +1 -1
- package/dist/src/graphql/play-group.d.ts +1 -1
- package/dist/src/graphql/play-group.js.map +1 -1
- package/dist/src/modeller/component-toolbar/component-detail.js +15 -5
- package/dist/src/modeller/component-toolbar/component-detail.js.map +1 -1
- package/dist/src/modeller/component-toolbar/component-menu.d.ts +3 -3
- package/dist/src/modeller/component-toolbar/component-menu.js +47 -10
- package/dist/src/modeller/component-toolbar/component-menu.js.map +1 -1
- package/dist/src/modeller/component-toolbar/component-toolbar.d.ts +2 -2
- package/dist/src/modeller/component-toolbar/component-toolbar.js +64 -8
- package/dist/src/modeller/component-toolbar/component-toolbar.js.map +1 -1
- package/dist/src/modeller/edit-toolbar.js +127 -4
- package/dist/src/modeller/edit-toolbar.js.map +1 -1
- package/dist/src/modeller/property-sidebar/data-binding/data-binding-mapper.js +93 -34
- 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 +6 -1
- 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 +6 -1
- 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.d.ts +1 -1
- package/dist/src/modeller/property-sidebar/data-binding/data-binding.js +64 -8
- package/dist/src/modeller/property-sidebar/data-binding/data-binding.js.map +1 -1
- package/dist/src/modeller/property-sidebar/effects/effects-shared-style.js +5 -5
- package/dist/src/modeller/property-sidebar/effects/effects-shared-style.js.map +1 -1
- package/dist/src/modeller/property-sidebar/effects/effects.d.ts +1 -1
- package/dist/src/modeller/property-sidebar/effects/effects.js +22 -2
- package/dist/src/modeller/property-sidebar/effects/effects.js.map +1 -1
- package/dist/src/modeller/property-sidebar/effects/property-animation.js +21 -1
- package/dist/src/modeller/property-sidebar/effects/property-animation.js.map +1 -1
- package/dist/src/modeller/property-sidebar/effects/property-animations.d.ts +1 -1
- package/dist/src/modeller/property-sidebar/effects/property-animations.js +28 -6
- package/dist/src/modeller/property-sidebar/effects/property-animations.js.map +1 -1
- package/dist/src/modeller/property-sidebar/effects/property-event-hover.js +28 -6
- 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 +40 -8
- package/dist/src/modeller/property-sidebar/effects/property-event-tap.js.map +1 -1
- package/dist/src/modeller/property-sidebar/effects/property-event.d.ts +3 -3
- package/dist/src/modeller/property-sidebar/effects/property-event.js +26 -6
- package/dist/src/modeller/property-sidebar/effects/property-event.js.map +1 -1
- package/dist/src/modeller/property-sidebar/effects/property-shadow.js +22 -8
- package/dist/src/modeller/property-sidebar/effects/property-shadow.js.map +1 -1
- package/dist/src/modeller/property-sidebar/inspector/inspector.js +38 -6
- package/dist/src/modeller/property-sidebar/inspector/inspector.js.map +1 -1
- package/dist/src/modeller/property-sidebar/property-shared-style.js +25 -14
- package/dist/src/modeller/property-sidebar/property-shared-style.js.map +1 -1
- package/dist/src/modeller/property-sidebar/property-sidebar.d.ts +2 -2
- package/dist/src/modeller/property-sidebar/property-sidebar.js +72 -16
- package/dist/src/modeller/property-sidebar/property-sidebar.js.map +1 -1
- package/dist/src/modeller/property-sidebar/shapes/shapes.d.ts +1 -1
- package/dist/src/modeller/property-sidebar/shapes/shapes.js +47 -14
- package/dist/src/modeller/property-sidebar/shapes/shapes.js.map +1 -1
- package/dist/src/modeller/property-sidebar/specifics/specific-properties-builder.js +18 -1
- package/dist/src/modeller/property-sidebar/specifics/specific-properties-builder.js.map +1 -1
- package/dist/src/modeller/property-sidebar/specifics/specifics.d.ts +1 -1
- package/dist/src/modeller/property-sidebar/specifics/specifics.js +47 -11
- package/dist/src/modeller/property-sidebar/specifics/specifics.js.map +1 -1
- package/dist/src/modeller/property-sidebar/styles/styles.d.ts +1 -1
- package/dist/src/modeller/property-sidebar/styles/styles.js +36 -13
- package/dist/src/modeller/property-sidebar/styles/styles.js.map +1 -1
- package/dist/src/modeller/scene-viewer/ox-scene-handler.d.ts +1 -1
- package/dist/src/modeller/scene-viewer/ox-scene-handler.js +16 -1
- package/dist/src/modeller/scene-viewer/ox-scene-handler.js.map +1 -1
- package/dist/src/modeller/scene-viewer/ox-scene-layer.d.ts +1 -1
- package/dist/src/modeller/scene-viewer/ox-scene-layer.js +16 -1
- package/dist/src/modeller/scene-viewer/ox-scene-layer.js.map +1 -1
- package/dist/src/modeller/scene-viewer/ox-scene-property.js +21 -0
- package/dist/src/modeller/scene-viewer/ox-scene-property.js.map +1 -1
- package/dist/src/modeller/scene-viewer/ox-scene-viewer.d.ts +3 -3
- package/dist/src/modeller/scene-viewer/ox-scene-viewer.js +100 -16
- package/dist/src/modeller/scene-viewer/ox-scene-viewer.js.map +1 -1
- package/dist/src/ox-board-component-info.js +33 -6
- package/dist/src/ox-board-component-info.js.map +1 -1
- package/dist/src/ox-board-list.js +58 -9
- package/dist/src/ox-board-list.js.map +1 -1
- package/dist/src/ox-board-modeller.d.ts +6 -6
- package/dist/src/ox-board-modeller.js +109 -20
- package/dist/src/ox-board-modeller.js.map +1 -1
- package/dist/src/ox-board-player.d.ts +2 -2
- package/dist/src/ox-board-player.js +99 -13
- package/dist/src/ox-board-player.js.map +1 -1
- package/dist/src/ox-board-template-list.js +21 -5
- package/dist/src/ox-board-template-list.js.map +1 -1
- package/dist/src/ox-board-template-viewer.js +35 -9
- package/dist/src/ox-board-template-viewer.js.map +1 -1
- package/dist/src/ox-board-viewer.js +131 -17
- package/dist/src/ox-board-viewer.js.map +1 -1
- package/dist/src/ox-editor-board-selector.d.ts +1 -1
- package/dist/src/ox-editor-board-selector.js +22 -1
- package/dist/src/ox-editor-board-selector.js.map +1 -1
- package/dist/src/ox-property-editor-board-selector.d.ts +1 -1
- package/dist/src/ox-property-editor-board-selector.js +1 -1
- package/dist/src/ox-property-editor-board-selector.js.map +1 -1
- package/dist/src/player/ox-board-player-carousel.d.ts +1 -1
- package/dist/src/player/ox-board-player-carousel.js +105 -17
- package/dist/src/player/ox-board-player-carousel.js.map +1 -1
- package/dist/src/player/ox-board-player-grid.js +32 -5
- package/dist/src/player/ox-board-player-grid.js.map +1 -1
- package/dist/src/player/ox-board-wrapper.js +50 -4
- package/dist/src/player/ox-board-wrapper.js.map +1 -1
- package/dist/src/selector/board-creation-popup.d.ts +2 -2
- package/dist/src/selector/board-creation-popup.js +22 -1
- package/dist/src/selector/board-creation-popup.js.map +1 -1
- package/dist/src/selector/board-thumbnail-card.js +15 -0
- package/dist/src/selector/board-thumbnail-card.js.map +1 -1
- package/dist/src/selector/ox-board-creation-card.d.ts +1 -1
- package/dist/src/selector/ox-board-creation-card.js +23 -1
- package/dist/src/selector/ox-board-creation-card.js.map +1 -1
- package/dist/src/selector/ox-board-selector.d.ts +1 -1
- package/dist/src/selector/ox-board-selector.js +55 -7
- package/dist/src/selector/ox-board-selector.js.map +1 -1
- package/dist/stories/property-data-binding-mapper.storiesy.d.ts +21 -0
- package/dist/stories/property-data-binding-mapper.storiesy.js +19 -0
- package/dist/stories/property-data-binding-mapper.storiesy.js.map +1 -0
- package/dist/stories/property-data-binding.stories copy.d.ts +21 -0
- package/dist/stories/property-data-binding.stories copy.js +19 -0
- package/dist/stories/property-data-binding.stories copy.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +25 -24
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../../src/modeller/property-sidebar/styles/styles.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,OAAO,kDAAkD,CAAA;AACzD,OAAO,qCAAqC,CAAA;AAC5C,OAAO,kCAAkC,CAAA;AACzC,OAAO,kCAAkC,CAAA;AACzC,OAAO,2CAA2C,CAAA;AAClD,OAAO,mCAAmC,CAAA;AAC1C,OAAO,0BAA0B,CAAA;AAEjC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC/B,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAI5C,OAAO,E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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA8SF;CACF,AAjTY,CAiTZ;AAC2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CAAgB;AAChB;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;gDAA2B;AAC1B;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;6CAAkB","sourcesContent":["/**\n * @license Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport '@polymer/paper-dropdown-menu/paper-dropdown-menu'\nimport '@operato/help/ox-title-with-help.js'\nimport '@operato/input/ox-input-color.js'\nimport '@operato/input/ox-input-range.js'\nimport '@operato/app/input/ox-input-fill-style.js'\nimport '@operato/font/ox-font-selector.js'\nimport '@operato/i18n/ox-i18n.js'\n\nimport { css, html } from 'lit'\nimport { property } from 'lit/decorators.js'\n\nimport { Component } from '@hatiolab/things-scene'\n\nimport { AbstractProperty } from '../abstract-property.js'\nimport { PropertySharedStyle } from '../property-shared-style.js'\n\nexport class PropertyStyles extends AbstractProperty {\n static styles = [\n PropertySharedStyle,\n css`\n ox-input-range {\n width: 100%;\n }\n\n .btn-group {\n height: 24px;\n }\n\n .btn-group paper-button {\n width: 30px;\n height: 24px;\n min-width: initial;\n margin: 0 4px 0 0;\n padding: 0;\n border-radius: 0;\n display: inline-block;\n border-bottom: 2px solid #fff;\n\n background: var(--url-icon-properties) no-repeat;\n background-size: 70%;\n }\n\n .btn-group paper-button.tbold {\n background-position: 50% -170px;\n }\n\n .btn-group paper-button.titalic {\n background-position: 50% -205px;\n }\n\n .btn-group paper-button.tunderline {\n background-position: 50% -240px;\n }\n\n .btn-group paper-button.tstrikethrough {\n background-position: 50% -415px;\n }\n\n .btn-group paper-button[active] {\n border-color: #f2471c;\n }\n\n .line-type paper-listbox {\n overflow: hidden;\n max-width: 100px;\n }\n .line-type paper-item {\n background: var(--url-icon-properties-line-type) 50% 0 no-repeat;\n min-height: 25px;\n padding: 3px 9px;\n width: 80px;\n }\n\n .line-type paper-item.solid {\n background-position: 50% 10px;\n }\n .line-type paper-item.round-dot {\n background-position: 50% -40px;\n }\n .line-type paper-item.square-dot {\n background-position: 50% -90px;\n }\n .line-type paper-item.dash {\n background-position: 50% -140px;\n }\n .line-type paper-item.dash-dot {\n background-position: 50% -190px;\n }\n .line-type paper-item.long-dash {\n background-position: 50% -240px;\n }\n .line-type paper-item.long-dash-dot {\n background-position: 50% -290px;\n }\n .line-type paper-item.long-dash-dot-dot {\n background-position: 50% -340px;\n }\n\n .line-type .paper-input-container input {\n background: var(--url-icon-properties-line-type) 50% 0 no-repeat !important;\n }\n .line-type.solid .paper-input-container input {\n background-position: 50% 5px !important;\n }\n .line-type.round-dot .paper-input-container input {\n background-position: 50% -45px !important;\n }\n .line-type.square-dot .paper-input-container input {\n background-position: 50% -85px !important;\n }\n .line-type.dash .paper-input-container input {\n background-position: 50% -145px !important;\n }\n .line-type.dash-dot .paper-input-container input {\n background-position: 50% -185px !important;\n }\n .line-type.long-dash .paper-input-container input {\n background-position: 50% -245px !important;\n }\n .line-type.long-dash-dot .paper-input-container input {\n background-position: 50% -285px !important;\n }\n .line-type.long-dash-dot-dot .paper-input-container input {\n background-position: 50% -345px !important;\n }\n\n .arrow-type paper-menu {\n overflow: hidden;\n max-width: 140px;\n }\n .arrow-type paper-item {\n background: var(--url-icon-properties-arrow-type) 50% 0 no-repeat;\n min-height: 30px;\n padding: 3px 7px;\n width: 30px;\n float: left;\n }\n .arrow-type paper-item.begin-no {\n background-position: 50% 16px;\n }\n .arrow-type paper-item.begin-arrow {\n background-position: 50% -39px;\n }\n .arrow-type paper-item.begin-open-arrow {\n background-position: 50% -89px;\n }\n .arrow-type paper-item.begin-stealth-arrow {\n background-position: 50% -139px;\n }\n .arrow-type paper-item.begin-diamond-arrow {\n background-position: 50% -190px;\n }\n .arrow-type paper-item.begin-oval-arrow {\n background-position: 50% -238px;\n }\n .arrow-type paper-item.begin-size1 {\n background-position: 50% -286px;\n }\n .arrow-type paper-item.begin-size2 {\n background-position: 50% -336px;\n }\n .arrow-type paper-item.begin-size3 {\n background-position: 50% -386px;\n }\n .arrow-type paper-item.begin-size4 {\n background-position: 50% -436px;\n }\n .arrow-type paper-item.begin-size5 {\n background-position: 50% -486px;\n }\n .arrow-type paper-item.begin-size6 {\n background-position: 50% -536px;\n }\n .arrow-type paper-item.begin-size7 {\n background-position: 50% -589px;\n }\n .arrow-type paper-item.begin-size8 {\n background-position: 50% -639px;\n }\n .arrow-type paper-item.begin-size9 {\n background-position: 50% -689px;\n }\n .arrow-type paper-item.end-no {\n background-position: 50% 16px;\n }\n .arrow-type paper-item.end-arrow {\n background-position: 50% -739px;\n }\n .arrow-type paper-item.end-open-arrow {\n background-position: 50% -789px;\n }\n .arrow-type paper-item.end-stealth-arrow {\n background-position: 50% -839px;\n }\n .arrow-type paper-item.end-diamond-arrow {\n background-position: 50% -890px;\n }\n .arrow-type paper-item.end-oval-arrow {\n background-position: 50% -938px;\n }\n .arrow-type paper-item.end-size1 {\n background-position: 50% -986px;\n }\n .arrow-type paper-item.end-size2 {\n background-position: 50% -1036px;\n }\n .arrow-type paper-item.end-size3 {\n background-position: 50% -1086px;\n }\n .arrow-type paper-item.end-size4 {\n background-position: 50% -1136px;\n }\n .arrow-type paper-item.end-size5 {\n background-position: 50% -1186px;\n }\n .arrow-type paper-item.end-size6 {\n background-position: 50% -1236px;\n }\n .arrow-type paper-item.end-size7 {\n background-position: 50% -1289px;\n }\n .arrow-type paper-item.end-size8 {\n background-position: 50% -1339px;\n }\n .arrow-type paper-item.end-size9 {\n background-position: 50% -1389px;\n }\n\n .arrow-type .paper-input-container input {\n background: var(--url-icon-properties-arrow-type) 110% 0 no-repeat !important;\n }\n .arrow-type.begin-no .paper-input-container input {\n background-position: 110% 5px !important;\n }\n .arrow-type.begin-arrow .paper-input-container input {\n background-position: 110% -50px !important;\n }\n .arrow-type.begin-open-arrow .paper-input-container input {\n background-position: 110% -100px !important;\n }\n .arrow-type.begin-stealth-arrow .paper-input-container input {\n background-position: 110% -150px !important;\n }\n .arrow-type.begin-diamond-arrow .paper-input-container input {\n background-position: 110% -200px !important;\n }\n .arrow-type.begin-oval-arrow .paper-input-container input {\n background-position: 110% -250px !important;\n }\n .arrow-type.begin-size1 .paper-input-container input {\n background-position: 110% -298px !important;\n }\n .arrow-type.begin-size2 .paper-input-container input {\n background-position: 110% -348px !important;\n }\n .arrow-type.begin-size3 .paper-input-container input {\n background-position: 110% -398px !important;\n }\n .arrow-type.begin-size4 .paper-input-container input {\n background-position: 110% -448px !important;\n }\n .arrow-type.begin-size5 .paper-input-container input {\n background-position: 110% -498px !important;\n }\n .arrow-type.begin-size6 .paper-input-container input {\n background-position: 110% -548px !important;\n }\n .arrow-type.begin-size7 .paper-input-container input {\n background-position: 110% -600px !important;\n }\n .arrow-type.begin-size8 .paper-input-container input {\n background-position: 110% -650px !important;\n }\n .arrow-type.begin-size9 .paper-input-container input {\n background-position: 110% -700px !important;\n }\n .arrow-type.end-no .paper-input-container input {\n background-position: 110% 5px !important;\n }\n .arrow-type.end-arrow .paper-input-container input {\n background-position: 110% -750px !important;\n }\n .arrow-type.end-open-arrow .paper-input-container input {\n background-position: 110% -800px !important;\n }\n .arrow-type.end-stealth-arrow .paper-input-container input {\n background-position: 110% -850px !important;\n }\n .arrow-type.end-diamond-arrow .paper-input-container input {\n background-position: 110% -900px !important;\n }\n .arrow-type.end-oval-arrow .paper-input-container input {\n background-position: 110% -950px !important;\n }\n .arrow-type.end-size1 .paper-input-container input {\n background-position: 110% -998px !important;\n }\n .arrow-type.end-size2 .paper-input-container input {\n background-position: 110% -1048px !important;\n }\n .arrow-type.end-size3 .paper-input-container input {\n background-position: 110% -1098px !important;\n }\n .arrow-type.end-size4 .paper-input-container input {\n background-position: 110% -1148px !important;\n }\n .arrow-type.end-size5 .paper-input-container input {\n background-position: 110% -1198px !important;\n }\n .arrow-type.end-size6 .paper-input-container input {\n background-position: 110% -1248px !important;\n }\n .arrow-type.end-size7 .paper-input-container input {\n background-position: 110% -1300px !important;\n }\n .arrow-type.end-size8 .paper-input-container input {\n background-position: 110% -1350px !important;\n }\n .arrow-type.end-size9 .paper-input-container input {\n background-position: 110% -1400px !important;\n }\n `\n ]\n @property({ type: Object }) value: any = {}\n @property({ type: Array }) selected: Component[] = []\n @property({ type: Array }) fonts: any[] = []\n\n firstUpdated() {\n this.renderRoot.addEventListener('change', this._onValueChange.bind(this))\n }\n\n render() {\n var {\n alpha = 1,\n fontFamily,\n fontSize,\n lineHeight,\n fontColor,\n bold,\n italic,\n fillStyle,\n lineWidth,\n strokeStyle,\n lineDash,\n lineCap,\n lineJoin,\n begin,\n beginSize,\n end,\n endSize\n } = this.value || {}\n\n return html`\n <fieldset>\n <legend>\n <ox-title-with-help topic=\"board-modeller/styles/opacity\" msgid=\"label.opacity\">opacity</ox-title-with-help>\n </legend>\n <ox-input-range min=\"0\" max=\"1\" step=\"0.1\" value-key=\"alpha\" .value=${alpha} editable> </ox-input-range>\n </fieldset>\n\n <fieldset>\n <legend>\n <ox-title-with-help topic=\"board-modeller/styles/text-style\" msgid=\"label.text-style\"\n >text style</ox-title-with-help\n >\n </legend>\n\n <div class=\"property-grid\">\n <label class=\"property-full-label\">\n <ox-i18n msgid=\"label.font-family\">Font Family</ox-i18n>\n </label>\n\n <ox-font-selector\n value-key=\"fontFamily\"\n .value=${fontFamily}\n class=\"property-full-input\"\n custom-editor\n ></ox-font-selector>\n\n <label class=\"property-half-label icon-only-label font-size\"></label>\n <input type=\"number\" value-key=\"fontSize\" .value=${fontSize} class=\"property-half-input\" />\n\n <label class=\"property-half-label icon-only-label lineHeight\"></label>\n <input type=\"number\" value-key=\"lineHeight\" .value=${lineHeight} class=\"property-half-input\" />\n\n <label class=\"property-half-label icon-only-label color\"></label>\n <ox-input-color value-key=\"fontColor\" .value=${fontColor} class=\"property-half-input\"> </ox-input-color>\n\n <label class=\"property-half-label\"></label>\n <div class=\"property-half-input btn-group\">\n <paper-button toggles value-key=\"bold\" ?active=${bold} class=\"tbold\"> </paper-button>\n <paper-button toggles value-key=\"italic\" ?active=${italic} class=\"titalic\"> </paper-button>\n </div>\n </div>\n </fieldset>\n\n <fieldset>\n <legend>\n <ox-title-with-help topic=\"board-modeller/styles/fill-style\" msgid=\"label.fill-style\"\n >fill style</ox-title-with-help\n >\n </legend>\n\n <ox-input-fill-style value-key=\"fillStyle\" .value=${fillStyle}> </ox-input-fill-style>\n </fieldset>\n\n <fieldset>\n <legend>\n <ox-title-with-help msgid=\"label.line-style\" topic=\"board-modeller/styles/line-style\"></ox-title-with-help>\n </legend>\n\n <div class=\"property-grid\">\n <label class=\"property-half-label icon-only-label linewidth\"></label>\n <input type=\"number\" value-key=\"lineWidth\" .value=${lineWidth} class=\"property-half-input\" />\n\n <label class=\"property-half-label icon-only-label color\"></label>\n <ox-input-color value-key=\"strokeStyle\" .value=${strokeStyle} class=\"property-half-input\"> </ox-input-color>\n\n <label class=\"property-full-label\">\n <ox-i18n msgid=\"label.line-type\">line type</ox-i18n>\n </label>\n <paper-dropdown-menu no-label-float=\"true\" class=\"property-full-input line-type solid\">\n <!-- solid는 선택된 항목 보여주기위한 class로 하위 paper-item의 class와 동일하게 -->\n <paper-listbox\n value-key=\"lineDash\"\n @selected-changed=${(e: CustomEvent) => this._onValueChange(e)}\n slot=\"dropdown-content\"\n .selected=${lineDash}\n attr-for-selected=\"name\"\n >\n <paper-item class=\"solid\" name=\"solid\"></paper-item>\n <paper-item class=\"round-dot\" name=\"round-dot\"></paper-item>\n <paper-item class=\"square-dot\" name=\"square-dot\"></paper-item>\n <paper-item class=\"dash\" name=\"dash\"></paper-item>\n <paper-item class=\"dash-dot\" name=\"dash-dot\"></paper-item>\n <paper-item class=\"long-dash\" name=\"long-dash\"></paper-item>\n <paper-item class=\"long-dash-dot\" name=\"long-dash-dot\"></paper-item>\n <paper-item class=\"long-dash-dot-dot\" name=\"long-dash-dot-dot\"></paper-item>\n </paper-listbox>\n </paper-dropdown-menu>\n\n <label class=\"property-full-label\">\n <ox-i18n msgid=\"label.cap-type\">cap type</ox-i18n>\n </label>\n <select class=\"property-full-input select-content\" value-key=\"lineCap\" .value=${lineCap}>\n <option value=\"butt\"><ox-i18n msgid=\"label.square\">square</ox-i18n></option>\n <option value=\"round\"><ox-i18n msgid=\"label.round\">round</ox-i18n></option>\n </select>\n\n <label class=\"property-full-label\">\n <ox-i18n msgid=\"label.join-type\">join type</ox-i18n>\n </label>\n <select class=\"property-full-input select-content\" value-key=\"lineJoin\" .value=${lineJoin}>\n <option value=\"miter\"><ox-i18n msgid=\"label.miter\">miter</ox-i18n></option>\n <option value=\"round\"><ox-i18n msgid=\"label.round\">round</ox-i18n></option>\n <option value=\"bevel\"><ox-i18n msgid=\"label.bevel\">bevel</ox-i18n></option>\n </select>\n\n ${this._isLine(this.selected)\n ? html`\n <label class=\"property-full-label\">\n <ox-i18n msgid=\"label.begin-type\">begin type</ox-i18n>\n </label>\n <paper-dropdown-menu no-label-float=\"true\" class=\"property-full-input arrow-type begin-no\">\n <!-- begin-no는 선택된 항목 보여주기위한 class로 하위 paper-item의 class와 동일하게 -->\n <paper-listbox\n value-key=\"begin\"\n @selected-changed=${(e: CustomEvent) => this._onValueChange(e)}\n slot=\"dropdown-content\"\n .selected=${begin}\n attr-for-selected=\"name\"\n >\n <paper-item class=\"begin-no\" name=\"none\"></paper-item>\n <paper-item class=\"begin-arrow\" name=\"arrow\"></paper-item>\n <paper-item class=\"begin-open-arrow\" name=\"open-arrow\"></paper-item>\n <paper-item class=\"begin-stealth-arrow\" name=\"sharp-arrow\"></paper-item>\n <paper-item class=\"begin-diamond-arrow\" name=\"diamond\"></paper-item>\n <paper-item class=\"begin-oval-arrow\" name=\"oval\"></paper-item>\n </paper-listbox>\n </paper-dropdown-menu>\n\n <label class=\"property-full-label\">\n <ox-i18n msgid=\"label.begin-size\">begin size</ox-i18n>\n </label>\n <paper-dropdown-menu no-label-float=\"true\" class=\"property-full-input arrow-type begin-size1\">\n <!-- begin-size1는 선택된 항목 보여주기위한 class로 하위 paper-item의 class와 동일하게 -->\n <paper-listbox\n value-key=\"beginSize\"\n @selected-changed=${(e: CustomEvent) => this._onValueChange(e)}\n slot=\"dropdown-content\"\n .selected=${beginSize}\n attr-for-selected=\"name\"\n >\n <paper-item class=\"begin-size1\" name=\"size1\"></paper-item>\n <paper-item class=\"begin-size2\" name=\"size2\"></paper-item>\n <paper-item class=\"begin-size3\" name=\"size3\"></paper-item>\n <paper-item class=\"begin-size4\" name=\"size4\"></paper-item>\n <paper-item class=\"begin-size5\" name=\"size5\"></paper-item>\n <paper-item class=\"begin-size6\" name=\"size6\"></paper-item>\n <paper-item class=\"begin-size7\" name=\"size7\"></paper-item>\n <paper-item class=\"begin-size8\" name=\"size8\"></paper-item>\n <paper-item class=\"begin-size9\" name=\"size9\"></paper-item>\n </paper-listbox>\n </paper-dropdown-menu>\n\n <label class=\"property-full-label\">\n <ox-i18n msgid=\"label.end-type\">end type</ox-i18n>\n </label>\n <paper-dropdown-menu no-label-float=\"true\" class=\"property-full-input arrow-type end-no\">\n <!-- end-no는 선택된 항목 보여주기위한 class로 하위 paper-item의 class와 동일하게 -->\n <paper-listbox\n value-key=\"end\"\n @selected-changed=${(e: CustomEvent) => this._onValueChange(e)}\n slot=\"dropdown-content\"\n .selected=${end}\n attr-for-selected=\"name\"\n >\n <paper-item class=\"end-no\" name=\"none\"></paper-item>\n <paper-item class=\"end-arrow\" name=\"arrow\"></paper-item>\n <paper-item class=\"end-open-arrow\" name=\"open-arrow\"></paper-item>\n <paper-item class=\"end-stealth-arrow\" name=\"sharp-arrow\"></paper-item>\n <paper-item class=\"end-diamond-arrow\" name=\"diamond\"></paper-item>\n <paper-item class=\"end-oval-arrow\" name=\"oval\"></paper-item>\n </paper-listbox>\n </paper-dropdown-menu>\n\n <label class=\"property-full-label\">\n <ox-i18n msgid=\"label.end-size\">end size</ox-i18n>\n </label>\n <paper-dropdown-menu no-label-float=\"true\" class=\"property-full-input arrow-type end-size1\">\n <!-- end-size1는 선택된 항목 보여주기위한 class로 하위 paper-item의 class와 동일하게 -->\n <paper-listbox\n value-key=\"endSize\"\n @selected-changed=${(e: CustomEvent) => this._onValueChange(e)}\n slot=\"dropdown-content\"\n .selected=${endSize}\n attr-for-selected=\"name\"\n >\n <paper-item class=\"end-size1\" name=\"size1\"></paper-item>\n <paper-item class=\"end-size2\" name=\"size2\"></paper-item>\n <paper-item class=\"end-size3\" name=\"size3\"></paper-item>\n <paper-item class=\"end-size4\" name=\"size4\"></paper-item>\n <paper-item class=\"end-size5\" name=\"size5\"></paper-item>\n <paper-item class=\"end-size6\" name=\"size6\"></paper-item>\n <paper-item class=\"end-size7\" name=\"size7\"></paper-item>\n <paper-item class=\"end-size8\" name=\"size8\"></paper-item>\n <paper-item class=\"end-size9\" name=\"size9\"></paper-item>\n </paper-listbox>\n </paper-dropdown-menu>\n `\n : html``}\n </div>\n </fieldset>\n `\n }\n\n _isLine(selected: Component[]) {\n var isLine = false\n\n for (var i = 0; i < selected.length; i++) {\n var comp = selected[i]\n\n if (!comp.isLine || !comp.isLine()) {\n isLine = false\n return isLine\n }\n\n isLine = true\n }\n\n return isLine\n }\n}\n"]}
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../../src/modeller/property-sidebar/styles/styles.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,OAAO,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,y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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,8 +1,23 @@
|
|
1
1
|
import { __decorate } from "tslib";
|
2
|
-
import './ox-scene-property';
|
2
|
+
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
|
+
}
|
6
21
|
render() {
|
7
22
|
return html ` <slot select="ox-scene-property"></slot> `;
|
8
23
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ox-scene-handler.js","sourceRoot":"","sources":["../../../../src/modeller/scene-viewer/ox-scene-handler.ts"],"names":[],"mappings":";AAAA,OAAO,
|
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;IAAvC;;QACe;;;;;WAAa;QACb;;;;;WAG3B;IA4BH,CAAC;IA1BC,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"]}
|
@@ -1,8 +1,23 @@
|
|
1
1
|
import { __decorate } from "tslib";
|
2
|
-
import './ox-scene-property';
|
2
|
+
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
|
+
}
|
6
21
|
render() {
|
7
22
|
return html ` <slot select="ox-scene-property"></slot> `;
|
8
23
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ox-scene-layer.js","sourceRoot":"","sources":["../../../../src/modeller/scene-viewer/ox-scene-layer.ts"],"names":[],"mappings":";AAAA,OAAO,
|
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;IAArC;;QACe;;;;;WAAa;QACb;;;;;WAAa;IAiC3C,CAAC;IA/BC,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,6 +2,27 @@ 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
|
+
}
|
5
26
|
};
|
6
27
|
__decorate([
|
7
28
|
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;IAAxC;;QACe;;;;;WAAa;QACb;;;;;WAAc;QACd;;;;;WAAa;IAC3C,CAAC;CAAA,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"]}
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import './confidential-overlay';
|
2
|
-
import './ox-scene-layer';
|
3
|
-
import './ox-scene-handler';
|
1
|
+
import './confidential-overlay.js';
|
2
|
+
import './ox-scene-layer.js';
|
3
|
+
import './ox-scene-handler.js';
|
4
4
|
import { LitElement, PropertyValues } from 'lit';
|
5
5
|
import { Component, FITMODE, Model, Properties, Scene, SCENE_MODE } from '@hatiolab/things-scene';
|
6
6
|
export default class OxSceneViewer extends LitElement {
|
@@ -1,18 +1,50 @@
|
|
1
1
|
import { __decorate } from "tslib";
|
2
|
-
import './confidential-overlay';
|
3
|
-
import './ox-scene-layer';
|
4
|
-
import './ox-scene-handler';
|
2
|
+
import './confidential-overlay.js';
|
3
|
+
import './ox-scene-layer.js';
|
4
|
+
import './ox-scene-handler.js';
|
5
5
|
import { css, html, LitElement } from 'lit';
|
6
6
|
import { customElement, property } from 'lit/decorators.js';
|
7
7
|
import { create as createScene, SCENE_MODE } from '@hatiolab/things-scene';
|
8
8
|
let OxSceneViewer = class OxSceneViewer extends LitElement {
|
9
9
|
constructor() {
|
10
10
|
super(...arguments);
|
11
|
-
this
|
11
|
+
Object.defineProperty(this, "scene", {
|
12
|
+
enumerable: true,
|
13
|
+
configurable: true,
|
14
|
+
writable: true,
|
15
|
+
value: null
|
16
|
+
});
|
17
|
+
Object.defineProperty(this, "model", {
|
18
|
+
enumerable: true,
|
19
|
+
configurable: true,
|
20
|
+
writable: true,
|
21
|
+
value: void 0
|
22
|
+
});
|
12
23
|
/* Scene Mode - mode 0 : view mode, mode 1 : edit mode, mode 2 : shift mode */
|
13
|
-
this
|
14
|
-
|
15
|
-
|
24
|
+
Object.defineProperty(this, "mode", {
|
25
|
+
enumerable: true,
|
26
|
+
configurable: true,
|
27
|
+
writable: true,
|
28
|
+
value: SCENE_MODE.VIEW
|
29
|
+
});
|
30
|
+
Object.defineProperty(this, "screenSize", {
|
31
|
+
enumerable: true,
|
32
|
+
configurable: true,
|
33
|
+
writable: true,
|
34
|
+
value: 13.3
|
35
|
+
});
|
36
|
+
Object.defineProperty(this, "variables", {
|
37
|
+
enumerable: true,
|
38
|
+
configurable: true,
|
39
|
+
writable: true,
|
40
|
+
value: {}
|
41
|
+
});
|
42
|
+
Object.defineProperty(this, "data", {
|
43
|
+
enumerable: true,
|
44
|
+
configurable: true,
|
45
|
+
writable: true,
|
46
|
+
value: void 0
|
47
|
+
});
|
16
48
|
/*
|
17
49
|
* 캔바스에 모델을 어떻게 적절하게 보여줄 것인지를 설정한다.
|
18
50
|
*
|
@@ -23,13 +55,60 @@ let OxSceneViewer = class OxSceneViewer extends LitElement {
|
|
23
55
|
* @center 가로, 세로 스케일을 1로 고정하고 모델이 화면의 중앙에 위치하도록 translate시킨다.
|
24
56
|
* @ratio 모델의 모든 부분이 캔바스에 최대 크기로 표현될 수 있도록 가로, 세로 동일한 스케일로 조정하고, {0, 0}좌표로 translate시킨다.
|
25
57
|
*/
|
26
|
-
this
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
this
|
58
|
+
Object.defineProperty(this, "fit", {
|
59
|
+
enumerable: true,
|
60
|
+
configurable: true,
|
61
|
+
writable: true,
|
62
|
+
value: 'none'
|
63
|
+
});
|
64
|
+
Object.defineProperty(this, "selected", {
|
65
|
+
enumerable: true,
|
66
|
+
configurable: true,
|
67
|
+
writable: true,
|
68
|
+
value: []
|
69
|
+
});
|
70
|
+
Object.defineProperty(this, "disposeWhenDetached", {
|
71
|
+
enumerable: true,
|
72
|
+
configurable: true,
|
73
|
+
writable: true,
|
74
|
+
value: false
|
75
|
+
});
|
76
|
+
Object.defineProperty(this, "baseUrl", {
|
77
|
+
enumerable: true,
|
78
|
+
configurable: true,
|
79
|
+
writable: true,
|
80
|
+
value: ''
|
81
|
+
});
|
82
|
+
Object.defineProperty(this, "provider", {
|
83
|
+
enumerable: true,
|
84
|
+
configurable: true,
|
85
|
+
writable: true,
|
86
|
+
value: void 0
|
87
|
+
});
|
88
|
+
Object.defineProperty(this, "name", {
|
89
|
+
enumerable: true,
|
90
|
+
configurable: true,
|
91
|
+
writable: true,
|
92
|
+
value: 'noname'
|
93
|
+
});
|
94
|
+
Object.defineProperty(this, "enableInspector", {
|
95
|
+
enumerable: true,
|
96
|
+
configurable: true,
|
97
|
+
writable: true,
|
98
|
+
value: true
|
99
|
+
});
|
100
|
+
Object.defineProperty(this, "showInspector", {
|
101
|
+
enumerable: true,
|
102
|
+
configurable: true,
|
103
|
+
writable: true,
|
104
|
+
value: false
|
105
|
+
});
|
106
|
+
Object.defineProperty(this, "lastOffsetWidth", {
|
107
|
+
enumerable: true,
|
108
|
+
configurable: true,
|
109
|
+
writable: true,
|
110
|
+
value: void 0
|
111
|
+
});
|
33
112
|
}
|
34
113
|
disconnectedCallback() {
|
35
114
|
super.disconnectedCallback();
|
@@ -203,11 +282,16 @@ let OxSceneViewer = class OxSceneViewer extends LitElement {
|
|
203
282
|
this.scene.baseUrl = after;
|
204
283
|
}
|
205
284
|
};
|
206
|
-
OxSceneViewer
|
285
|
+
Object.defineProperty(OxSceneViewer, "styles", {
|
286
|
+
enumerable: true,
|
287
|
+
configurable: true,
|
288
|
+
writable: true,
|
289
|
+
value: css `
|
207
290
|
:host {
|
208
291
|
outline: none;
|
209
292
|
}
|
210
|
-
|
293
|
+
`
|
294
|
+
});
|
211
295
|
__decorate([
|
212
296
|
property({ type: Object })
|
213
297
|
], OxSceneViewer.prototype, "scene", void 0);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ox-scene-viewer.js","sourceRoot":"","sources":["../../../../src/modeller/scene-viewer/ox-scene-viewer.ts"],"names":[],"mappings":";AAAA,OAAO,wBAAwB,CAAA;AAC/B,OAAO,kBAAkB,CAAA;AACzB,OAAO,oBAAoB,CAAA;AAE3B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAkB,MAAM,KAAK,CAAA;A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AE,KAAK,EAAE,CAAC;+CAA2B;AACxB;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;0DAAqC;AACrC;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;8CAAqB;AACpB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;+CAAc;AACb;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;2CAAwB;AACtB;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;sDAAgC;AAC/B;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;oDAA+B;AA/BxC,aAAa;IADjC,aAAa,CAAC,iBAAiB,CAAC;GACZ,aAAa,CA0PjC;eA1PoB,aAAa","sourcesContent":["import './confidential-overlay'\nimport './ox-scene-layer'\nimport './ox-scene-handler'\n\nimport { css, html, LitElement, PropertyValues } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\nimport { Component, create as createScene, FITMODE, Model, Properties, Scene, SCENE_MODE } from '@hatiolab/things-scene'\n\nimport OxSceneLayer from './ox-scene-layer'\n\n@customElement('ox-scene-viewer')\nexport default class OxSceneViewer extends LitElement {\n static styles = css`\n :host {\n outline: none;\n }\n `\n\n @property({ type: Object }) scene: Scene | null = null\n @property({ type: Object }) model?: Model\n /* Scene Mode - mode 0 : view mode, mode 1 : edit mode, mode 2 : shift mode */\n @property({ type: Number }) mode: SCENE_MODE = SCENE_MODE.VIEW\n @property({ type: Number }) screenSize: number = 13.3\n @property({ type: Object }) variables: Properties = {}\n @property({ type: Object }) data: any\n /*\n * 캔바스에 모델을 어떻게 적절하게 보여줄 것인지를 설정한다.\n *\n * @none 가로, 세로 스케일을 1로 고정하고, {0, 0}좌표로 translate시킨다.\n * @both 캔바스에 모델을 꼭 채우도록 가로, 세로 스케일을 조정하고, {0, 0}좌표로 translate시킨다.\n * @width 캔바스의 폭에 모델의 폭을 일치하도록 가로, 세로 스케일을 동일하게 조정하고, {0, 0}좌표로 translate시킨다.\n * @height 캔바스의 높이에 모델의 높이를 일치하도록 가로, 세로 스케일을 동일하게 조정하고, {0, 0}좌표로 translate시킨다.\n * @center 가로, 세로 스케일을 1로 고정하고 모델이 화면의 중앙에 위치하도록 translate시킨다.\n * @ratio 모델의 모든 부분이 캔바스에 최대 크기로 표현될 수 있도록 가로, 세로 동일한 스케일로 조정하고, {0, 0}좌표로 translate시킨다.\n */\n @property({ type: String }) fit: FITMODE = 'none'\n @property({ type: Array }) selected: Component[] = []\n @property({ type: Boolean }) disposeWhenDetached: boolean = false\n @property({ type: String }) baseUrl: string = ''\n @property({ type: Object }) provider: any\n @property({ type: String }) name: string = 'noname'\n @property({ type: Boolean }) enableInspector: boolean = true\n @property({ type: Boolean }) showInspector: boolean = false\n\n private lastOffsetWidth?: number\n\n disconnectedCallback() {\n super.disconnectedCallback()\n\n if (this.scene && this.disposeWhenDetached) {\n this._disposeScene()\n }\n }\n\n render() {\n return html` <slot></slot> `\n }\n\n updated(change: PropertyValues<this>) {\n change.has('model') && this._onModelChanged(this.model)\n change.has('mode') && this._onModeChanged(this.mode)\n change.has('screenSize') && this._onDisplayChanged(this.screenSize)\n change.has('data') && this._onDataChanged(this.data)\n change.has('baseUrl') && this._onBaseUrlChanged(this.baseUrl)\n }\n\n _setScene(scene: Scene | null) {\n this.scene = scene\n this.dispatchEvent(\n new CustomEvent('scene-changed', {\n bubbles: true,\n composed: true,\n detail: { value: scene }\n })\n )\n }\n\n _setMode(mode: SCENE_MODE) {\n this.mode = mode\n this.dispatchEvent(\n new CustomEvent('mode-changed', {\n bubbles: true,\n composed: true,\n detail: { value: mode }\n })\n )\n }\n\n _setVariables(variables: Properties) {\n this.variables = variables\n this.dispatchEvent(\n new CustomEvent('variables-changed', {\n bubbles: true,\n composed: true,\n detail: { value: variables }\n })\n )\n }\n\n _setSelected(selected: Component[]) {\n this.selected = selected\n this.dispatchEvent(\n new CustomEvent('selected-changed', {\n bubbles: true,\n composed: true,\n detail: { value: selected }\n })\n )\n }\n\n _disposeScene() {\n if (this.scene) {\n this.scene.off('selected', this._onSelectedChanged, this)\n this.scene.off('mode', this._onSceneModeChanged, this)\n\n if (this.provider) {\n this.scene.release && this.scene.release()\n } else {\n this.scene.dispose()\n }\n\n this._setScene(null)\n this._setSelected([])\n }\n }\n\n resize(force: boolean) {\n if (typeof this.scene == 'object') {\n if (force || this.fit === 'both' || Math.abs(this.offsetWidth - (this.lastOffsetWidth || 0)) >= 1) {\n requestAnimationFrame(() => {\n if (this.scene) {\n this.scene.resize()\n this.scene.fit(this.fit)\n }\n })\n }\n\n this.lastOffsetWidth = this.offsetWidth\n }\n }\n\n _onModelChanged(model?: Model) {\n this._disposeScene()\n\n if (!model) {\n return\n }\n\n const layers = Array.from(this.querySelectorAll('ox-scene-layer')).map(layer => (layer as OxSceneLayer).getModel())\n\n const handlers = Array.from(this.querySelectorAll('ox-scene-handler')).map(handler => handler.getAttribute('type'))\n\n this._setScene(\n createScene({\n target: this,\n model: JSON.parse(JSON.stringify(model)),\n layers,\n handlers,\n mode: this.mode,\n refProvider: this.provider\n })\n )\n\n if (this.provider) {\n this.provider.add(this.name, this.scene)\n }\n\n this.scene!.screen = this.screenSize\n\n /* 이 컴포넌트의 폭이 값을 가지고 있으면 - 화면상에 자리를 잡고 보여지고 있음을 의미한다.\n * 이 때는 정상적으로 그려주고,\n * 그렇지 않으면, 다음 Resize Handling시에 처리하도록 한다.\n */\n this.resize(true)\n\n this._setVariables(model.variables || this.scene!.variables)\n\n this.scene!.on('selected', this._onSelectedChanged, this)\n this.scene!.on('mode', this._onSceneModeChanged, this)\n\n this._onModeChanged(this.mode)\n this._onDisplayChanged(this.screenSize)\n this._onBaseUrlChanged(this.baseUrl)\n\n this.focus()\n }\n\n _onDisplayChanged(screenSize: string | number) {\n if (!this.scene) {\n return\n }\n\n if (screenSize) {\n this.scene.screen = parseFloat(String(screenSize))\n }\n }\n\n _onModeChanged(mode: SCENE_MODE) {\n if (!this.scene) {\n return\n }\n this.scene.mode = Number(mode)\n }\n\n _onDataChanged(data: any) {\n if (!this.scene || !data) {\n return\n }\n\n this.scene.data = data\n }\n\n _onSelectedChanged(after: Component[]) {\n /*\n scene 컴포넌트의 속성을 속성 에디터(input box등)에서 변경하다가,\n scene의 다른 컴포넌트를 클릭해서 포커스(선택) 컴포넌트를 변경하게되면,\n 속성 에디터(input box등)의 value change 이벤트의 처리와 충돌(레이스)하게된다.\n \n 기대하는 순서는 먼저 속성 에디터의 value change 이벤트를 처리한 후에,\n selected 이벤트를 처리할 수 있도록 requestAnimationFrame으로 한 프레임을 지연하도록 하였다.\n */\n requestAnimationFrame(() => {\n this._setSelected(after)\n })\n }\n\n _onSceneModeChanged(after: SCENE_MODE) {\n if (!this.scene) {\n return\n }\n\n if (this.mode !== after) {\n this._setMode(after)\n }\n\n switch (after) {\n case 1:\n this.style.cursor = 'default'\n break\n case 2:\n this.style.cursor = 'all-scroll'\n break\n case 3:\n this.style.cursor = 'crosshair'\n break\n case 4:\n this.style.cursor = 'copy'\n break\n case 5:\n this.style.cursor = 'context-menu'\n break\n }\n }\n\n _onBaseUrlChanged(after: string) {\n if (!this.scene) {\n return\n }\n\n this.scene.baseUrl = after\n }\n}\n"]}
|
1
|
+
{"version":3,"file":"ox-scene-viewer.js","sourceRoot":"","sources":["../../../../src/modeller/scene-viewer/ox-scene-viewer.ts"],"names":[],"mappings":";AAAA,OAAO,2BAA2B,CAAA;AAClC,OAAO,qBAAqB,CAAA;AAC5B,OAAO,uBAAuB,CAAA;AAE9B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAkB,MAAM,KAAK,CAAA;AAC3D,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE3D,OAAO,EAAa,MAAM,IAAI,WAAW,EAAqC,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAKzG,IAAM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;AACrC;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;8CAAqB;AACpB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;+CAAc;AACb;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;2CAAwB;AACtB;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;sDAAgC;AAC/B;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;oDAA+B;AA/BxC,aAAa;IADjC,aAAa,CAAC,iBAAiB,CAAC;GACZ,aAAa,CA0PjC;eA1PoB,aAAa","sourcesContent":["import './confidential-overlay.js'\nimport './ox-scene-layer.js'\nimport './ox-scene-handler.js'\n\nimport { css, html, LitElement, PropertyValues } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\nimport { Component, create as createScene, FITMODE, Model, Properties, Scene, SCENE_MODE } from '@hatiolab/things-scene'\n\nimport OxSceneLayer from './ox-scene-layer.js'\n\n@customElement('ox-scene-viewer')\nexport default class OxSceneViewer extends LitElement {\n static styles = css`\n :host {\n outline: none;\n }\n `\n\n @property({ type: Object }) scene: Scene | null = null\n @property({ type: Object }) model?: Model\n /* Scene Mode - mode 0 : view mode, mode 1 : edit mode, mode 2 : shift mode */\n @property({ type: Number }) mode: SCENE_MODE = SCENE_MODE.VIEW\n @property({ type: Number }) screenSize: number = 13.3\n @property({ type: Object }) variables: Properties = {}\n @property({ type: Object }) data: any\n /*\n * 캔바스에 모델을 어떻게 적절하게 보여줄 것인지를 설정한다.\n *\n * @none 가로, 세로 스케일을 1로 고정하고, {0, 0}좌표로 translate시킨다.\n * @both 캔바스에 모델을 꼭 채우도록 가로, 세로 스케일을 조정하고, {0, 0}좌표로 translate시킨다.\n * @width 캔바스의 폭에 모델의 폭을 일치하도록 가로, 세로 스케일을 동일하게 조정하고, {0, 0}좌표로 translate시킨다.\n * @height 캔바스의 높이에 모델의 높이를 일치하도록 가로, 세로 스케일을 동일하게 조정하고, {0, 0}좌표로 translate시킨다.\n * @center 가로, 세로 스케일을 1로 고정하고 모델이 화면의 중앙에 위치하도록 translate시킨다.\n * @ratio 모델의 모든 부분이 캔바스에 최대 크기로 표현될 수 있도록 가로, 세로 동일한 스케일로 조정하고, {0, 0}좌표로 translate시킨다.\n */\n @property({ type: String }) fit: FITMODE = 'none'\n @property({ type: Array }) selected: Component[] = []\n @property({ type: Boolean }) disposeWhenDetached: boolean = false\n @property({ type: String }) baseUrl: string = ''\n @property({ type: Object }) provider: any\n @property({ type: String }) name: string = 'noname'\n @property({ type: Boolean }) enableInspector: boolean = true\n @property({ type: Boolean }) showInspector: boolean = false\n\n private lastOffsetWidth?: number\n\n disconnectedCallback() {\n super.disconnectedCallback()\n\n if (this.scene && this.disposeWhenDetached) {\n this._disposeScene()\n }\n }\n\n render() {\n return html` <slot></slot> `\n }\n\n updated(change: PropertyValues<this>) {\n change.has('model') && this._onModelChanged(this.model)\n change.has('mode') && this._onModeChanged(this.mode)\n change.has('screenSize') && this._onDisplayChanged(this.screenSize)\n change.has('data') && this._onDataChanged(this.data)\n change.has('baseUrl') && this._onBaseUrlChanged(this.baseUrl)\n }\n\n _setScene(scene: Scene | null) {\n this.scene = scene\n this.dispatchEvent(\n new CustomEvent('scene-changed', {\n bubbles: true,\n composed: true,\n detail: { value: scene }\n })\n )\n }\n\n _setMode(mode: SCENE_MODE) {\n this.mode = mode\n this.dispatchEvent(\n new CustomEvent('mode-changed', {\n bubbles: true,\n composed: true,\n detail: { value: mode }\n })\n )\n }\n\n _setVariables(variables: Properties) {\n this.variables = variables\n this.dispatchEvent(\n new CustomEvent('variables-changed', {\n bubbles: true,\n composed: true,\n detail: { value: variables }\n })\n )\n }\n\n _setSelected(selected: Component[]) {\n this.selected = selected\n this.dispatchEvent(\n new CustomEvent('selected-changed', {\n bubbles: true,\n composed: true,\n detail: { value: selected }\n })\n )\n }\n\n _disposeScene() {\n if (this.scene) {\n this.scene.off('selected', this._onSelectedChanged, this)\n this.scene.off('mode', this._onSceneModeChanged, this)\n\n if (this.provider) {\n this.scene.release && this.scene.release()\n } else {\n this.scene.dispose()\n }\n\n this._setScene(null)\n this._setSelected([])\n }\n }\n\n resize(force: boolean) {\n if (typeof this.scene == 'object') {\n if (force || this.fit === 'both' || Math.abs(this.offsetWidth - (this.lastOffsetWidth || 0)) >= 1) {\n requestAnimationFrame(() => {\n if (this.scene) {\n this.scene.resize()\n this.scene.fit(this.fit)\n }\n })\n }\n\n this.lastOffsetWidth = this.offsetWidth\n }\n }\n\n _onModelChanged(model?: Model) {\n this._disposeScene()\n\n if (!model) {\n return\n }\n\n const layers = Array.from(this.querySelectorAll('ox-scene-layer')).map(layer => (layer as OxSceneLayer).getModel())\n\n const handlers = Array.from(this.querySelectorAll('ox-scene-handler')).map(handler => handler.getAttribute('type'))\n\n this._setScene(\n createScene({\n target: this,\n model: JSON.parse(JSON.stringify(model)),\n layers,\n handlers,\n mode: this.mode,\n refProvider: this.provider\n })\n )\n\n if (this.provider) {\n this.provider.add(this.name, this.scene)\n }\n\n this.scene!.screen = this.screenSize\n\n /* 이 컴포넌트의 폭이 값을 가지고 있으면 - 화면상에 자리를 잡고 보여지고 있음을 의미한다.\n * 이 때는 정상적으로 그려주고,\n * 그렇지 않으면, 다음 Resize Handling시에 처리하도록 한다.\n */\n this.resize(true)\n\n this._setVariables(model.variables || this.scene!.variables)\n\n this.scene!.on('selected', this._onSelectedChanged, this)\n this.scene!.on('mode', this._onSceneModeChanged, this)\n\n this._onModeChanged(this.mode)\n this._onDisplayChanged(this.screenSize)\n this._onBaseUrlChanged(this.baseUrl)\n\n this.focus()\n }\n\n _onDisplayChanged(screenSize: string | number) {\n if (!this.scene) {\n return\n }\n\n if (screenSize) {\n this.scene.screen = parseFloat(String(screenSize))\n }\n }\n\n _onModeChanged(mode: SCENE_MODE) {\n if (!this.scene) {\n return\n }\n this.scene.mode = Number(mode)\n }\n\n _onDataChanged(data: any) {\n if (!this.scene || !data) {\n return\n }\n\n this.scene.data = data\n }\n\n _onSelectedChanged(after: Component[]) {\n /*\n scene 컴포넌트의 속성을 속성 에디터(input box등)에서 변경하다가,\n scene의 다른 컴포넌트를 클릭해서 포커스(선택) 컴포넌트를 변경하게되면,\n 속성 에디터(input box등)의 value change 이벤트의 처리와 충돌(레이스)하게된다.\n \n 기대하는 순서는 먼저 속성 에디터의 value change 이벤트를 처리한 후에,\n selected 이벤트를 처리할 수 있도록 requestAnimationFrame으로 한 프레임을 지연하도록 하였다.\n */\n requestAnimationFrame(() => {\n this._setSelected(after)\n })\n }\n\n _onSceneModeChanged(after: SCENE_MODE) {\n if (!this.scene) {\n return\n }\n\n if (this.mode !== after) {\n this._setMode(after)\n }\n\n switch (after) {\n case 1:\n this.style.cursor = 'default'\n break\n case 2:\n this.style.cursor = 'all-scroll'\n break\n case 3:\n this.style.cursor = 'crosshair'\n break\n case 4:\n this.style.cursor = 'copy'\n break\n case 5:\n this.style.cursor = 'context-menu'\n break\n }\n }\n\n _onBaseUrlChanged(after: string) {\n if (!this.scene) {\n return\n }\n\n this.scene.baseUrl = after\n }\n}\n"]}
|
@@ -11,8 +11,30 @@ const ICON_EXCEL_EXPORT = new URL('../../icons/icon-excel-export.png', import.me
|
|
11
11
|
let BoardComponentInfo = class BoardComponentInfo extends LitElement {
|
12
12
|
constructor() {
|
13
13
|
super(...arguments);
|
14
|
-
this
|
15
|
-
|
14
|
+
Object.defineProperty(this, "component", {
|
15
|
+
enumerable: true,
|
16
|
+
configurable: true,
|
17
|
+
writable: true,
|
18
|
+
value: void 0
|
19
|
+
});
|
20
|
+
Object.defineProperty(this, "dragEndHandler", {
|
21
|
+
enumerable: true,
|
22
|
+
configurable: true,
|
23
|
+
writable: true,
|
24
|
+
value: this.onDragEnd.bind(this)
|
25
|
+
});
|
26
|
+
Object.defineProperty(this, "dragMoveHandler", {
|
27
|
+
enumerable: true,
|
28
|
+
configurable: true,
|
29
|
+
writable: true,
|
30
|
+
value: this.onDragMove.bind(this)
|
31
|
+
});
|
32
|
+
Object.defineProperty(this, "dragStart", {
|
33
|
+
enumerable: true,
|
34
|
+
configurable: true,
|
35
|
+
writable: true,
|
36
|
+
value: void 0
|
37
|
+
});
|
16
38
|
}
|
17
39
|
connectedCallback() {
|
18
40
|
super.connectedCallback();
|
@@ -131,9 +153,13 @@ let BoardComponentInfo = class BoardComponentInfo extends LitElement {
|
|
131
153
|
}
|
132
154
|
}
|
133
155
|
};
|
134
|
-
BoardComponentInfo
|
135
|
-
|
136
|
-
|
156
|
+
Object.defineProperty(BoardComponentInfo, "styles", {
|
157
|
+
enumerable: true,
|
158
|
+
configurable: true,
|
159
|
+
writable: true,
|
160
|
+
value: [
|
161
|
+
ScrollbarStyles,
|
162
|
+
css `
|
137
163
|
:host {
|
138
164
|
background-color: var(--md-sys-color-surface);
|
139
165
|
font-size: 12px;
|
@@ -204,7 +230,8 @@ BoardComponentInfo.styles = [
|
|
204
230
|
text-decoration: none;
|
205
231
|
}
|
206
232
|
`
|
207
|
-
]
|
233
|
+
]
|
234
|
+
});
|
208
235
|
__decorate([
|
209
236
|
property({ type: Object })
|
210
237
|
], BoardComponentInfo.prototype, "component", void 0);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ox-board-component-info.js","sourceRoot":"","sources":["../../src/ox-board-component-info.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,wDAAwD,CAAA;AAC/D,OAAO,mBAAmB,CAAA;AAE1B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,KAAK,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC3D,OAAO,KAAK,IAAI,MAAM,MAAM,CAAA;AAE5B,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe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QAExG,OAAO,KAAK,CAAA;IACd,CAAC;IAED,SAAS,CAAC,CAAQ;QAChB,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YACnB,CAAC,CAAC,eAAe,EAAE,CAAA;YACnB,CAAC,CAAC,cAAc,EAAE,CAAA;YAElB,OAAO,IAAI,CAAC,SAAS,CAAA;QACvB,CAAC;IACH,CAAC;IAED,KAAK,CAAC,UAAU;QACd,IAAI,CAAC;YACH,MAAM,EAAE,EAAE,GAAG,iBAAiB,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC,SAAS,IAAI,EAAE,CAAA;YAC7D,MAAM,QAAQ,GAAG,GAAG,EAAE,OAAO,CAAA;YAE7B,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,IAAI,CAAC,CAAA;YAChD,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAA;YACtC,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,QAAQ,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAA;YAC3D,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAA;QACpC,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;QAClB,CAAC;IACH,CAAC;;AA3NM,yBAAM,GAAG;IACd,eAAe;IACf,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAsEF;CACF,AAzEY,CAyEZ;AAE2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;qDAAgB;AA5EhC,kBAAkB;IAD9B,aAAa,CAAC,yBAAyB,CAAC;GAC5B,kBAAkB,CA6N9B","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@operato/property-editor/ox-properties-dynamic-view.js'\nimport '@operato/markdown'\n\nimport { css, html, LitElement, nothing } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport * as XLSX from 'xlsx'\n\nimport { ScrollbarStyles } from '@operato/styles'\nimport { i18next } from '@operato/i18n'\n\nconst ICON_EXCEL_EXPORT = new URL('../../icons/icon-excel-export.png', import.meta.url).href\n\n@customElement('ox-board-component-info')\nexport class BoardComponentInfo extends LitElement {\n static styles = [\n ScrollbarStyles,\n css`\n :host {\n background-color: var(--md-sys-color-surface);\n font-size: 12px;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n border: 2px solid var(--md-sys-color-on-primary-container);\n border-radius: 3px;\n\n --md-icon-size: 12px;\n }\n\n [header] {\n background-color: var(--md-sys-color-on-primary-container);\n user-select: none;\n align-items: center;\n color: #eee;\n padding: 0 2px;\n\n display: flex;\n }\n\n [header] md-icon {\n margin-left: auto;\n align-self: center;\n }\n\n [content] {\n overflow: auto;\n }\n\n table {\n border-collapse: collapse;\n background-color: var(--md-sys-color-surface);\n width: 100%;\n margin: auto;\n table-layout: fixed;\n }\n\n tr {\n border-bottom: var(--border-dim-color);\n }\n\n td {\n padding: var(--spacing-small);\n border-right: var(--border-dim-color);\n font-size: 0.8em;\n }\n\n [subTh] {\n text-align: center !important;\n font-weight: bold;\n width: 40px;\n text-transform: capitalize;\n background-color: rgba(0, 0, 0, 0.05);\n }\n\n span.export {\n position: absolute;\n width: 20px;\n height: 20px;\n top: 4px;\n right: 4px;\n background: var(--url-icon-excel-export) no-repeat;\n }\n\n a {\n text-decoration: none;\n }\n `\n ]\n\n @property({ type: Object }) component?: any\n\n private dragEndHandler = this.onDragEnd.bind(this) as EventListener\n private dragMoveHandler = this.onDragMove.bind(this) as EventListener\n\n connectedCallback(): void {\n super.connectedCallback()\n\n this.style.setProperty('--url-icon-excel-export', `url(${ICON_EXCEL_EXPORT})`)\n\n document.addEventListener('mouseup', this.dragEndHandler)\n document.addEventListener('mousemove', this.dragMoveHandler)\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback()\n\n document.removeEventListener('mouseup', this.dragEndHandler)\n document.removeEventListener('mousemove', this.dragMoveHandler)\n }\n\n render() {\n const { state, data, value } = this.component || {}\n const { id, type } = state || {}\n\n return html`\n <div header @mousedown=${this.onDragStart.bind(this)} draggable=\"false\">\n Component Inspection<md-icon @click=${(e: MouseEvent) => this.dispatchEvent(new CustomEvent('close'))}\n >close</md-icon\n >\n </div>\n <div content @wheel=${(e: WheelEvent) => this.onWheel(e)}>\n <table>\n <tr>\n <td subTh>${i18next.t('label.id')}</td>\n <td>\n <a\n @click=${(e: MouseEvent) => {\n this.component.trigger('reactionreset')\n this.component.trigger('reaction')\n return false\n }}\n >${id}</a\n >\n </td>\n </tr>\n <tr>\n <td subTh>${i18next.t('label.type')}</td>\n <td>${type}</td>\n </tr>\n <tr>\n <td subTh>${i18next.t('label.value')}</td>\n <td>${value === data ? 'equal to data' : html`<pre>${JSON.stringify(value, null, 2)}</pre>`}</td>\n </tr>\n\n <tr>\n <td colspan=\"2\" style=\"position: relative;\">\n <pre>${JSON.stringify(data, null, 2)}</pre>\n ${data && Array.isArray(data)\n ? html`<span class=\"export\" @tap=${() => this.exportData()}></span>`\n : nothing}\n </td>\n </tr>\n </table>\n </div>\n `\n }\n\n private dragStart?: { x: number; y: number }\n\n onWheel(e: WheelEvent) {\n const scrollableDiv = e.currentTarget! as HTMLElement\n const contentDiv = scrollableDiv.querySelector('table')!\n\n // 컨텐츠의 높이와 div의 높이를 비교하여 수평 스크롤을 동작시키거나 수직 스크롤을 동작시킴\n if (contentDiv.offsetHeight > scrollableDiv.offsetHeight) {\n // 수직 스크롤 가능한 경우\n scrollableDiv.scrollTop += e.deltaY\n } else {\n // 수직 스크롤이 없는 경우\n scrollableDiv.scrollLeft += e.deltaY\n }\n }\n\n onDragStart(e: MouseEvent) {\n e.stopPropagation()\n\n if (e.button == 0) {\n this.dragStart = {\n x: e.clientX,\n y: e.clientY\n }\n }\n\n return false\n }\n\n onDragMove(e: Event) {\n if (!this.dragStart) {\n return false\n }\n\n e.stopPropagation()\n e.preventDefault()\n\n var x = (e as MouseEvent).clientX,\n y = (e as MouseEvent).clientY\n\n const dragStart = { x, y }\n\n x -= this.dragStart.x\n y -= this.dragStart.y\n\n this.dragStart = dragStart\n\n this.style.left =\n Math.min(this.parentElement!.offsetWidth - this.offsetWidth, Math.max(0, this.offsetLeft + x)) + 'px'\n this.style.top =\n Math.min(this.parentElement!.offsetHeight - this.offsetHeight, Math.max(0, this.offsetTop + y)) + 'px'\n\n return false\n }\n\n onDragEnd(e: Event) {\n if (this.dragStart) {\n e.stopPropagation()\n e.preventDefault()\n\n delete this.dragStart\n }\n }\n\n async exportData() {\n try {\n const { id = 'board-component', data } = this.component || {}\n const filename = `${id}.xlsx`\n\n const worksheet = XLSX.utils.json_to_sheet(data)\n const workbook = XLSX.utils.book_new()\n XLSX.utils.book_append_sheet(workbook, worksheet, 'Sheet1')\n XLSX.writeFile(workbook, filename)\n } catch (e) {\n console.error(e)\n }\n }\n}\n"]}
|
1
|
+
{"version":3,"file":"ox-board-component-info.js","sourceRoot":"","sources":["../../src/ox-board-component-info.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,wDAAwD,CAAA;AAC/D,OAAO,mBAAmB,CAAA;AAE1B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,KAAK,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC3D,OAAO,KAAK,IAAI,MAAM,MAAM,CAAA;AAE5B,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAEvC,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAC,mCAAmC,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAA;AAGrF,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ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AAA;YACnB,CAAC,CAAC,cAAc,EAAE,CAAA;YAElB,OAAO,IAAI,CAAC,SAAS,CAAA;QACvB,CAAC;IACH,CAAC;IAED,KAAK,CAAC,UAAU;QACd,IAAI,CAAC;YACH,MAAM,EAAE,EAAE,GAAG,iBAAiB,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC,SAAS,IAAI,EAAE,CAAA;YAC7D,MAAM,QAAQ,GAAG,GAAG,EAAE,OAAO,CAAA;YAE7B,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,IAAI,CAAC,CAAA;YAChD,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAA;YACtC,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,QAAQ,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAA;YAC3D,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAA;QACpC,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;QAClB,CAAC;IACH,CAAC;;AA3NM;;;;WAAS;QACd,eAAe;QACf,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAsEF;KACF;EAzEY,CAyEZ;AAE2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;qDAAgB;AA5EhC,kBAAkB;IAD9B,aAAa,CAAC,yBAAyB,CAAC;GAC5B,kBAAkB,CA6N9B","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@operato/property-editor/ox-properties-dynamic-view.js'\nimport '@operato/markdown'\n\nimport { css, html, LitElement, nothing } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport * as XLSX from 'xlsx'\n\nimport { ScrollbarStyles } from '@operato/styles'\nimport { i18next } from '@operato/i18n'\n\nconst ICON_EXCEL_EXPORT = new URL('../../icons/icon-excel-export.png', import.meta.url).href\n\n@customElement('ox-board-component-info')\nexport class BoardComponentInfo extends LitElement {\n static styles = [\n ScrollbarStyles,\n css`\n :host {\n background-color: var(--md-sys-color-surface);\n font-size: 12px;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n border: 2px solid var(--md-sys-color-on-primary-container);\n border-radius: 3px;\n\n --md-icon-size: 12px;\n }\n\n [header] {\n background-color: var(--md-sys-color-on-primary-container);\n user-select: none;\n align-items: center;\n color: #eee;\n padding: 0 2px;\n\n display: flex;\n }\n\n [header] md-icon {\n margin-left: auto;\n align-self: center;\n }\n\n [content] {\n overflow: auto;\n }\n\n table {\n border-collapse: collapse;\n background-color: var(--md-sys-color-surface);\n width: 100%;\n margin: auto;\n table-layout: fixed;\n }\n\n tr {\n border-bottom: var(--border-dim-color);\n }\n\n td {\n padding: var(--spacing-small);\n border-right: var(--border-dim-color);\n font-size: 0.8em;\n }\n\n [subTh] {\n text-align: center !important;\n font-weight: bold;\n width: 40px;\n text-transform: capitalize;\n background-color: rgba(0, 0, 0, 0.05);\n }\n\n span.export {\n position: absolute;\n width: 20px;\n height: 20px;\n top: 4px;\n right: 4px;\n background: var(--url-icon-excel-export) no-repeat;\n }\n\n a {\n text-decoration: none;\n }\n `\n ]\n\n @property({ type: Object }) component?: any\n\n private dragEndHandler = this.onDragEnd.bind(this) as EventListener\n private dragMoveHandler = this.onDragMove.bind(this) as EventListener\n\n connectedCallback(): void {\n super.connectedCallback()\n\n this.style.setProperty('--url-icon-excel-export', `url(${ICON_EXCEL_EXPORT})`)\n\n document.addEventListener('mouseup', this.dragEndHandler)\n document.addEventListener('mousemove', this.dragMoveHandler)\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback()\n\n document.removeEventListener('mouseup', this.dragEndHandler)\n document.removeEventListener('mousemove', this.dragMoveHandler)\n }\n\n render() {\n const { state, data, value } = this.component || {}\n const { id, type } = state || {}\n\n return html`\n <div header @mousedown=${this.onDragStart.bind(this)} draggable=\"false\">\n Component Inspection<md-icon @click=${(e: MouseEvent) => this.dispatchEvent(new CustomEvent('close'))}\n >close</md-icon\n >\n </div>\n <div content @wheel=${(e: WheelEvent) => this.onWheel(e)}>\n <table>\n <tr>\n <td subTh>${i18next.t('label.id')}</td>\n <td>\n <a\n @click=${(e: MouseEvent) => {\n this.component.trigger('reactionreset')\n this.component.trigger('reaction')\n return false\n }}\n >${id}</a\n >\n </td>\n </tr>\n <tr>\n <td subTh>${i18next.t('label.type')}</td>\n <td>${type}</td>\n </tr>\n <tr>\n <td subTh>${i18next.t('label.value')}</td>\n <td>${value === data ? 'equal to data' : html`<pre>${JSON.stringify(value, null, 2)}</pre>`}</td>\n </tr>\n\n <tr>\n <td colspan=\"2\" style=\"position: relative;\">\n <pre>${JSON.stringify(data, null, 2)}</pre>\n ${data && Array.isArray(data)\n ? html`<span class=\"export\" @tap=${() => this.exportData()}></span>`\n : nothing}\n </td>\n </tr>\n </table>\n </div>\n `\n }\n\n private dragStart?: { x: number; y: number }\n\n onWheel(e: WheelEvent) {\n const scrollableDiv = e.currentTarget! as HTMLElement\n const contentDiv = scrollableDiv.querySelector('table')!\n\n // 컨텐츠의 높이와 div의 높이를 비교하여 수평 스크롤을 동작시키거나 수직 스크롤을 동작시킴\n if (contentDiv.offsetHeight > scrollableDiv.offsetHeight) {\n // 수직 스크롤 가능한 경우\n scrollableDiv.scrollTop += e.deltaY\n } else {\n // 수직 스크롤이 없는 경우\n scrollableDiv.scrollLeft += e.deltaY\n }\n }\n\n onDragStart(e: MouseEvent) {\n e.stopPropagation()\n\n if (e.button == 0) {\n this.dragStart = {\n x: e.clientX,\n y: e.clientY\n }\n }\n\n return false\n }\n\n onDragMove(e: Event) {\n if (!this.dragStart) {\n return false\n }\n\n e.stopPropagation()\n e.preventDefault()\n\n var x = (e as MouseEvent).clientX,\n y = (e as MouseEvent).clientY\n\n const dragStart = { x, y }\n\n x -= this.dragStart.x\n y -= this.dragStart.y\n\n this.dragStart = dragStart\n\n this.style.left =\n Math.min(this.parentElement!.offsetWidth - this.offsetWidth, Math.max(0, this.offsetLeft + x)) + 'px'\n this.style.top =\n Math.min(this.parentElement!.offsetHeight - this.offsetHeight, Math.max(0, this.offsetTop + y)) + 'px'\n\n return false\n }\n\n onDragEnd(e: Event) {\n if (this.dragStart) {\n e.stopPropagation()\n e.preventDefault()\n\n delete this.dragStart\n }\n }\n\n async exportData() {\n try {\n const { id = 'board-component', data } = this.component || {}\n const filename = `${id}.xlsx`\n\n const worksheet = XLSX.utils.json_to_sheet(data)\n const workbook = XLSX.utils.book_new()\n XLSX.utils.book_append_sheet(workbook, worksheet, 'Sheet1')\n XLSX.writeFile(workbook, filename)\n } catch (e) {\n console.error(e)\n }\n }\n}\n"]}
|