@operato/board 0.2.42 → 0.2.46
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/@types/global/index.d.ts +1 -0
- package/CHANGELOG.md +51 -0
- package/assets/images/components/no-image.png +0 -0
- package/custom-elements.json +4720 -382
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +1 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/modeller/component-toolbar/component-menu.d.ts +4 -0
- package/dist/src/modeller/component-toolbar/component-menu.js +148 -0
- package/dist/src/modeller/component-toolbar/component-menu.js.map +1 -0
- package/dist/src/modeller/component-toolbar/component-toolbar.d.ts +4 -0
- package/dist/src/modeller/component-toolbar/component-toolbar.js +176 -0
- package/dist/src/modeller/component-toolbar/component-toolbar.js.map +1 -0
- package/dist/src/modeller/edit-toolbar-style.d.ts +4 -0
- package/dist/src/modeller/edit-toolbar-style.js +227 -0
- package/dist/src/modeller/edit-toolbar-style.js.map +1 -0
- package/dist/src/modeller/edit-toolbar.d.ts +61 -0
- package/dist/src/modeller/edit-toolbar.js +644 -0
- package/dist/src/modeller/edit-toolbar.js.map +1 -0
- package/dist/src/modeller/property-sidebar/abstract-property.d.ts +10 -0
- package/dist/src/modeller/property-sidebar/abstract-property.js +58 -0
- package/dist/src/modeller/property-sidebar/abstract-property.js.map +1 -0
- package/dist/src/modeller/property-sidebar/data-binding/data-binding-mapper.d.ts +49 -0
- package/dist/src/modeller/property-sidebar/data-binding/data-binding-mapper.js +348 -0
- package/dist/src/modeller/property-sidebar/data-binding/data-binding-mapper.js.map +1 -0
- package/dist/src/modeller/property-sidebar/data-binding/data-binding.d.ts +8 -0
- package/dist/src/modeller/property-sidebar/data-binding/data-binding.js +428 -0
- package/dist/src/modeller/property-sidebar/data-binding/data-binding.js.map +1 -0
- package/dist/src/modeller/property-sidebar/effects/effects-shared-style.d.ts +4 -0
- package/dist/src/modeller/property-sidebar/effects/effects-shared-style.js +57 -0
- package/dist/src/modeller/property-sidebar/effects/effects-shared-style.js.map +1 -0
- package/dist/src/modeller/property-sidebar/effects/effects.d.ts +7 -0
- package/dist/src/modeller/property-sidebar/effects/effects.js +59 -0
- package/dist/src/modeller/property-sidebar/effects/effects.js.map +1 -0
- package/dist/src/modeller/property-sidebar/effects/property-animation.d.ts +23 -0
- package/dist/src/modeller/property-sidebar/effects/property-animation.js +131 -0
- package/dist/src/modeller/property-sidebar/effects/property-animation.js.map +1 -0
- package/dist/src/modeller/property-sidebar/effects/property-animations.d.ts +6 -0
- package/dist/src/modeller/property-sidebar/effects/property-animations.js +84 -0
- package/dist/src/modeller/property-sidebar/effects/property-animations.js.map +1 -0
- package/dist/src/modeller/property-sidebar/effects/property-event-hover.d.ts +4 -0
- package/dist/src/modeller/property-sidebar/effects/property-event-hover.js +128 -0
- package/dist/src/modeller/property-sidebar/effects/property-event-hover.js.map +1 -0
- package/dist/src/modeller/property-sidebar/effects/property-event-tap.d.ts +4 -0
- package/dist/src/modeller/property-sidebar/effects/property-event-tap.js +124 -0
- package/dist/src/modeller/property-sidebar/effects/property-event-tap.js.map +1 -0
- package/dist/src/modeller/property-sidebar/effects/property-event.d.ts +6 -0
- package/dist/src/modeller/property-sidebar/effects/property-event.js +63 -0
- package/dist/src/modeller/property-sidebar/effects/property-event.js.map +1 -0
- package/dist/src/modeller/property-sidebar/effects/property-shadow.d.ts +23 -0
- package/dist/src/modeller/property-sidebar/effects/property-shadow.js +110 -0
- package/dist/src/modeller/property-sidebar/effects/property-shadow.js.map +1 -0
- package/dist/src/modeller/property-sidebar/effects/value-converter.d.ts +1 -0
- package/dist/src/modeller/property-sidebar/effects/value-converter.js +23 -0
- package/dist/src/modeller/property-sidebar/effects/value-converter.js.map +1 -0
- package/dist/src/modeller/property-sidebar/inspector/inspector.d.ts +24 -0
- package/dist/src/modeller/property-sidebar/inspector/inspector.js +290 -0
- package/dist/src/modeller/property-sidebar/inspector/inspector.js.map +1 -0
- package/dist/src/modeller/property-sidebar/property-shared-style.d.ts +4 -0
- package/dist/src/modeller/property-sidebar/property-shared-style.js +131 -0
- package/dist/src/modeller/property-sidebar/property-shared-style.js.map +1 -0
- package/dist/src/modeller/property-sidebar/property-sidebar.d.ts +10 -0
- package/dist/src/modeller/property-sidebar/property-sidebar.js +313 -0
- package/dist/src/modeller/property-sidebar/property-sidebar.js.map +1 -0
- package/dist/src/modeller/property-sidebar/shapes/box-padding-editor-styles.d.ts +1 -0
- package/dist/src/modeller/property-sidebar/shapes/box-padding-editor-styles.js +94 -0
- package/dist/src/modeller/property-sidebar/shapes/box-padding-editor-styles.js.map +1 -0
- package/dist/src/modeller/property-sidebar/shapes/shapes.d.ts +7 -0
- package/dist/src/modeller/property-sidebar/shapes/shapes.js +409 -0
- package/dist/src/modeller/property-sidebar/shapes/shapes.js.map +1 -0
- package/dist/src/modeller/property-sidebar/specifics/specific-properties-builder.d.ts +4 -0
- package/dist/src/modeller/property-sidebar/specifics/specific-properties-builder.js +127 -0
- package/dist/src/modeller/property-sidebar/specifics/specific-properties-builder.js.map +1 -0
- package/dist/src/modeller/property-sidebar/specifics/specifics.d.ts +5 -0
- package/dist/src/modeller/property-sidebar/specifics/specifics.js +78 -0
- package/dist/src/modeller/property-sidebar/specifics/specifics.js.map +1 -0
- package/dist/src/modeller/property-sidebar/styles/styles.d.ts +9 -0
- package/dist/src/modeller/property-sidebar/styles/styles.js +563 -0
- package/dist/src/modeller/property-sidebar/styles/styles.js.map +1 -0
- package/dist/src/modeller/scene-viewer/confidential-overlay.d.ts +4 -0
- package/dist/src/modeller/scene-viewer/confidential-overlay.js +14 -0
- package/dist/src/modeller/scene-viewer/confidential-overlay.js.map +1 -0
- package/dist/src/modeller/scene-viewer/ox-scene-handler.d.ts +11 -0
- package/dist/src/modeller/scene-viewer/ox-scene-handler.js +36 -0
- package/dist/src/modeller/scene-viewer/ox-scene-handler.js.map +1 -0
- package/dist/src/modeller/scene-viewer/ox-scene-layer.d.ts +10 -0
- package/dist/src/modeller/scene-viewer/ox-scene-layer.js +42 -0
- package/dist/src/modeller/scene-viewer/ox-scene-layer.js.map +1 -0
- package/dist/src/modeller/scene-viewer/ox-scene-player.d.ts +1 -0
- package/dist/src/modeller/scene-viewer/ox-scene-player.js +99 -0
- package/dist/src/modeller/scene-viewer/ox-scene-player.js.map +1 -0
- package/dist/src/modeller/scene-viewer/ox-scene-property.d.ts +6 -0
- package/dist/src/modeller/scene-viewer/ox-scene-property.js +19 -0
- package/dist/src/modeller/scene-viewer/ox-scene-property.js.map +1 -0
- package/dist/src/modeller/scene-viewer/ox-scene-viewer.d.ts +39 -0
- package/dist/src/modeller/scene-viewer/ox-scene-viewer.js +245 -0
- package/dist/src/modeller/scene-viewer/ox-scene-viewer.js.map +1 -0
- package/dist/src/ox-board-modeller.d.ts +40 -0
- package/dist/src/ox-board-modeller.js +318 -0
- package/dist/src/ox-board-modeller.js.map +1 -0
- package/dist/src/types.d.ts +12 -0
- package/dist/src/types.js +2 -0
- package/dist/src/types.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +26 -5
- package/src/index.ts +1 -0
- package/src/modeller/component-toolbar/component-menu.ts +142 -0
- package/src/modeller/component-toolbar/component-toolbar.ts +169 -0
- package/src/modeller/edit-toolbar-style.ts +228 -0
- package/src/modeller/edit-toolbar.ts +640 -0
- package/src/modeller/property-sidebar/abstract-property.ts +73 -0
- package/src/modeller/property-sidebar/data-binding/data-binding-mapper.ts +368 -0
- package/src/modeller/property-sidebar/data-binding/data-binding.ts +447 -0
- package/src/modeller/property-sidebar/effects/effects-shared-style.ts +58 -0
- package/src/modeller/property-sidebar/effects/effects.ts +55 -0
- package/src/modeller/property-sidebar/effects/property-animation.ts +131 -0
- package/src/modeller/property-sidebar/effects/property-animations.ts +82 -0
- package/src/modeller/property-sidebar/effects/property-event-hover.ts +133 -0
- package/src/modeller/property-sidebar/effects/property-event-tap.ts +129 -0
- package/src/modeller/property-sidebar/effects/property-event.ts +63 -0
- package/src/modeller/property-sidebar/effects/property-shadow.ts +112 -0
- package/src/modeller/property-sidebar/effects/value-converter.ts +26 -0
- package/src/modeller/property-sidebar/inspector/inspector.ts +327 -0
- package/src/modeller/property-sidebar/property-shared-style.ts +132 -0
- package/src/modeller/property-sidebar/property-sidebar.ts +308 -0
- package/src/modeller/property-sidebar/shapes/box-padding-editor-styles.ts +94 -0
- package/src/modeller/property-sidebar/shapes/shapes.ts +411 -0
- package/src/modeller/property-sidebar/specifics/specific-properties-builder.ts +135 -0
- package/src/modeller/property-sidebar/specifics/specifics.ts +72 -0
- package/src/modeller/property-sidebar/styles/styles.ts +578 -0
- package/src/modeller/scene-viewer/confidential-overlay.ts +18 -0
- package/src/modeller/scene-viewer/ox-scene-handler.ts +40 -0
- package/src/modeller/scene-viewer/ox-scene-layer.ts +42 -0
- package/src/modeller/scene-viewer/ox-scene-player.ts +104 -0
- package/src/modeller/scene-viewer/ox-scene-property.ts +10 -0
- package/src/modeller/scene-viewer/ox-scene-viewer.ts +248 -0
- package/src/ox-board-modeller.ts +302 -0
- package/src/types.ts +26 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright © HatioLab Inc. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
import '@things-factory/i18n-base';
|
|
5
|
+
import '@things-factory/modeller-ui/client/editors/things-editor-color';
|
|
6
|
+
import { LitElement } from 'lit';
|
|
7
|
+
import { Properties } from '@hatiolab/things-scene';
|
|
8
|
+
/**
|
|
9
|
+
* 컴포넌트의 그림자 속성을 편집하는 element
|
|
10
|
+
*
|
|
11
|
+
* Example:
|
|
12
|
+
* <property-shadow
|
|
13
|
+
* @change="${e => { this.shadow = e.target.value }}"
|
|
14
|
+
* value="${this.shadow}"
|
|
15
|
+
* ></property-shadow>
|
|
16
|
+
*/
|
|
17
|
+
export default class PropertyShadow extends LitElement {
|
|
18
|
+
static styles: import("lit").CSSResult[];
|
|
19
|
+
value: Properties;
|
|
20
|
+
firstUpdated(): void;
|
|
21
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
22
|
+
_onValueChange(e: Event): void;
|
|
23
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright © HatioLab Inc. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
import { __decorate } from "tslib";
|
|
5
|
+
import '@things-factory/i18n-base';
|
|
6
|
+
import '@things-factory/modeller-ui/client/editors/things-editor-color';
|
|
7
|
+
import { LitElement, css, html } from 'lit';
|
|
8
|
+
import { customElement, property } from 'lit/decorators';
|
|
9
|
+
import { convert } from './value-converter';
|
|
10
|
+
/**
|
|
11
|
+
* 컴포넌트의 그림자 속성을 편집하는 element
|
|
12
|
+
*
|
|
13
|
+
* Example:
|
|
14
|
+
* <property-shadow
|
|
15
|
+
* @change="${e => { this.shadow = e.target.value }}"
|
|
16
|
+
* value="${this.shadow}"
|
|
17
|
+
* ></property-shadow>
|
|
18
|
+
*/
|
|
19
|
+
let PropertyShadow = class PropertyShadow extends LitElement {
|
|
20
|
+
constructor() {
|
|
21
|
+
super(...arguments);
|
|
22
|
+
this.value = {};
|
|
23
|
+
}
|
|
24
|
+
firstUpdated() {
|
|
25
|
+
this.renderRoot.addEventListener('change', this._onValueChange.bind(this));
|
|
26
|
+
}
|
|
27
|
+
render() {
|
|
28
|
+
return html `
|
|
29
|
+
<label> <i18n-msg msgid="label.shadowOffsetX">offset-X</i18n-msg> </label>
|
|
30
|
+
|
|
31
|
+
<input type="number" value-key="left" .value=${this.value.left} />
|
|
32
|
+
|
|
33
|
+
<label> <i18n-msg msgid="label.shadowOffsetY">offset-Y</i18n-msg> </label>
|
|
34
|
+
|
|
35
|
+
<input type="number" value-key="top" .value=${this.value.top} />
|
|
36
|
+
|
|
37
|
+
<label> <i18n-msg msgid="label.shadowSize">Size</i18n-msg> </label>
|
|
38
|
+
|
|
39
|
+
<input type="number" value-key="blurSize" .value=${this.value.blurSize} />
|
|
40
|
+
|
|
41
|
+
<label class="icon-only-label color"></label>
|
|
42
|
+
|
|
43
|
+
<things-editor-color value-key="color" .value=${this.value.color}> </things-editor-color>
|
|
44
|
+
`;
|
|
45
|
+
}
|
|
46
|
+
_onValueChange(e) {
|
|
47
|
+
var element = e.target;
|
|
48
|
+
var key = element.getAttribute('value-key');
|
|
49
|
+
if (!key) {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
this.value = {
|
|
53
|
+
...this.value,
|
|
54
|
+
[key]: convert(element)
|
|
55
|
+
};
|
|
56
|
+
this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }));
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
PropertyShadow.styles = [
|
|
60
|
+
css `
|
|
61
|
+
:host {
|
|
62
|
+
display: grid;
|
|
63
|
+
grid-template-columns: repeat(10, 1fr);
|
|
64
|
+
grid-gap: 5px;
|
|
65
|
+
grid-auto-rows: minmax(24px, auto);
|
|
66
|
+
|
|
67
|
+
align-items: center;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
* {
|
|
71
|
+
align-self: stretch;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
label {
|
|
75
|
+
grid-column: span 3;
|
|
76
|
+
text-align: right;
|
|
77
|
+
text-transform: capitalize;
|
|
78
|
+
|
|
79
|
+
align-self: center;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
input[type='number'],
|
|
83
|
+
things-editor-color {
|
|
84
|
+
grid-column: span 7;
|
|
85
|
+
}
|
|
86
|
+
input[type='number'] {
|
|
87
|
+
border: var(--property-sidebar-fieldset-border);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.icon-only-label {
|
|
91
|
+
grid-column: span 3;
|
|
92
|
+
background: url(/assets/images/icon-properties-label.png) no-repeat;
|
|
93
|
+
float: left;
|
|
94
|
+
margin: 0;
|
|
95
|
+
align-self: stretch;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.icon-only-label.color {
|
|
99
|
+
background-position: 100% -500px;
|
|
100
|
+
}
|
|
101
|
+
`
|
|
102
|
+
];
|
|
103
|
+
__decorate([
|
|
104
|
+
property({ type: Object })
|
|
105
|
+
], PropertyShadow.prototype, "value", void 0);
|
|
106
|
+
PropertyShadow = __decorate([
|
|
107
|
+
customElement('property-shadow')
|
|
108
|
+
], PropertyShadow);
|
|
109
|
+
export default PropertyShadow;
|
|
110
|
+
//# sourceMappingURL=property-shadow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"property-shadow.js","sourceRoot":"","sources":["../../../../../src/modeller/property-sidebar/effects/property-shadow.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,OAAO,2BAA2B,CAAA;AAClC,OAAO,gEAAgE,CAAA;AAEvE,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAGxD,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAE3C;;;;;;;;GAQG;AAGH,IAAqB,cAAc,GAAnC,MAAqB,cAAe,SAAQ,UAAU;IAAtD;;QA8C8B,UAAK,GAAe,EAAE,CAAA;IAyCpD,CAAC;IAvCC,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,OAAO,IAAI,CAAA;;;qDAGsC,IAAI,CAAC,KAAK,CAAC,IAAI;;;;oDAIhB,IAAI,CAAC,KAAK,CAAC,GAAG;;;;yDAIT,IAAI,CAAC,KAAK,CAAC,QAAQ;;;;sDAItB,IAAI,CAAC,KAAK,CAAC,KAAK;KACjE,CAAA;IACH,CAAC;IAED,cAAc,CAAC,CAAQ;QACrB,IAAI,OAAO,GAAG,CAAC,CAAC,MAAqB,CAAA;QACrC,IAAI,GAAG,GAAG,OAAO,CAAC,YAAY,CAAC,WAAW,CAAC,CAAA;QAE3C,IAAI,CAAC,GAAG,EAAE;YACR,OAAM;SACP;QAED,IAAI,CAAC,KAAK,GAAG;YACX,GAAG,IAAI,CAAC,KAAK;YACb,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC;SACxB,CAAA;QAED,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAA;IAClF,CAAC;CACF,CAAA;AAtFQ,qBAAM,GAAG;IACd,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAyCF;CACF,CAAA;AAE2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CAAuB;AA9C/B,cAAc;IADlC,aAAa,CAAC,iBAAiB,CAAC;GACZ,cAAc,CAuFlC;eAvFoB,cAAc","sourcesContent":["/**\n * @license Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport '@things-factory/i18n-base'\nimport '@things-factory/modeller-ui/client/editors/things-editor-color'\n\nimport { LitElement, css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators'\n\nimport { Properties } from '@hatiolab/things-scene'\nimport { convert } from './value-converter'\n\n/**\n * 컴포넌트의 그림자 속성을 편집하는 element\n *\n * Example:\n * <property-shadow\n * @change=\"${e => { this.shadow = e.target.value }}\"\n * value=\"${this.shadow}\"\n * ></property-shadow>\n */\n\n@customElement('property-shadow')\nexport default class PropertyShadow extends LitElement {\n static styles = [\n css`\n :host {\n display: grid;\n grid-template-columns: repeat(10, 1fr);\n grid-gap: 5px;\n grid-auto-rows: minmax(24px, auto);\n\n align-items: center;\n }\n\n * {\n align-self: stretch;\n }\n\n label {\n grid-column: span 3;\n text-align: right;\n text-transform: capitalize;\n\n align-self: center;\n }\n\n input[type='number'],\n things-editor-color {\n grid-column: span 7;\n }\n input[type='number'] {\n border: var(--property-sidebar-fieldset-border);\n }\n\n .icon-only-label {\n grid-column: span 3;\n background: url(/assets/images/icon-properties-label.png) no-repeat;\n float: left;\n margin: 0;\n align-self: stretch;\n }\n\n .icon-only-label.color {\n background-position: 100% -500px;\n }\n `\n ]\n\n @property({ type: Object }) value: Properties = {}\n\n firstUpdated() {\n this.renderRoot.addEventListener('change', this._onValueChange.bind(this))\n }\n\n render() {\n return html`\n <label> <i18n-msg msgid=\"label.shadowOffsetX\">offset-X</i18n-msg> </label>\n\n <input type=\"number\" value-key=\"left\" .value=${this.value.left} />\n\n <label> <i18n-msg msgid=\"label.shadowOffsetY\">offset-Y</i18n-msg> </label>\n\n <input type=\"number\" value-key=\"top\" .value=${this.value.top} />\n\n <label> <i18n-msg msgid=\"label.shadowSize\">Size</i18n-msg> </label>\n\n <input type=\"number\" value-key=\"blurSize\" .value=${this.value.blurSize} />\n\n <label class=\"icon-only-label color\"></label>\n\n <things-editor-color value-key=\"color\" .value=${this.value.color}> </things-editor-color>\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 this.value = {\n ...this.value,\n [key]: convert(element)\n }\n\n this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }))\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function convert(element: any): any;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export function convert(element) {
|
|
2
|
+
switch (element.tagName) {
|
|
3
|
+
case 'THINGS-EDITOR-ANGLE-INPUT':
|
|
4
|
+
return Number(element.radian) || 0;
|
|
5
|
+
case 'INPUT':
|
|
6
|
+
switch (element.type) {
|
|
7
|
+
case 'checkbox':
|
|
8
|
+
return element.checked;
|
|
9
|
+
case 'number':
|
|
10
|
+
return Number(element.value) || 0;
|
|
11
|
+
case 'text':
|
|
12
|
+
return String(element.value);
|
|
13
|
+
}
|
|
14
|
+
break;
|
|
15
|
+
case 'PAPER-BUTTON':
|
|
16
|
+
return element.active;
|
|
17
|
+
case 'PAPER-LISTBOX':
|
|
18
|
+
return element.selected;
|
|
19
|
+
default:
|
|
20
|
+
return element.value;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=value-converter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"value-converter.js","sourceRoot":"","sources":["../../../../../src/modeller/property-sidebar/effects/value-converter.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,OAAO,CAAC,OAAY;IAClC,QAAQ,OAAO,CAAC,OAAO,EAAE;QACvB,KAAK,2BAA2B;YAC9B,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;QAEpC,KAAK,OAAO;YACV,QAAQ,OAAO,CAAC,IAAI,EAAE;gBACpB,KAAK,UAAU;oBACb,OAAO,OAAO,CAAC,OAAO,CAAA;gBACxB,KAAK,QAAQ;oBACX,OAAO,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;gBACnC,KAAK,MAAM;oBACT,OAAO,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;aAC/B;YACD,MAAK;QAEP,KAAK,cAAc;YACjB,OAAO,OAAO,CAAC,MAAM,CAAA;QAEvB,KAAK,eAAe;YAClB,OAAO,OAAO,CAAC,QAAQ,CAAA;QAEzB;YACE,OAAO,OAAO,CAAC,KAAK,CAAA;KACvB;AACH,CAAC","sourcesContent":["export function convert(element: any) {\n switch (element.tagName) {\n case 'THINGS-EDITOR-ANGLE-INPUT':\n return Number(element.radian) || 0\n\n case 'INPUT':\n switch (element.type) {\n case 'checkbox':\n return element.checked\n case 'number':\n return Number(element.value) || 0\n case 'text':\n return String(element.value)\n }\n break\n\n case 'PAPER-BUTTON':\n return element.active\n\n case 'PAPER-LISTBOX':\n return element.selected\n\n default:\n return element.value\n }\n}\n"]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Component, Scene } from '@hatiolab/things-scene';
|
|
2
|
+
import { LitElement, PropertyValues, TemplateResult } from 'lit';
|
|
3
|
+
import Sortable from 'sortablejs';
|
|
4
|
+
export default class SceneInspector extends LitElement {
|
|
5
|
+
static styles: import("lit").CSSResult[];
|
|
6
|
+
scene?: Scene;
|
|
7
|
+
private _extendedMap;
|
|
8
|
+
private show;
|
|
9
|
+
render(): TemplateResult<1>;
|
|
10
|
+
firstUpdated(): void;
|
|
11
|
+
updated(change: PropertyValues<this>): void;
|
|
12
|
+
sortableConfig: Sortable.Options;
|
|
13
|
+
onSort(e: Sortable.SortableEvent): void;
|
|
14
|
+
disconnectedCallback(): void;
|
|
15
|
+
_onclick(e: MouseEvent): void;
|
|
16
|
+
_ondblclick(e: MouseEvent): void;
|
|
17
|
+
get extendedMap(): any;
|
|
18
|
+
getNodeHandleClass(component: Component): "extended" | "collapsed" | "collapsespace";
|
|
19
|
+
isExtended(component: Component): boolean;
|
|
20
|
+
toggleExtended(component: Component): void;
|
|
21
|
+
toggleHidden(component: Component): void;
|
|
22
|
+
selectComponent(component: Component): void;
|
|
23
|
+
renderComponent(component: Component, depth: number): TemplateResult;
|
|
24
|
+
}
|
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { LitElement, css, html } from 'lit';
|
|
3
|
+
import { customElement, property } from 'lit/decorators';
|
|
4
|
+
import Sortable from 'sortablejs';
|
|
5
|
+
let SceneInspector = class SceneInspector extends LitElement {
|
|
6
|
+
constructor() {
|
|
7
|
+
super(...arguments);
|
|
8
|
+
this.show = false;
|
|
9
|
+
this.sortableConfig = {
|
|
10
|
+
group: 'inspector',
|
|
11
|
+
animation: 150,
|
|
12
|
+
draggable: '.component',
|
|
13
|
+
swapThreshold: 1,
|
|
14
|
+
onSort: this.onSort.bind(this)
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
render() {
|
|
18
|
+
return html ` ${!this.scene ? html `` : this.renderComponent(this.scene.root, 0)} `;
|
|
19
|
+
}
|
|
20
|
+
firstUpdated() {
|
|
21
|
+
dispatchEvent(new Event('resize'));
|
|
22
|
+
this.renderRoot.addEventListener('click', this._onclick.bind(this));
|
|
23
|
+
this.renderRoot.addEventListener('dblclick', this._ondblclick.bind(this));
|
|
24
|
+
}
|
|
25
|
+
updated(change) {
|
|
26
|
+
if (change.has('scene')) {
|
|
27
|
+
let oldScene = change.get('scene');
|
|
28
|
+
if (oldScene) {
|
|
29
|
+
oldScene.off('selected');
|
|
30
|
+
oldScene.off('execute');
|
|
31
|
+
oldScene.off('undo');
|
|
32
|
+
oldScene.off('redo');
|
|
33
|
+
delete this._extendedMap;
|
|
34
|
+
}
|
|
35
|
+
if (this.scene && this.scene.root) {
|
|
36
|
+
// root 는 기본상태가 extended 되도록 하기위해서임.
|
|
37
|
+
this.extendedMap.set(this.scene.root, true);
|
|
38
|
+
this.scene.on('selected', (after, before) => {
|
|
39
|
+
let selected = after;
|
|
40
|
+
selected.forEach(component => {
|
|
41
|
+
let parent = component.parent;
|
|
42
|
+
while (parent && !this.extendedMap.get(parent)) {
|
|
43
|
+
this.extendedMap.set(parent, true);
|
|
44
|
+
parent = parent.parent;
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
this.requestUpdate();
|
|
48
|
+
});
|
|
49
|
+
this.scene.on('execute', () => {
|
|
50
|
+
this.requestUpdate();
|
|
51
|
+
});
|
|
52
|
+
this.scene.on('undo', () => {
|
|
53
|
+
this.extendedMap.set(this.scene.root, true);
|
|
54
|
+
this.requestUpdate();
|
|
55
|
+
});
|
|
56
|
+
this.scene.on('redo', () => {
|
|
57
|
+
this.extendedMap.set(this.scene.root, true);
|
|
58
|
+
this.requestUpdate();
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
this.updateComplete.then(() => {
|
|
63
|
+
this.renderRoot.querySelectorAll('[sortable]').forEach(sortable => {
|
|
64
|
+
new Sortable(sortable, this.sortableConfig);
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
onSort(e) {
|
|
69
|
+
if (!this.scene)
|
|
70
|
+
return;
|
|
71
|
+
var component = e.item.component;
|
|
72
|
+
var to_container = e.to.component;
|
|
73
|
+
var to_index = e.newIndex - 1;
|
|
74
|
+
this.scene.move(component, to_container, to_index);
|
|
75
|
+
this.show = false;
|
|
76
|
+
this.updateComplete.then(() => {
|
|
77
|
+
this.show = true;
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
disconnectedCallback() {
|
|
81
|
+
super.disconnectedCallback();
|
|
82
|
+
delete this.scene;
|
|
83
|
+
delete this._extendedMap;
|
|
84
|
+
}
|
|
85
|
+
_onclick(e) {
|
|
86
|
+
e.stopPropagation();
|
|
87
|
+
var targetElement = e.target;
|
|
88
|
+
var classList = targetElement.classList;
|
|
89
|
+
var component;
|
|
90
|
+
while (!component && targetElement) {
|
|
91
|
+
component = targetElement.component;
|
|
92
|
+
if (component)
|
|
93
|
+
break;
|
|
94
|
+
targetElement = targetElement.parentNode;
|
|
95
|
+
if (!targetElement || targetElement === this.renderRoot)
|
|
96
|
+
break;
|
|
97
|
+
}
|
|
98
|
+
if (component) {
|
|
99
|
+
if (classList.contains('eye')) {
|
|
100
|
+
this.toggleHidden(component);
|
|
101
|
+
}
|
|
102
|
+
else if (classList.contains('extended') || classList.contains('collapsed')) {
|
|
103
|
+
this.toggleExtended(component);
|
|
104
|
+
}
|
|
105
|
+
this.selectComponent(component);
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
if (classList.contains('inspector')) {
|
|
109
|
+
this.show = !this.show;
|
|
110
|
+
this.style.height = this.show ? '100%' : '';
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
this.requestUpdate();
|
|
114
|
+
}
|
|
115
|
+
_ondblclick(e) {
|
|
116
|
+
e.stopPropagation();
|
|
117
|
+
var targetElement = e.target;
|
|
118
|
+
var component;
|
|
119
|
+
while (!component && targetElement) {
|
|
120
|
+
component = targetElement.component;
|
|
121
|
+
if (component)
|
|
122
|
+
break;
|
|
123
|
+
targetElement = targetElement.parentNode;
|
|
124
|
+
if (!targetElement || targetElement === this.renderRoot)
|
|
125
|
+
break;
|
|
126
|
+
}
|
|
127
|
+
if (component && component.isContainer()) {
|
|
128
|
+
this.toggleExtended(component);
|
|
129
|
+
}
|
|
130
|
+
this.requestUpdate();
|
|
131
|
+
}
|
|
132
|
+
get extendedMap() {
|
|
133
|
+
if (!this._extendedMap) {
|
|
134
|
+
this._extendedMap = new WeakMap();
|
|
135
|
+
}
|
|
136
|
+
return this._extendedMap;
|
|
137
|
+
}
|
|
138
|
+
getNodeHandleClass(component) {
|
|
139
|
+
if (component.isContainer() && component.components.length > 0) {
|
|
140
|
+
return !!this.extendedMap.get(component) ? 'extended' : 'collapsed';
|
|
141
|
+
}
|
|
142
|
+
else {
|
|
143
|
+
return 'collapsespace';
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
isExtended(component) {
|
|
147
|
+
return !!this.extendedMap.get(component);
|
|
148
|
+
}
|
|
149
|
+
toggleExtended(component) {
|
|
150
|
+
var extended = this.isExtended(component);
|
|
151
|
+
if (extended) {
|
|
152
|
+
this.extendedMap.delete(component);
|
|
153
|
+
}
|
|
154
|
+
else {
|
|
155
|
+
this.extendedMap.set(component, !extended);
|
|
156
|
+
}
|
|
157
|
+
this.requestUpdate();
|
|
158
|
+
}
|
|
159
|
+
toggleHidden(component) {
|
|
160
|
+
component.set('hidden', !component.hidden);
|
|
161
|
+
this.requestUpdate();
|
|
162
|
+
}
|
|
163
|
+
selectComponent(component) {
|
|
164
|
+
this.scene.selected = [component];
|
|
165
|
+
this.requestUpdate();
|
|
166
|
+
}
|
|
167
|
+
renderComponent(component, depth) {
|
|
168
|
+
var _a;
|
|
169
|
+
if (!component) {
|
|
170
|
+
return html ``;
|
|
171
|
+
}
|
|
172
|
+
var children = (component.isContainer() && component.components) || [];
|
|
173
|
+
var extended = this.isExtended(component) ? children : [];
|
|
174
|
+
return html `
|
|
175
|
+
<div
|
|
176
|
+
class="component"
|
|
177
|
+
?selected=${(((_a = this.scene) === null || _a === void 0 ? void 0 : _a.selected) || []).indexOf(component) > -1}
|
|
178
|
+
.component=${component}
|
|
179
|
+
?sortable=${component.isContainer()}
|
|
180
|
+
>
|
|
181
|
+
<span>
|
|
182
|
+
${depth > 0
|
|
183
|
+
? html `
|
|
184
|
+
<mwc-icon class="eye">${component.get('hidden') ? 'visibility_off' : 'visibility'}</mwc-icon>
|
|
185
|
+
<pre>${' '.repeat(depth)}</pre>
|
|
186
|
+
`
|
|
187
|
+
: html ` <pre>${' '.repeat(depth + 2)}</pre> `}
|
|
188
|
+
|
|
189
|
+
<span class=${this.getNodeHandleClass(component)}> </span>
|
|
190
|
+
|
|
191
|
+
<span class="type">${depth == 0 ? 'ROOT' : component.get('type')}</span> ${component.get('id')
|
|
192
|
+
? html ` <span class="name">#${component.get('id')}</span> `
|
|
193
|
+
: html ``}
|
|
194
|
+
</span>
|
|
195
|
+
|
|
196
|
+
${extended.map(child => this.renderComponent(child, depth + 1))}
|
|
197
|
+
</div>
|
|
198
|
+
`;
|
|
199
|
+
}
|
|
200
|
+
};
|
|
201
|
+
SceneInspector.styles = [
|
|
202
|
+
css `
|
|
203
|
+
:host {
|
|
204
|
+
color: var(--scene-inspector-color);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.component {
|
|
208
|
+
display: block;
|
|
209
|
+
overflow: hidden;
|
|
210
|
+
border-bottom: 1px solid rgba(0, 0, 0, 0.05);
|
|
211
|
+
font-size: 14px;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.component[selected] {
|
|
215
|
+
background-color: var(--scene-inspector-selected-background-color);
|
|
216
|
+
border-top: var(--scene-inspector-selected-border);
|
|
217
|
+
border-bottom: var(--scene-inspector-selected-border);
|
|
218
|
+
}
|
|
219
|
+
[selected] .type {
|
|
220
|
+
font-weight: bold;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
span,
|
|
224
|
+
i {
|
|
225
|
+
display: inline-block;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
span.type {
|
|
229
|
+
text-overflow: ellipses;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
span.name {
|
|
233
|
+
background-color: var(--scene-inspector-name-background-color);
|
|
234
|
+
border-radius: var(--border-radius);
|
|
235
|
+
padding: 0 4px;
|
|
236
|
+
color: #fff;
|
|
237
|
+
font-size: 0.8em;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.eye {
|
|
241
|
+
margin: 0 0 0 5px;
|
|
242
|
+
vertical-align: middle;
|
|
243
|
+
opacity: 0.7;
|
|
244
|
+
font-size: 1.1em;
|
|
245
|
+
color: var(--scene-inspector-eye-icon-color);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.collapsed::before,
|
|
249
|
+
.extended::before,
|
|
250
|
+
.collapsespace::before {
|
|
251
|
+
background: url(/assets/images/icon-shell-inspector.png) no-repeat;
|
|
252
|
+
width: 16px;
|
|
253
|
+
height: 18px;
|
|
254
|
+
display: inline-block;
|
|
255
|
+
content: '';
|
|
256
|
+
opacity: 0.6;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.collapsed::before {
|
|
260
|
+
background-position: 100% -195px;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
.extended::before {
|
|
264
|
+
background-position: 100% -295px;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
.collapsespace::before {
|
|
268
|
+
background-position: 100% -395px;
|
|
269
|
+
opacity: 0.9;
|
|
270
|
+
width: 16px;
|
|
271
|
+
}
|
|
272
|
+
.collapsed,
|
|
273
|
+
.extended,
|
|
274
|
+
.collapsespace {
|
|
275
|
+
border-left: 1px dotted rgba(0, 0, 0, 0.1);
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
pre {
|
|
279
|
+
display: inline;
|
|
280
|
+
}
|
|
281
|
+
`
|
|
282
|
+
];
|
|
283
|
+
__decorate([
|
|
284
|
+
property({ type: Object })
|
|
285
|
+
], SceneInspector.prototype, "scene", void 0);
|
|
286
|
+
SceneInspector = __decorate([
|
|
287
|
+
customElement('scene-inspector')
|
|
288
|
+
], SceneInspector);
|
|
289
|
+
export default SceneInspector;
|
|
290
|
+
//# sourceMappingURL=inspector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inspector.js","sourceRoot":"","sources":["../../../../../src/modeller/property-sidebar/inspector/inspector.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAkC,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC3E,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAExD,OAAO,QAAQ,MAAM,YAAY,CAAA;AAGjC,IAAqB,cAAc,GAAnC,MAAqB,cAAe,SAAQ,UAAU;IAAtD;;QAuFU,SAAI,GAAY,KAAK,CAAA;QAkE7B,mBAAc,GAAqB;YACjC,KAAK,EAAE,WAAW;YAClB,SAAS,EAAE,GAAG;YACd,SAAS,EAAE,YAAY;YACvB,aAAa,EAAE,CAAC;YAChB,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC;SAC/B,CAAA;IAgKH,CAAC;IAtOC,MAAM;QACJ,OAAO,IAAI,CAAA,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAA,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,GAAG,CAAA;IACnF,CAAC;IAED,YAAY;QACV,aAAa,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;QAClC,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAA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,KAAK,GAAG,CAAC;YACT,CAAC,CAAC,IAAI,CAAA;wCACsB,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,YAAY;uBAC1E,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC;eACzB;YACH,CAAC,CAAC,IAAI,CAAA,SAAS,GAAG,CAAC,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC,SAAS;;wBAEjC,IAAI,CAAC,kBAAkB,CAAC,SAAS,CAAC;;+BAE3B,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,WAAW,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC;YAC5F,CAAC,CAAC,IAAI,CAAA,wBAAwB,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU;YAC3D,CAAC,CAAC,IAAI,CAAA,EAAE;;;UAGV,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC;;KAElE,CAAA;IACH,CAAC;CACF,CAAA;AA9TQ,qBAAM,GAAG;IACd,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA+EF;CACF,CAAA;AAE2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CAAc;AApFtB,cAAc;IADlC,aAAa,CAAC,iBAAiB,CAAC;GACZ,cAAc,CA+TlC;eA/ToB,cAAc","sourcesContent":["import { Component, Container, Properties, Scene } from '@hatiolab/things-scene'\nimport { LitElement, PropertyValues, TemplateResult, css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators'\n\nimport Sortable from 'sortablejs'\n\n@customElement('scene-inspector')\nexport default class SceneInspector extends LitElement {\n static styles = [\n css`\n :host {\n color: var(--scene-inspector-color);\n }\n\n .component {\n display: block;\n overflow: hidden;\n border-bottom: 1px solid rgba(0, 0, 0, 0.05);\n font-size: 14px;\n }\n\n .component[selected] {\n background-color: var(--scene-inspector-selected-background-color);\n border-top: var(--scene-inspector-selected-border);\n border-bottom: var(--scene-inspector-selected-border);\n }\n [selected] .type {\n font-weight: bold;\n }\n\n span,\n i {\n display: inline-block;\n }\n\n span.type {\n text-overflow: ellipses;\n }\n\n span.name {\n background-color: var(--scene-inspector-name-background-color);\n border-radius: var(--border-radius);\n padding: 0 4px;\n color: #fff;\n font-size: 0.8em;\n }\n\n .eye {\n margin: 0 0 0 5px;\n vertical-align: middle;\n opacity: 0.7;\n font-size: 1.1em;\n color: var(--scene-inspector-eye-icon-color);\n }\n\n .collapsed::before,\n .extended::before,\n .collapsespace::before {\n background: url(/assets/images/icon-shell-inspector.png) no-repeat;\n width: 16px;\n height: 18px;\n display: inline-block;\n content: '';\n opacity: 0.6;\n }\n\n .collapsed::before {\n background-position: 100% -195px;\n }\n\n .extended::before {\n background-position: 100% -295px;\n }\n\n .collapsespace::before {\n background-position: 100% -395px;\n opacity: 0.9;\n width: 16px;\n }\n .collapsed,\n .extended,\n .collapsespace {\n border-left: 1px dotted rgba(0, 0, 0, 0.1);\n }\n\n pre {\n display: inline;\n }\n `\n ]\n\n @property({ type: Object }) scene?: Scene\n\n private _extendedMap: any\n private show: boolean = false\n\n render() {\n return html` ${!this.scene ? html`` : this.renderComponent(this.scene.root, 0)} `\n }\n\n firstUpdated() {\n dispatchEvent(new Event('resize'))\n this.renderRoot.addEventListener('click', this._onclick.bind(this) as EventListener)\n this.renderRoot.addEventListener('dblclick', this._ondblclick.bind(this) as EventListener)\n }\n\n updated(change: PropertyValues<this>) {\n if (change.has('scene')) {\n let oldScene = change.get('scene') as Scene\n\n if (oldScene) {\n oldScene.off('selected')\n oldScene.off('execute')\n oldScene.off('undo')\n oldScene.off('redo')\n\n delete this._extendedMap\n }\n\n if (this.scene && this.scene.root) {\n // root 는 기본상태가 extended 되도록 하기위해서임.\n this.extendedMap.set(this.scene.root, true)\n\n this.scene.on('selected', (after: Component[], before: Component[]) => {\n let selected = after\n\n selected.forEach(component => {\n let parent = component.parent\n while (parent && !this.extendedMap.get(parent)) {\n this.extendedMap.set(parent, true)\n parent = parent.parent\n }\n })\n\n this.requestUpdate()\n })\n\n this.scene.on('execute', () => {\n this.requestUpdate()\n })\n\n this.scene.on('undo', () => {\n this.extendedMap.set(this.scene!.root, true)\n this.requestUpdate()\n })\n\n this.scene.on('redo', () => {\n this.extendedMap.set(this.scene!.root, true)\n this.requestUpdate()\n })\n }\n }\n\n this.updateComplete.then(() => {\n this.renderRoot.querySelectorAll('[sortable]').forEach(sortable => {\n new Sortable(sortable as HTMLElement, this.sortableConfig)\n })\n })\n }\n\n sortableConfig: Sortable.Options = {\n group: 'inspector',\n animation: 150,\n draggable: '.component',\n swapThreshold: 1,\n onSort: this.onSort.bind(this)\n }\n\n onSort(e: Sortable.SortableEvent) {\n if (!this.scene) return\n\n var component = (e.item as HTMLElement & { component: Component }).component\n var to_container = (e.to as HTMLElement & { component: Component }).component as Container\n var to_index = e.newIndex! - 1\n\n this.scene.move(component, to_container, to_index)\n\n this.show = false\n this.updateComplete.then(() => {\n this.show = true\n })\n }\n\n disconnectedCallback() {\n super.disconnectedCallback()\n\n delete this.scene\n delete this._extendedMap\n }\n\n _onclick(e: MouseEvent) {\n e.stopPropagation()\n\n var targetElement = e.target as HTMLElement & { component: Component }\n var classList = targetElement.classList\n var component\n\n while (!component && targetElement) {\n component = targetElement.component\n\n if (component) break\n\n targetElement = targetElement.parentNode as HTMLElement & { component: Component }\n\n if (!targetElement || targetElement === this.renderRoot) break\n }\n\n if (component) {\n if (classList.contains('eye')) {\n this.toggleHidden(component)\n } else if (classList.contains('extended') || classList.contains('collapsed')) {\n this.toggleExtended(component)\n }\n\n this.selectComponent(component)\n } else {\n if (classList.contains('inspector')) {\n this.show = !this.show\n this.style.height = this.show ? '100%' : ''\n }\n }\n\n this.requestUpdate()\n }\n\n _ondblclick(e: MouseEvent) {\n e.stopPropagation()\n\n var targetElement = e.target as HTMLElement & { component: Component }\n var component\n\n while (!component && targetElement) {\n component = targetElement.component\n\n if (component) break\n\n targetElement = targetElement.parentNode as HTMLElement & { component: Component }\n\n if (!targetElement || targetElement === this.renderRoot) break\n }\n\n if (component && component.isContainer()) {\n this.toggleExtended(component)\n }\n\n this.requestUpdate()\n }\n\n get extendedMap() {\n if (!this._extendedMap) {\n this._extendedMap = new WeakMap()\n }\n\n return this._extendedMap\n }\n\n getNodeHandleClass(component: Component) {\n if (component.isContainer() && (component as Container).components.length > 0) {\n return !!this.extendedMap.get(component) ? 'extended' : 'collapsed'\n } else {\n return 'collapsespace'\n }\n }\n\n isExtended(component: Component) {\n return !!this.extendedMap.get(component)\n }\n\n toggleExtended(component: Component) {\n var extended = this.isExtended(component)\n\n if (extended) {\n this.extendedMap.delete(component)\n } else {\n this.extendedMap.set(component, !extended)\n }\n\n this.requestUpdate()\n }\n\n toggleHidden(component: Component) {\n component.set('hidden', !component.hidden)\n\n this.requestUpdate()\n }\n\n selectComponent(component: Component) {\n this.scene!.selected = [component]\n\n this.requestUpdate()\n }\n\n renderComponent(component: Component, depth: number): TemplateResult {\n if (!component) {\n return html``\n }\n\n var children = (component.isContainer() && (component as Container).components) || []\n var extended = this.isExtended(component) ? children : []\n\n return html`\n <div\n class=\"component\"\n ?selected=${(this.scene?.selected || []).indexOf(component) > -1}\n .component=${component}\n ?sortable=${component.isContainer()}\n >\n <span>\n ${depth > 0\n ? html`\n <mwc-icon class=\"eye\">${component.get('hidden') ? 'visibility_off' : 'visibility'}</mwc-icon>\n <pre>${' '.repeat(depth)}</pre>\n `\n : html` <pre>${' '.repeat(depth + 2)}</pre> `}\n\n <span class=${this.getNodeHandleClass(component)}> </span>\n\n <span class=\"type\">${depth == 0 ? 'ROOT' : component.get('type')}</span> ${component.get('id')\n ? html` <span class=\"name\">#${component.get('id')}</span> `\n : html``}\n </span>\n\n ${extended.map(child => this.renderComponent(child, depth + 1))}\n </div>\n `\n }\n}\n"]}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright © HatioLab Inc. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
import { css } from 'lit';
|
|
5
|
+
export const PropertySharedStyle = css `
|
|
6
|
+
fieldset {
|
|
7
|
+
border: none;
|
|
8
|
+
margin: 4px;
|
|
9
|
+
padding: 9px 4px 9px 4px;
|
|
10
|
+
border-bottom: var(--property-sidebar-fieldset-border);
|
|
11
|
+
color: var(--property-sidebar-fieldset-legend-color);
|
|
12
|
+
font: var(--property-sidebar-fieldset-label);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
fieldset legend {
|
|
16
|
+
padding: 5px 0 0 5px;
|
|
17
|
+
color: var(--property-sidebar-fieldset-legend-color);
|
|
18
|
+
font: var(--property-sidebar-fieldset-legend);
|
|
19
|
+
text-transform: capitalize;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
select,
|
|
23
|
+
input {
|
|
24
|
+
border: var(--property-sidebar-fieldset-border);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* property grid */
|
|
28
|
+
.property-grid {
|
|
29
|
+
display: grid;
|
|
30
|
+
grid-template-columns: repeat(10, 1fr);
|
|
31
|
+
grid-gap: 5px;
|
|
32
|
+
grid-auto-rows: minmax(24px, auto);
|
|
33
|
+
align-items: center;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.property-grid > * {
|
|
37
|
+
width: 100%;
|
|
38
|
+
box-sizing: border-box;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.property-grid > label {
|
|
42
|
+
grid-column: span 3;
|
|
43
|
+
text-align: right;
|
|
44
|
+
text-transform: capitalize;
|
|
45
|
+
line-height: 2;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.property-grid > input,
|
|
49
|
+
.property-grid > table,
|
|
50
|
+
.property-grid > select,
|
|
51
|
+
.property-grid > things-editor-angle-input,
|
|
52
|
+
.property-grid > things-editor-buttons-radio,
|
|
53
|
+
.property-grid > things-editor-color,
|
|
54
|
+
[custom-editor] {
|
|
55
|
+
grid-column: span 7;
|
|
56
|
+
align-self: stretch;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.property-grid > .checkbox-row {
|
|
60
|
+
grid-column: span 10;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.property-grid > .property-full-label {
|
|
64
|
+
grid-column: span 3;
|
|
65
|
+
text-align: right;
|
|
66
|
+
text-transform: capitalize;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.property-grid > .property-half-label {
|
|
70
|
+
grid-column: span 1;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.property-grid > .property-full-input {
|
|
74
|
+
grid-column: span 7;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.property-grid > .property-half-input {
|
|
78
|
+
grid-column: span 4;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/* checkbox-row */
|
|
82
|
+
.checkbox-row {
|
|
83
|
+
display: grid;
|
|
84
|
+
grid-template-columns: repeat(10, 1fr);
|
|
85
|
+
grid-gap: 5px;
|
|
86
|
+
grid-auto-rows: minmax(24px, auto);
|
|
87
|
+
align-items: center;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.checkbox-row > input {
|
|
91
|
+
grid-column: 4 / 5;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.checkbox-row > label {
|
|
95
|
+
grid-column: span 6;
|
|
96
|
+
text-align: left;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/* image resources */
|
|
100
|
+
.icon-only-label {
|
|
101
|
+
grid-column: span 1;
|
|
102
|
+
|
|
103
|
+
background: url(/assets/images/icon-properties-label.png) no-repeat;
|
|
104
|
+
float: left;
|
|
105
|
+
margin: 0;
|
|
106
|
+
align-self: stretch;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.icon-only-label.color {
|
|
110
|
+
background-position: 100% -500px;
|
|
111
|
+
}
|
|
112
|
+
.icon-only-label.font-size {
|
|
113
|
+
background-position: 100% -594px;
|
|
114
|
+
}
|
|
115
|
+
.icon-only-label.leading {
|
|
116
|
+
background-position: 100% -696px;
|
|
117
|
+
}
|
|
118
|
+
.icon-only-label.hscale {
|
|
119
|
+
background-position: 100% -296px;
|
|
120
|
+
}
|
|
121
|
+
.icon-only-label.vscale {
|
|
122
|
+
background-position: 100% -396px;
|
|
123
|
+
}
|
|
124
|
+
.icon-only-label.linewidth {
|
|
125
|
+
background-position: 100% -894px;
|
|
126
|
+
}
|
|
127
|
+
.icon-only-label.lineHeight {
|
|
128
|
+
background-position: 100% -995px;
|
|
129
|
+
}
|
|
130
|
+
`;
|
|
131
|
+
//# sourceMappingURL=property-shared-style.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"property-shared-style.js","sourceRoot":"","sources":["../../../../src/modeller/property-sidebar/property-shared-style.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAEzB,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6HrC,CAAA","sourcesContent":["/**\n * @license Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport { css } from 'lit'\n\nexport const PropertySharedStyle = css`\n fieldset {\n border: none;\n margin: 4px;\n padding: 9px 4px 9px 4px;\n border-bottom: var(--property-sidebar-fieldset-border);\n color: var(--property-sidebar-fieldset-legend-color);\n font: var(--property-sidebar-fieldset-label);\n }\n\n fieldset legend {\n padding: 5px 0 0 5px;\n color: var(--property-sidebar-fieldset-legend-color);\n font: var(--property-sidebar-fieldset-legend);\n text-transform: capitalize;\n }\n\n select,\n input {\n border: var(--property-sidebar-fieldset-border);\n }\n\n /* property grid */\n .property-grid {\n display: grid;\n grid-template-columns: repeat(10, 1fr);\n grid-gap: 5px;\n grid-auto-rows: minmax(24px, auto);\n align-items: center;\n }\n\n .property-grid > * {\n width: 100%;\n box-sizing: border-box;\n }\n\n .property-grid > label {\n grid-column: span 3;\n text-align: right;\n text-transform: capitalize;\n line-height: 2;\n }\n\n .property-grid > input,\n .property-grid > table,\n .property-grid > select,\n .property-grid > things-editor-angle-input,\n .property-grid > things-editor-buttons-radio,\n .property-grid > things-editor-color,\n [custom-editor] {\n grid-column: span 7;\n align-self: stretch;\n }\n\n .property-grid > .checkbox-row {\n grid-column: span 10;\n }\n\n .property-grid > .property-full-label {\n grid-column: span 3;\n text-align: right;\n text-transform: capitalize;\n }\n\n .property-grid > .property-half-label {\n grid-column: span 1;\n }\n\n .property-grid > .property-full-input {\n grid-column: span 7;\n }\n\n .property-grid > .property-half-input {\n grid-column: span 4;\n }\n\n /* checkbox-row */\n .checkbox-row {\n display: grid;\n grid-template-columns: repeat(10, 1fr);\n grid-gap: 5px;\n grid-auto-rows: minmax(24px, auto);\n align-items: center;\n }\n\n .checkbox-row > input {\n grid-column: 4 / 5;\n }\n\n .checkbox-row > label {\n grid-column: span 6;\n text-align: left;\n }\n\n /* image resources */\n .icon-only-label {\n grid-column: span 1;\n\n background: url(/assets/images/icon-properties-label.png) no-repeat;\n float: left;\n margin: 0;\n align-self: stretch;\n }\n\n .icon-only-label.color {\n background-position: 100% -500px;\n }\n .icon-only-label.font-size {\n background-position: 100% -594px;\n }\n .icon-only-label.leading {\n background-position: 100% -696px;\n }\n .icon-only-label.hscale {\n background-position: 100% -296px;\n }\n .icon-only-label.vscale {\n background-position: 100% -396px;\n }\n .icon-only-label.linewidth {\n background-position: 100% -894px;\n }\n .icon-only-label.lineHeight {\n background-position: 100% -995px;\n }\n`\n"]}
|