@operato/board 0.2.43 → 0.2.47

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.
Files changed (140) hide show
  1. package/@types/global/index.d.ts +1 -0
  2. package/CHANGELOG.md +52 -0
  3. package/assets/images/components/no-image.png +0 -0
  4. package/custom-elements.json +5064 -742
  5. package/demo/index-modeller.html +101 -0
  6. package/demo/index.html +3 -3
  7. package/dist/src/index.d.ts +1 -0
  8. package/dist/src/index.js +1 -0
  9. package/dist/src/index.js.map +1 -1
  10. package/dist/src/modeller/component-toolbar/component-menu.d.ts +4 -0
  11. package/dist/src/modeller/component-toolbar/component-menu.js +148 -0
  12. package/dist/src/modeller/component-toolbar/component-menu.js.map +1 -0
  13. package/dist/src/modeller/component-toolbar/component-toolbar.d.ts +4 -0
  14. package/dist/src/modeller/component-toolbar/component-toolbar.js +176 -0
  15. package/dist/src/modeller/component-toolbar/component-toolbar.js.map +1 -0
  16. package/dist/src/modeller/edit-toolbar-style.d.ts +4 -0
  17. package/dist/src/modeller/edit-toolbar-style.js +227 -0
  18. package/dist/src/modeller/edit-toolbar-style.js.map +1 -0
  19. package/dist/src/modeller/edit-toolbar.d.ts +61 -0
  20. package/dist/src/modeller/edit-toolbar.js +644 -0
  21. package/dist/src/modeller/edit-toolbar.js.map +1 -0
  22. package/dist/src/modeller/property-sidebar/abstract-property.d.ts +10 -0
  23. package/dist/src/modeller/property-sidebar/abstract-property.js +58 -0
  24. package/dist/src/modeller/property-sidebar/abstract-property.js.map +1 -0
  25. package/dist/src/modeller/property-sidebar/data-binding/data-binding-mapper.d.ts +48 -0
  26. package/dist/src/modeller/property-sidebar/data-binding/data-binding-mapper.js +350 -0
  27. package/dist/src/modeller/property-sidebar/data-binding/data-binding-mapper.js.map +1 -0
  28. package/dist/src/modeller/property-sidebar/data-binding/data-binding.d.ts +7 -0
  29. package/dist/src/modeller/property-sidebar/data-binding/data-binding.js +431 -0
  30. package/dist/src/modeller/property-sidebar/data-binding/data-binding.js.map +1 -0
  31. package/dist/src/modeller/property-sidebar/effects/effects-shared-style.d.ts +4 -0
  32. package/dist/src/modeller/property-sidebar/effects/effects-shared-style.js +57 -0
  33. package/dist/src/modeller/property-sidebar/effects/effects-shared-style.js.map +1 -0
  34. package/dist/src/modeller/property-sidebar/effects/effects.d.ts +6 -0
  35. package/dist/src/modeller/property-sidebar/effects/effects.js +55 -0
  36. package/dist/src/modeller/property-sidebar/effects/effects.js.map +1 -0
  37. package/dist/src/modeller/property-sidebar/effects/property-animation.d.ts +22 -0
  38. package/dist/src/modeller/property-sidebar/effects/property-animation.js +127 -0
  39. package/dist/src/modeller/property-sidebar/effects/property-animation.js.map +1 -0
  40. package/dist/src/modeller/property-sidebar/effects/property-animations.d.ts +5 -0
  41. package/dist/src/modeller/property-sidebar/effects/property-animations.js +83 -0
  42. package/dist/src/modeller/property-sidebar/effects/property-animations.js.map +1 -0
  43. package/dist/src/modeller/property-sidebar/effects/property-event-hover.d.ts +4 -0
  44. package/dist/src/modeller/property-sidebar/effects/property-event-hover.js +123 -0
  45. package/dist/src/modeller/property-sidebar/effects/property-event-hover.js.map +1 -0
  46. package/dist/src/modeller/property-sidebar/effects/property-event-tap.d.ts +4 -0
  47. package/dist/src/modeller/property-sidebar/effects/property-event-tap.js +119 -0
  48. package/dist/src/modeller/property-sidebar/effects/property-event-tap.js.map +1 -0
  49. package/dist/src/modeller/property-sidebar/effects/property-event.d.ts +5 -0
  50. package/dist/src/modeller/property-sidebar/effects/property-event.js +59 -0
  51. package/dist/src/modeller/property-sidebar/effects/property-event.js.map +1 -0
  52. package/dist/src/modeller/property-sidebar/effects/property-shadow.d.ts +22 -0
  53. package/dist/src/modeller/property-sidebar/effects/property-shadow.js +106 -0
  54. package/dist/src/modeller/property-sidebar/effects/property-shadow.js.map +1 -0
  55. package/dist/src/modeller/property-sidebar/effects/value-converter.d.ts +1 -0
  56. package/dist/src/modeller/property-sidebar/effects/value-converter.js +23 -0
  57. package/dist/src/modeller/property-sidebar/effects/value-converter.js.map +1 -0
  58. package/dist/src/modeller/property-sidebar/inspector/inspector.d.ts +24 -0
  59. package/dist/src/modeller/property-sidebar/inspector/inspector.js +290 -0
  60. package/dist/src/modeller/property-sidebar/inspector/inspector.js.map +1 -0
  61. package/dist/src/modeller/property-sidebar/property-shared-style.d.ts +4 -0
  62. package/dist/src/modeller/property-sidebar/property-shared-style.js +131 -0
  63. package/dist/src/modeller/property-sidebar/property-shared-style.js.map +1 -0
  64. package/dist/src/modeller/property-sidebar/property-sidebar.d.ts +10 -0
  65. package/dist/src/modeller/property-sidebar/property-sidebar.js +313 -0
  66. package/dist/src/modeller/property-sidebar/property-sidebar.js.map +1 -0
  67. package/dist/src/modeller/property-sidebar/shapes/box-padding-editor-styles.d.ts +1 -0
  68. package/dist/src/modeller/property-sidebar/shapes/box-padding-editor-styles.js +94 -0
  69. package/dist/src/modeller/property-sidebar/shapes/box-padding-editor-styles.js.map +1 -0
  70. package/dist/src/modeller/property-sidebar/shapes/shapes.d.ts +6 -0
  71. package/dist/src/modeller/property-sidebar/shapes/shapes.js +406 -0
  72. package/dist/src/modeller/property-sidebar/shapes/shapes.js.map +1 -0
  73. package/dist/src/modeller/property-sidebar/specifics/specific-properties-builder.d.ts +4 -0
  74. package/dist/src/modeller/property-sidebar/specifics/specific-properties-builder.js +127 -0
  75. package/dist/src/modeller/property-sidebar/specifics/specific-properties-builder.js.map +1 -0
  76. package/dist/src/modeller/property-sidebar/specifics/specifics.d.ts +5 -0
  77. package/dist/src/modeller/property-sidebar/specifics/specifics.js +78 -0
  78. package/dist/src/modeller/property-sidebar/specifics/specifics.js.map +1 -0
  79. package/dist/src/modeller/property-sidebar/styles/styles.d.ts +8 -0
  80. package/dist/src/modeller/property-sidebar/styles/styles.js +562 -0
  81. package/dist/src/modeller/property-sidebar/styles/styles.js.map +1 -0
  82. package/dist/src/modeller/scene-viewer/confidential-overlay.d.ts +4 -0
  83. package/dist/src/modeller/scene-viewer/confidential-overlay.js +14 -0
  84. package/dist/src/modeller/scene-viewer/confidential-overlay.js.map +1 -0
  85. package/dist/src/modeller/scene-viewer/ox-scene-handler.d.ts +11 -0
  86. package/dist/src/modeller/scene-viewer/ox-scene-handler.js +36 -0
  87. package/dist/src/modeller/scene-viewer/ox-scene-handler.js.map +1 -0
  88. package/dist/src/modeller/scene-viewer/ox-scene-layer.d.ts +10 -0
  89. package/dist/src/modeller/scene-viewer/ox-scene-layer.js +42 -0
  90. package/dist/src/modeller/scene-viewer/ox-scene-layer.js.map +1 -0
  91. package/dist/src/modeller/scene-viewer/ox-scene-player.d.ts +1 -0
  92. package/dist/src/modeller/scene-viewer/ox-scene-player.js +99 -0
  93. package/dist/src/modeller/scene-viewer/ox-scene-player.js.map +1 -0
  94. package/dist/src/modeller/scene-viewer/ox-scene-property.d.ts +6 -0
  95. package/dist/src/modeller/scene-viewer/ox-scene-property.js +19 -0
  96. package/dist/src/modeller/scene-viewer/ox-scene-property.js.map +1 -0
  97. package/dist/src/modeller/scene-viewer/ox-scene-viewer.d.ts +39 -0
  98. package/dist/src/modeller/scene-viewer/ox-scene-viewer.js +245 -0
  99. package/dist/src/modeller/scene-viewer/ox-scene-viewer.js.map +1 -0
  100. package/dist/src/ox-board-modeller.d.ts +40 -0
  101. package/dist/src/ox-board-modeller.js +318 -0
  102. package/dist/src/ox-board-modeller.js.map +1 -0
  103. package/dist/src/types.d.ts +12 -0
  104. package/dist/src/types.js +2 -0
  105. package/dist/src/types.js.map +1 -0
  106. package/dist/tsconfig.tsbuildinfo +1 -1
  107. package/package.json +26 -5
  108. package/src/index.ts +1 -0
  109. package/src/modeller/component-toolbar/component-menu.ts +142 -0
  110. package/src/modeller/component-toolbar/component-toolbar.ts +169 -0
  111. package/src/modeller/edit-toolbar-style.ts +228 -0
  112. package/src/modeller/edit-toolbar.ts +640 -0
  113. package/src/modeller/property-sidebar/abstract-property.ts +73 -0
  114. package/src/modeller/property-sidebar/data-binding/data-binding-mapper.ts +371 -0
  115. package/src/modeller/property-sidebar/data-binding/data-binding.ts +449 -0
  116. package/src/modeller/property-sidebar/effects/effects-shared-style.ts +58 -0
  117. package/src/modeller/property-sidebar/effects/effects.ts +57 -0
  118. package/src/modeller/property-sidebar/effects/property-animation.ts +133 -0
  119. package/src/modeller/property-sidebar/effects/property-animations.ts +84 -0
  120. package/src/modeller/property-sidebar/effects/property-event-hover.ts +132 -0
  121. package/src/modeller/property-sidebar/effects/property-event-tap.ts +128 -0
  122. package/src/modeller/property-sidebar/effects/property-event.ts +65 -0
  123. package/src/modeller/property-sidebar/effects/property-shadow.ts +114 -0
  124. package/src/modeller/property-sidebar/effects/value-converter.ts +26 -0
  125. package/src/modeller/property-sidebar/inspector/inspector.ts +327 -0
  126. package/src/modeller/property-sidebar/property-shared-style.ts +132 -0
  127. package/src/modeller/property-sidebar/property-sidebar.ts +308 -0
  128. package/src/modeller/property-sidebar/shapes/box-padding-editor-styles.ts +94 -0
  129. package/src/modeller/property-sidebar/shapes/shapes.ts +409 -0
  130. package/src/modeller/property-sidebar/specifics/specific-properties-builder.ts +135 -0
  131. package/src/modeller/property-sidebar/specifics/specifics.ts +72 -0
  132. package/src/modeller/property-sidebar/styles/styles.ts +578 -0
  133. package/src/modeller/scene-viewer/confidential-overlay.ts +18 -0
  134. package/src/modeller/scene-viewer/ox-scene-handler.ts +40 -0
  135. package/src/modeller/scene-viewer/ox-scene-layer.ts +42 -0
  136. package/src/modeller/scene-viewer/ox-scene-player.ts +104 -0
  137. package/src/modeller/scene-viewer/ox-scene-property.ts +10 -0
  138. package/src/modeller/scene-viewer/ox-scene-viewer.ts +248 -0
  139. package/src/ox-board-modeller.ts +302 -0
  140. package/src/types.ts +26 -0
@@ -0,0 +1,127 @@
1
+ /**
2
+ * @license Copyright © HatioLab Inc. All rights reserved.
3
+ */
4
+ import { __decorate } from "tslib";
5
+ import '@operato/input/dist/src/ox-input-angle';
6
+ import { html, LitElement } from 'lit';
7
+ import { customElement, property } from 'lit/decorators';
8
+ import { EffectsSharedStyle } from './effects-shared-style';
9
+ import { convert } from './value-converter';
10
+ /**
11
+ * 컴포넌트의 animation 속성을 편집하는 element
12
+
13
+ Example:
14
+
15
+ <property-animation .value=${animation}>
16
+ </property-animation>
17
+ */
18
+ let PropertyAnimation = class PropertyAnimation extends LitElement {
19
+ firstUpdated() {
20
+ this.renderRoot.addEventListener('change', this._onValueChange.bind(this));
21
+ }
22
+ render() {
23
+ const value = this.value || {};
24
+ return html `
25
+ <label>Animation Type</label>
26
+ <select value-key="type" .value=${value.type}>
27
+ <option value="">None</option>
28
+ <option value="rotation">Rotation</option>
29
+ <option value="vibration">Vibration</option>
30
+ <option value="heartbeat">Heartbeat</option>
31
+ <option value="moving">Moving</option>
32
+ <option value="fade">Fade</option>
33
+ <option value="outline">Outline</option>
34
+ </select>
35
+
36
+ <label> <i18n-msg msgid="label.waiting-time">waiting time</i18n-msg> </label>
37
+ <input type="number" value-key="delay" .value=${value.delay} placeholder="ms" />
38
+
39
+ <label> <i18n-msg msgid="label.duration">duration</i18n-msg> </label>
40
+ <input type="number" value-key="duration" .value=${value.duration} placeholder="ms" />
41
+
42
+ ${value.type == 'rotation' || value.type == 'vibration'
43
+ ? html `
44
+ <label> <i18n-msg msgid="label.theta">theta</i18n-msg> </label>
45
+ <ox-input-angle value-key="theta" .radian=${value.theta}> </ox-input-angle>
46
+ `
47
+ : html ``}
48
+ ${value.type == 'heartbeat'
49
+ ? html `
50
+ <label> <i18n-msg msgid="label.scale">scale</i18n-msg> </label>
51
+ <input type="number" value-key="scale" .value=${value.scale} />
52
+ `
53
+ : html ``}
54
+ ${value.type == 'moving'
55
+ ? html `
56
+ <label> <i18n-msg msgid="label.x-axes">X-axes</i18n-msg> </label>
57
+ <input type="number" value-key="x" .value=${value.x} />
58
+
59
+ <label> <i18n-msg msgid="label.y-axes">Y-axes</i18n-msg> </label>
60
+ <input type="number" value-key="y" .value=${value.y} />
61
+ `
62
+ : html ``}
63
+ ${value.type == 'fade'
64
+ ? html `
65
+ <label> <i18n-msg msgid="label.start-alpha">start alpha</i18n-msg> </label>
66
+ <input type="number" value-key="startAlpha" .value=${value.startAlpha} />
67
+
68
+ <label> <i18n-msg msgid="label.end-alpha">end alpha</i18n-msg> </label>
69
+ <input type="number" value-key="endAlpha" .value=${value.endAlpha} />
70
+ `
71
+ : html ``}
72
+ ${value.type == 'outline'
73
+ ? html `
74
+ <label> <i18n-msg msgid="label.target">target</i18n-msg> </label>
75
+ <input value-key="rideOn" .value=${value.rideOn || ''} list="target-list" />
76
+ <datalist id="target-list">
77
+ ${this.scene.ids.map(info => info.key).map(id => html ` <option value=${id}></option> `)}
78
+ </datalist>
79
+ `
80
+ : html ``}
81
+
82
+ <input id="checkbox-repeat" value-key="repeat" type="checkbox" .checked=${value.repeat} />
83
+ <label for="checkbox-repeat" class="checkbox-label"> <i18n-msg msgid="label.repeat">repeat</i18n-msg> </label>
84
+
85
+ <label>delta</label>
86
+ <select value-key="delta" .value=${value.delta}>
87
+ <option value="linear">linear</option>
88
+ <option value="quad">quad</option>
89
+ <option value="circ">circ</option>
90
+ <option value="back">back</option>
91
+ <option value="bounce">bounce</option>
92
+ <option value="elastic">elastic</option>
93
+ </select>
94
+
95
+ <label>ease</label>
96
+ <select value-key="ease" .value=${value.ease}>
97
+ <option value="in">in</option>
98
+ <option value="out">out</option>
99
+ <option value="inout">inout</option>
100
+ </select>
101
+ `;
102
+ }
103
+ _onValueChange(e) {
104
+ var element = e.target;
105
+ var key = element.getAttribute('value-key');
106
+ if (!key) {
107
+ return;
108
+ }
109
+ this.value = {
110
+ ...this.value,
111
+ [key]: convert(element)
112
+ };
113
+ this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }));
114
+ }
115
+ };
116
+ PropertyAnimation.styles = [EffectsSharedStyle];
117
+ __decorate([
118
+ property({ type: Object })
119
+ ], PropertyAnimation.prototype, "value", void 0);
120
+ __decorate([
121
+ property({ type: Object })
122
+ ], PropertyAnimation.prototype, "scene", void 0);
123
+ PropertyAnimation = __decorate([
124
+ customElement('property-animation')
125
+ ], PropertyAnimation);
126
+ export default PropertyAnimation;
127
+ //# sourceMappingURL=property-animation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"property-animation.js","sourceRoot":"","sources":["../../../../../src/modeller/property-sidebar/effects/property-animation.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,OAAO,wCAAwC,CAAA;AAE/C,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AACtC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAIxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAE3C;;;;;;;EAOE;AAGF,IAAqB,iBAAiB,GAAtC,MAAqB,iBAAkB,SAAQ,UAAU;IAMvD,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,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,IAAI,EAAE,CAAA;QAE9B,OAAO,IAAI,CAAA;;wCAEyB,KAAK,CAAC,IAAI;;;;;;;;;;;sDAWI,KAAK,CAAC,KAAK;;;yDAGR,KAAK,CAAC,QAAQ;;QAE/D,KAAK,CAAC,IAAI,IAAI,UAAU,IAAI,KAAK,CAAC,IAAI,IAAI,WAAW;YACrD,CAAC,CAAC,IAAI,CAAA;;wDAE0C,KAAK,CAAC,KAAK;WACxD;YACH,CAAC,CAAC,IAAI,CAAA,EAAE;QACR,KAAK,CAAC,IAAI,IAAI,WAAW;YACzB,CAAC,CAAC,IAAI,CAAA;;4DAE8C,KAAK,CAAC,KAAK;WAC5D;YACH,CAAC,CAAC,IAAI,CAAA,EAAE;QACR,KAAK,CAAC,IAAI,IAAI,QAAQ;YAC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CAAC,kBAAkB,CAAC,CAAA;AAER;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;gDAAmB;AAClB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;gDAAc;AAJtB,iBAAiB;IADrC,aAAa,CAAC,oBAAoB,CAAC;GACf,iBAAiB,CA4GrC;eA5GoB,iBAAiB","sourcesContent":["/**\n * @license Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport '@operato/input/dist/src/ox-input-angle'\n\nimport { html, LitElement } from 'lit'\nimport { customElement, property } from 'lit/decorators'\n\nimport { Properties, Scene } from '@hatiolab/things-scene'\n\nimport { EffectsSharedStyle } from './effects-shared-style'\nimport { convert } from './value-converter'\n\n/**\n * 컴포넌트의 animation 속성을 편집하는 element\n\nExample:\n\n <property-animation .value=${animation}>\n </property-animation>\n*/\n\n@customElement('property-animation')\nexport default class PropertyAnimation extends LitElement {\n static styles = [EffectsSharedStyle]\n\n @property({ type: Object }) value?: Properties\n @property({ type: Object }) scene?: Scene\n\n firstUpdated() {\n this.renderRoot.addEventListener('change', this._onValueChange.bind(this))\n }\n\n render() {\n const value = this.value || {}\n\n return html`\n <label>Animation Type</label>\n <select value-key=\"type\" .value=${value.type}>\n <option value=\"\">None</option>\n <option value=\"rotation\">Rotation</option>\n <option value=\"vibration\">Vibration</option>\n <option value=\"heartbeat\">Heartbeat</option>\n <option value=\"moving\">Moving</option>\n <option value=\"fade\">Fade</option>\n <option value=\"outline\">Outline</option>\n </select>\n\n <label> <i18n-msg msgid=\"label.waiting-time\">waiting time</i18n-msg> </label>\n <input type=\"number\" value-key=\"delay\" .value=${value.delay} placeholder=\"ms\" />\n\n <label> <i18n-msg msgid=\"label.duration\">duration</i18n-msg> </label>\n <input type=\"number\" value-key=\"duration\" .value=${value.duration} placeholder=\"ms\" />\n\n ${value.type == 'rotation' || value.type == 'vibration'\n ? html`\n <label> <i18n-msg msgid=\"label.theta\">theta</i18n-msg> </label>\n <ox-input-angle value-key=\"theta\" .radian=${value.theta}> </ox-input-angle>\n `\n : html``}\n ${value.type == 'heartbeat'\n ? html`\n <label> <i18n-msg msgid=\"label.scale\">scale</i18n-msg> </label>\n <input type=\"number\" value-key=\"scale\" .value=${value.scale} />\n `\n : html``}\n ${value.type == 'moving'\n ? html`\n <label> <i18n-msg msgid=\"label.x-axes\">X-axes</i18n-msg> </label>\n <input type=\"number\" value-key=\"x\" .value=${value.x} />\n\n <label> <i18n-msg msgid=\"label.y-axes\">Y-axes</i18n-msg> </label>\n <input type=\"number\" value-key=\"y\" .value=${value.y} />\n `\n : html``}\n ${value.type == 'fade'\n ? html`\n <label> <i18n-msg msgid=\"label.start-alpha\">start alpha</i18n-msg> </label>\n <input type=\"number\" value-key=\"startAlpha\" .value=${value.startAlpha} />\n\n <label> <i18n-msg msgid=\"label.end-alpha\">end alpha</i18n-msg> </label>\n <input type=\"number\" value-key=\"endAlpha\" .value=${value.endAlpha} />\n `\n : html``}\n ${value.type == 'outline'\n ? html`\n <label> <i18n-msg msgid=\"label.target\">target</i18n-msg> </label>\n <input value-key=\"rideOn\" .value=${value.rideOn || ''} list=\"target-list\" />\n <datalist id=\"target-list\">\n ${this.scene!.ids.map(info => info.key).map(id => html` <option value=${id}></option> `)}\n </datalist>\n `\n : html``}\n\n <input id=\"checkbox-repeat\" value-key=\"repeat\" type=\"checkbox\" .checked=${value.repeat} />\n <label for=\"checkbox-repeat\" class=\"checkbox-label\"> <i18n-msg msgid=\"label.repeat\">repeat</i18n-msg> </label>\n\n <label>delta</label>\n <select value-key=\"delta\" .value=${value.delta}>\n <option value=\"linear\">linear</option>\n <option value=\"quad\">quad</option>\n <option value=\"circ\">circ</option>\n <option value=\"back\">back</option>\n <option value=\"bounce\">bounce</option>\n <option value=\"elastic\">elastic</option>\n </select>\n\n <label>ease</label>\n <select value-key=\"ease\" .value=${value.ease}>\n <option value=\"in\">in</option>\n <option value=\"out\">out</option>\n <option value=\"inout\">inout</option>\n </select>\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,5 @@
1
+ /**
2
+ * @license Copyright © HatioLab Inc. All rights reserved.
3
+ */
4
+ import './property-animation';
5
+ import '@material/mwc-icon';
@@ -0,0 +1,83 @@
1
+ /**
2
+ * @license Copyright © HatioLab Inc. All rights reserved.
3
+ */
4
+ import { __decorate } from "tslib";
5
+ import './property-animation';
6
+ import '@material/mwc-icon';
7
+ import { css, html, LitElement } from 'lit';
8
+ import { customElement, property, state } from 'lit/decorators';
9
+ import { PropertySharedStyle } from '../property-shared-style';
10
+ import { convert } from './value-converter';
11
+ let PropertyAnimations = class PropertyAnimations extends LitElement {
12
+ constructor() {
13
+ super(...arguments);
14
+ this._expanded = false;
15
+ }
16
+ firstUpdated() {
17
+ this.renderRoot.addEventListener('change', this._onValueChange.bind(this));
18
+ }
19
+ render() {
20
+ const value = this.value || {};
21
+ return html `
22
+ <fieldset collapsable ?collapsed=${!this._expanded}>
23
+ <legend>
24
+ <title-with-help topic="board-modeller/effects/animation" msgid="label.animation">animation</title-with-help>
25
+ <mwc-icon
26
+ @click=${() => {
27
+ this._expanded = !this._expanded;
28
+ }}
29
+ >${this._expanded ? 'expand_less' : 'expand_more'}</mwc-icon
30
+ >
31
+ </legend>
32
+
33
+ <property-animation value-key="oncreate" .scene=${this.scene} .value=${value.oncreate || {}}>
34
+ </property-animation>
35
+ </fieldset>
36
+ `;
37
+ }
38
+ _onValueChange(e) {
39
+ var element = e.target;
40
+ var key = element.getAttribute('value-key');
41
+ if (!key) {
42
+ return;
43
+ }
44
+ this.value = {
45
+ ...this.value,
46
+ [key]: convert(element)
47
+ };
48
+ this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }));
49
+ }
50
+ };
51
+ PropertyAnimations.styles = [
52
+ PropertySharedStyle,
53
+ css `
54
+ fieldset[collapsable] legend {
55
+ box-sizing: border-box;
56
+ width: 100%;
57
+ }
58
+
59
+ fieldset[collapsable] legend mwc-icon {
60
+ float: right;
61
+ font-size: medium;
62
+ margin: 0;
63
+ cursor: pointer;
64
+ }
65
+
66
+ fieldset[collapsable][collapsed] > :not(legend) {
67
+ display: none;
68
+ }
69
+ `
70
+ ];
71
+ __decorate([
72
+ property({ type: Object })
73
+ ], PropertyAnimations.prototype, "value", void 0);
74
+ __decorate([
75
+ property({ type: Object })
76
+ ], PropertyAnimations.prototype, "scene", void 0);
77
+ __decorate([
78
+ state()
79
+ ], PropertyAnimations.prototype, "_expanded", void 0);
80
+ PropertyAnimations = __decorate([
81
+ customElement('property-animations')
82
+ ], PropertyAnimations);
83
+ //# sourceMappingURL=property-animations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"property-animations.js","sourceRoot":"","sources":["../../../../../src/modeller/property-sidebar/effects/property-animations.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,OAAO,sBAAsB,CAAA;AAC7B,OAAO,oBAAoB,CAAA;AAE3B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAI/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAG3C,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,UAAU;IAA3C;;QAyBW,cAAS,GAAY,KAAK,CAAA;IA0CrC,CAAC;IAxCC,YAAY;QACV,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,QAAQ,EAAE,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA;IAC5E,CAAC;IAED,MA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n\nimport './property-animation'\nimport '@material/mwc-icon'\n\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, state } from 'lit/decorators'\n\nimport { Properties, Scene } from '@hatiolab/things-scene'\n\nimport { PropertySharedStyle } from '../property-shared-style'\nimport { convert } from './value-converter'\n\n@customElement('property-animations')\nclass PropertyAnimations extends LitElement {\n static styles = [\n PropertySharedStyle,\n css`\n fieldset[collapsable] legend {\n box-sizing: border-box;\n width: 100%;\n }\n\n fieldset[collapsable] legend mwc-icon {\n float: right;\n font-size: medium;\n margin: 0;\n cursor: pointer;\n }\n\n fieldset[collapsable][collapsed] > :not(legend) {\n display: none;\n }\n `\n ]\n\n @property({ type: Object }) value?: Properties\n @property({ type: Object }) scene!: Scene\n\n @state() _expanded: boolean = false\n\n firstUpdated() {\n this.renderRoot.addEventListener('change', this._onValueChange.bind(this))\n }\n\n render() {\n const value = this.value || {}\n\n return html`\n <fieldset collapsable ?collapsed=${!this._expanded}>\n <legend>\n <title-with-help topic=\"board-modeller/effects/animation\" msgid=\"label.animation\">animation</title-with-help>\n <mwc-icon\n @click=${() => {\n this._expanded = !this._expanded\n }}\n >${this._expanded ? 'expand_less' : 'expand_more'}</mwc-icon\n >\n </legend>\n\n <property-animation value-key=\"oncreate\" .scene=${this.scene} .value=${value.oncreate || {}}>\n </property-animation>\n </fieldset>\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,4 @@
1
+ /**
2
+ * @license Copyright © HatioLab Inc. All rights reserved.
3
+ */
4
+ export {};
@@ -0,0 +1,123 @@
1
+ /**
2
+ * @license Copyright © HatioLab Inc. All rights reserved.
3
+ */
4
+ import { __decorate } from "tslib";
5
+ import { html, LitElement } from 'lit';
6
+ import { customElement, property } from 'lit/decorators';
7
+ import { EffectsSharedStyle } from './effects-shared-style';
8
+ import { convert } from './value-converter';
9
+ let PropertyEventHover = class PropertyEventHover extends LitElement {
10
+ firstUpdated() {
11
+ this.renderRoot.addEventListener('change', this._onValueChange.bind(this));
12
+ }
13
+ render() {
14
+ var { action, value = '', target = '', emphasize, restore } = this.value || {};
15
+ return html `
16
+ <input id="checkbox-emphasize" type="checkbox" value-key="emphasize" .checked=${emphasize} />
17
+ <label for="checkbox-emphasize" class="checkbox-label">
18
+ <i18n-msg msgid="label.emphasize">emphasize</i18n-msg>
19
+ </label>
20
+
21
+ <label> <i18n-msg msgid="label.action">action</i18n-msg> </label>
22
+ <select id="tap-select" value-key="action" .value=${action || ''}>
23
+ <option value=""></option>
24
+ <option value="popup">popup target board</option>
25
+ <option value="infoWindow">open infowindow</option>
26
+ <option value="data-toggle">toggle(true/false) target component data</option>
27
+ <option value="data-tristate">tristate(0/1/2) target component data</option>
28
+ <option value="data-set">set value to target component data</option>
29
+ <option value="value-set">set value to target component value</option>
30
+ </select>
31
+
32
+ <label> <i18n-msg msgid="label.target">target</i18n-msg> </label>
33
+
34
+ ${action == 'popup'
35
+ ? html `
36
+ <things-editor-board-selector
37
+ value-key="target"
38
+ .value=${target}
39
+ custom-editor
40
+ ></things-editor-board-selector>
41
+ `
42
+ : html `
43
+ <input
44
+ value-key="target"
45
+ .value=${target || ''}
46
+ list="target-list"
47
+ .placeholder="${this._getPlaceHoder(action)}"
48
+ />
49
+
50
+ <datalist id="target-list">
51
+ ${this._getTargetList(action).map(item => html ` <option .value=${item}></option> `)}
52
+ </datalist>
53
+ `}
54
+ ${action == 'data-set' || action == 'value-set'
55
+ ? html `
56
+ <label> <i18n-msg msgid="label.value">value</i18n-msg> </label>
57
+ <things-editor-data value-key="value" .value=${value} custom-editor fullwidth></things-editor-data>
58
+ `
59
+ : html ``}
60
+
61
+ <input id="checkbox-restore" type="checkbox" value-key="restore" .checked=${restore} />
62
+ <label for="checkbox-restore" class="checkbox-label">
63
+ <i18n-msg msgid="label.restore-on-leave">restore on leave</i18n-msg>
64
+ </label>
65
+ `;
66
+ }
67
+ _getPlaceHoder(action) {
68
+ switch (action) {
69
+ case 'popup':
70
+ case 'goto':
71
+ return 'SCENE-100';
72
+ case 'link-open':
73
+ case 'link-move':
74
+ return 'http://www.hatiolab.com/';
75
+ default:
76
+ return '';
77
+ }
78
+ }
79
+ _getTargetList(action) {
80
+ switch (action) {
81
+ case 'data-toggle':
82
+ case 'data-tristate':
83
+ case 'data-set':
84
+ case 'value-set':
85
+ let ids = (this.scene && this.scene.ids.map(i => `#${i.key}`)) || [];
86
+ ids.unshift('(self)');
87
+ return ids;
88
+ case 'infoWindow':
89
+ return ((this.scene &&
90
+ this.scene.ids
91
+ .filter(i => {
92
+ return this.scene.findById(i.key).get('type') == 'info-window';
93
+ })
94
+ .map(i => `${i.key}`)) ||
95
+ []);
96
+ default:
97
+ return [];
98
+ }
99
+ }
100
+ _onValueChange(e) {
101
+ var element = e.target;
102
+ var key = element.getAttribute('value-key');
103
+ if (!key) {
104
+ return;
105
+ }
106
+ this.value = {
107
+ ...this.value,
108
+ [key]: convert(element)
109
+ };
110
+ this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }));
111
+ }
112
+ };
113
+ PropertyEventHover.styles = [EffectsSharedStyle];
114
+ __decorate([
115
+ property({ type: Object })
116
+ ], PropertyEventHover.prototype, "value", void 0);
117
+ __decorate([
118
+ property({ type: Object })
119
+ ], PropertyEventHover.prototype, "scene", void 0);
120
+ PropertyEventHover = __decorate([
121
+ customElement('property-event-hover')
122
+ ], PropertyEventHover);
123
+ //# sourceMappingURL=property-event-hover.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"property-event-hover.js","sourceRoot":"","sources":["../../../../../src/modeller/property-sidebar/effects/property-event-hover.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AACtC,OAAO,EAAE,aAAa,E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AAa,CAAC,IAAI,WAAW,CAAC,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAA;IAClF,CAAC;CACF,CAAA;AArHQ,yBAAM,GAAG,CAAC,kBAAkB,CAAC,CAAA;AAER;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;iDAAmB;AAClB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;iDAAc;AAJrC,kBAAkB;IADvB,aAAa,CAAC,sBAAsB,CAAC;GAChC,kBAAkB,CAsHvB","sourcesContent":["/**\n * @license Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport { html, LitElement } from 'lit'\nimport { customElement, property } from 'lit/decorators'\n\nimport { Properties, Scene } from '@hatiolab/things-scene'\n\nimport { EffectsSharedStyle } from './effects-shared-style'\nimport { convert } from './value-converter'\n\n@customElement('property-event-hover')\nclass PropertyEventHover extends LitElement {\n static styles = [EffectsSharedStyle]\n\n @property({ type: Object }) value?: Properties\n @property({ type: Object }) scene?: Scene\n\n firstUpdated() {\n this.renderRoot.addEventListener('change', this._onValueChange.bind(this))\n }\n\n render() {\n var { action, value = '', target = '', emphasize, restore } = this.value || {}\n\n return html`\n <input id=\"checkbox-emphasize\" type=\"checkbox\" value-key=\"emphasize\" .checked=${emphasize} />\n <label for=\"checkbox-emphasize\" class=\"checkbox-label\">\n <i18n-msg msgid=\"label.emphasize\">emphasize</i18n-msg>\n </label>\n\n <label> <i18n-msg msgid=\"label.action\">action</i18n-msg> </label>\n <select id=\"tap-select\" value-key=\"action\" .value=${action || ''}>\n <option value=\"\"></option>\n <option value=\"popup\">popup target board</option>\n <option value=\"infoWindow\">open infowindow</option>\n <option value=\"data-toggle\">toggle(true/false) target component data</option>\n <option value=\"data-tristate\">tristate(0/1/2) target component data</option>\n <option value=\"data-set\">set value to target component data</option>\n <option value=\"value-set\">set value to target component value</option>\n </select>\n\n <label> <i18n-msg msgid=\"label.target\">target</i18n-msg> </label>\n\n ${action == 'popup'\n ? html`\n <things-editor-board-selector\n value-key=\"target\"\n .value=${target}\n custom-editor\n ></things-editor-board-selector>\n `\n : html`\n <input\n value-key=\"target\"\n .value=${target || ''}\n list=\"target-list\"\n .placeholder=\"${this._getPlaceHoder(action)}\"\n />\n\n <datalist id=\"target-list\">\n ${this._getTargetList(action).map(item => html` <option .value=${item}></option> `)}\n </datalist>\n `}\n ${action == 'data-set' || action == 'value-set'\n ? html`\n <label> <i18n-msg msgid=\"label.value\">value</i18n-msg> </label>\n <things-editor-data value-key=\"value\" .value=${value} custom-editor fullwidth></things-editor-data>\n `\n : html``}\n\n <input id=\"checkbox-restore\" type=\"checkbox\" value-key=\"restore\" .checked=${restore} />\n <label for=\"checkbox-restore\" class=\"checkbox-label\">\n <i18n-msg msgid=\"label.restore-on-leave\">restore on leave</i18n-msg>\n </label>\n `\n }\n\n _getPlaceHoder(action: string) {\n switch (action) {\n case 'popup':\n case 'goto':\n return 'SCENE-100'\n case 'link-open':\n case 'link-move':\n return 'http://www.hatiolab.com/'\n default:\n return ''\n }\n }\n\n _getTargetList(action: string) {\n switch (action) {\n case 'data-toggle':\n case 'data-tristate':\n case 'data-set':\n case 'value-set':\n let ids = (this.scene && this.scene.ids.map(i => `#${i.key}`)) || []\n ids.unshift('(self)')\n return ids\n case 'infoWindow':\n return (\n (this.scene &&\n this.scene.ids\n .filter(i => {\n return this.scene!.findById(i.key).get('type') == 'info-window'\n })\n .map(i => `${i.key}`)) ||\n []\n )\n default:\n return []\n }\n }\n\n _onValueChange(e: Event) {\n var element = e.target as HTMLElement\n var key = element.getAttribute('value-key')\n\n if (!key) {\n return\n }\n\n 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,4 @@
1
+ /**
2
+ * @license Copyright © HatioLab Inc. All rights reserved.
3
+ */
4
+ export {};
@@ -0,0 +1,119 @@
1
+ /**
2
+ * @license Copyright © HatioLab Inc. All rights reserved.
3
+ */
4
+ import { __decorate } from "tslib";
5
+ import { html, LitElement } from 'lit';
6
+ import { customElement, property } from 'lit/decorators';
7
+ import { EffectsSharedStyle } from './effects-shared-style';
8
+ import { convert } from './value-converter';
9
+ let PropertyEventTap = class PropertyEventTap extends LitElement {
10
+ firstUpdated() {
11
+ this.renderRoot.addEventListener('change', this._onValueChange.bind(this));
12
+ }
13
+ render() {
14
+ var { action, value = '', target = '', pressed } = this.value || {};
15
+ return html `
16
+ <input id="checkbox-pressed" type="checkbox" value-key="pressed" .checked=${pressed} />
17
+ <label for="checkbox-pressed" class="checkbox-label"> <i18n-msg msgid="label.pressed">pressed</i18n-msg> </label>
18
+
19
+ <label> <i18n-msg msgid="label.action">action</i18n-msg> </label>
20
+ <select id="tap-select" value-key="action" .value=${action || ''}>
21
+ <option value=""></option>
22
+ <option value="goto">go to target board</option>
23
+ <option value="link-open">open new window for target link</option>
24
+ <option value="link-move">move to target link</option>
25
+ <option value="route-page">route to page</option>
26
+ <option value="popup">popup target board</option>
27
+ <option value="modal-popup">modal popup target board</option>
28
+ <option value="close-scene">close current board</option>
29
+ <option value="infoWindow">open infowindow</option>
30
+ <option value="toggle-info-window">toggle infowindow</option>
31
+ <option value="data-toggle">toggle(true/false) target component data</option>
32
+ <option value="data-tristate">tristate(0/1/2) target component data</option>
33
+ <option value="data-set">set value to target component data</option>
34
+ <option value="value-set">set value to target component value</option>
35
+ </select>
36
+
37
+ <label> <i18n-msg msgid="label.target">target</i18n-msg> </label>
38
+
39
+ ${action == 'goto' || action == 'popup'
40
+ ? html `
41
+ <things-editor-board-selector
42
+ value-key="target"
43
+ .value=${target}
44
+ custom-editor
45
+ ></things-editor-board-selector>
46
+ `
47
+ : html `
48
+ <input value-key="target" .value=${target} list="target-list" .placeholder=${this._getPlaceHoder(action)} />
49
+
50
+ <datalist id="target-list">
51
+ ${this._getTargetList(action).map(item => html ` <option .value=${item}></option> `)}
52
+ </datalist>
53
+ `}
54
+ ${action == 'data-set' || action == 'value-set'
55
+ ? html `
56
+ <label> <i18n-msg msgid="label.value">value</i18n-msg> </label>
57
+ <things-editor-data value-key="value" .value=${value} custom-editor fullwidth></things-editor-data>
58
+ `
59
+ : html ``}
60
+ `;
61
+ }
62
+ _getPlaceHoder(action) {
63
+ switch (action) {
64
+ case 'popup':
65
+ case 'goto':
66
+ return 'SCENE-100';
67
+ case 'link-open':
68
+ case 'link-move':
69
+ return 'http://www.hatiolab.com/';
70
+ default:
71
+ return '';
72
+ }
73
+ }
74
+ _getTargetList(action) {
75
+ switch (action) {
76
+ case 'data-toggle':
77
+ case 'data-tristate':
78
+ case 'data-set':
79
+ case 'value-set':
80
+ let ids = (this.scene && this.scene.ids.map(i => `#${i.key}`)) || [];
81
+ ids.unshift('(self)');
82
+ return ids;
83
+ case 'infoWindow':
84
+ case 'toggle-info-window':
85
+ return ((this.scene &&
86
+ this.scene.ids
87
+ .filter(i => {
88
+ return this.scene.findById(i.key).get('type') == 'info-window';
89
+ })
90
+ .map(i => `${i.key}`)) ||
91
+ []);
92
+ default:
93
+ return [];
94
+ }
95
+ }
96
+ _onValueChange(e) {
97
+ var element = e.target;
98
+ var key = element.getAttribute('value-key');
99
+ if (!key) {
100
+ return;
101
+ }
102
+ this.value = {
103
+ ...this.value,
104
+ [key]: convert(element)
105
+ };
106
+ this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }));
107
+ }
108
+ };
109
+ PropertyEventTap.styles = [EffectsSharedStyle];
110
+ __decorate([
111
+ property({ type: Object })
112
+ ], PropertyEventTap.prototype, "value", void 0);
113
+ __decorate([
114
+ property({ type: Object })
115
+ ], PropertyEventTap.prototype, "scene", void 0);
116
+ PropertyEventTap = __decorate([
117
+ customElement('property-event-tap')
118
+ ], PropertyEventTap);
119
+ //# sourceMappingURL=property-event-tap.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"property-event-tap.js","sourceRoot":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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;AAjHQ,uBAAM,GAAG,CAAC,kBAAkB,CAAC,CAAA;AAER;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;+CAAmB;AAClB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;+CAAc;AAJrC,gBAAgB;IADrB,aAAa,CAAC,oBAAoB,CAAC;GAC9B,gBAAgB,CAkHrB","sourcesContent":["/**\n * @license Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport { html, LitElement } from 'lit'\nimport { customElement, property } from 'lit/decorators'\n\nimport { Properties, Scene } from '@hatiolab/things-scene'\n\nimport { EffectsSharedStyle } from './effects-shared-style'\nimport { convert } from './value-converter'\n\n@customElement('property-event-tap')\nclass PropertyEventTap extends LitElement {\n static styles = [EffectsSharedStyle]\n\n @property({ type: Object }) value?: Properties\n @property({ type: Object }) scene?: Scene\n\n firstUpdated() {\n this.renderRoot.addEventListener('change', this._onValueChange.bind(this))\n }\n\n render() {\n var { action, value = '', target = '', pressed } = this.value || {}\n\n return html`\n <input id=\"checkbox-pressed\" type=\"checkbox\" value-key=\"pressed\" .checked=${pressed} />\n <label for=\"checkbox-pressed\" class=\"checkbox-label\"> <i18n-msg msgid=\"label.pressed\">pressed</i18n-msg> </label>\n\n <label> <i18n-msg msgid=\"label.action\">action</i18n-msg> </label>\n <select id=\"tap-select\" value-key=\"action\" .value=${action || ''}>\n <option value=\"\"></option>\n <option value=\"goto\">go to target board</option>\n <option value=\"link-open\">open new window for target link</option>\n <option value=\"link-move\">move to target link</option>\n <option value=\"route-page\">route to page</option>\n <option value=\"popup\">popup target board</option>\n <option value=\"modal-popup\">modal popup target board</option>\n <option value=\"close-scene\">close current board</option>\n <option value=\"infoWindow\">open infowindow</option>\n <option value=\"toggle-info-window\">toggle infowindow</option>\n <option value=\"data-toggle\">toggle(true/false) target component data</option>\n <option value=\"data-tristate\">tristate(0/1/2) target component data</option>\n <option value=\"data-set\">set value to target component data</option>\n <option value=\"value-set\">set value to target component value</option>\n </select>\n\n <label> <i18n-msg msgid=\"label.target\">target</i18n-msg> </label>\n\n ${action == 'goto' || action == 'popup'\n ? html`\n <things-editor-board-selector\n value-key=\"target\"\n .value=${target}\n custom-editor\n ></things-editor-board-selector>\n `\n : html`\n <input value-key=\"target\" .value=${target} list=\"target-list\" .placeholder=${this._getPlaceHoder(action)} />\n\n <datalist id=\"target-list\">\n ${this._getTargetList(action).map(item => html` <option .value=${item}></option> `)}\n </datalist>\n `}\n ${action == 'data-set' || action == 'value-set'\n ? html`\n <label> <i18n-msg msgid=\"label.value\">value</i18n-msg> </label>\n <things-editor-data value-key=\"value\" .value=${value} custom-editor fullwidth></things-editor-data>\n `\n : html``}\n `\n }\n\n _getPlaceHoder(action: string) {\n switch (action) {\n case 'popup':\n case 'goto':\n return 'SCENE-100'\n case 'link-open':\n case 'link-move':\n return 'http://www.hatiolab.com/'\n default:\n return ''\n }\n }\n\n _getTargetList(action: string) {\n switch (action) {\n case 'data-toggle':\n case 'data-tristate':\n case 'data-set':\n case 'value-set':\n let ids = (this.scene && this.scene.ids.map(i => `#${i.key}`)) || []\n ids.unshift('(self)')\n return ids\n case 'infoWindow':\n case 'toggle-info-window':\n return (\n (this.scene &&\n this.scene.ids\n .filter(i => {\n return this.scene!.findById(i.key).get('type') == 'info-window'\n })\n .map(i => `${i.key}`)) ||\n []\n )\n default:\n return []\n }\n }\n\n _onValueChange(e: Event) {\n var element = e.target as HTMLElement\n var key = element.getAttribute('value-key')\n\n if (!key) {\n return\n }\n\n 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,5 @@
1
+ /**
2
+ * @license Copyright © HatioLab Inc. All rights reserved.
3
+ */
4
+ import './property-event-hover';
5
+ import './property-event-tap';
@@ -0,0 +1,59 @@
1
+ /**
2
+ * @license Copyright © HatioLab Inc. All rights reserved.
3
+ */
4
+ import { __decorate } from "tslib";
5
+ import './property-event-hover';
6
+ import './property-event-tap';
7
+ import { html, LitElement } from 'lit';
8
+ import { customElement, property } from 'lit/decorators';
9
+ import { PropertySharedStyle } from '../property-shared-style';
10
+ import { convert } from './value-converter';
11
+ let PropertyEvent = class PropertyEvent extends LitElement {
12
+ firstUpdated() {
13
+ this.renderRoot.addEventListener('change', this._onValueChange.bind(this));
14
+ }
15
+ render() {
16
+ const value = this.value || {};
17
+ return html `
18
+ <fieldset>
19
+ <legend>
20
+ <title-with-help msgid="label.hover-event" topic="board-modeller/effects/hover-event"></title-with-help>
21
+ </legend>
22
+
23
+ <property-event-hover value-key="hover" .scene=${this.scene} .value=${value.hover || {}}>
24
+ </property-event-hover>
25
+ </fieldset>
26
+
27
+ <fieldset>
28
+ <legend>
29
+ <title-with-help msgid="label.tap-event" topic="board-modeller/effects/tap-event"></title-with-help>
30
+ </legend>
31
+
32
+ <property-event-tap value-key="tap" .scene=${this.scene} .value=${value.tap || {}}> </property-event-tap>
33
+ </fieldset>
34
+ `;
35
+ }
36
+ _onValueChange(e) {
37
+ var element = e.target;
38
+ var key = element.getAttribute('value-key');
39
+ if (!key) {
40
+ return;
41
+ }
42
+ this.value = {
43
+ ...this.value,
44
+ [key]: convert(element)
45
+ };
46
+ this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }));
47
+ }
48
+ };
49
+ PropertyEvent.styles = [PropertySharedStyle];
50
+ __decorate([
51
+ property({ type: Object })
52
+ ], PropertyEvent.prototype, "value", void 0);
53
+ __decorate([
54
+ property({ type: Object })
55
+ ], PropertyEvent.prototype, "scene", void 0);
56
+ PropertyEvent = __decorate([
57
+ customElement('property-event')
58
+ ], PropertyEvent);
59
+ //# sourceMappingURL=property-event.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"property-event.js","sourceRoot":"","sources":["../../../../../src/modeller/property-sidebar/effects/property-event.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,OAAO,wBAAwB,CAAA;AAC/B,OAAO,sBAAsB,CAAA;AAE7B,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AACtC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAIxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAG3C,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,UAAU;IAMpC,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,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,IAAI,EAAE,CAAA;QAE9B,OAAO,IAAI,CAAA;;;;;;yDAM0C,IAAI,CAAC,KAAK,WAAW,KAAK,CAAC,KAAK,IAAI,EAAE;;;;;;;;;qDAS1C,IAAI,CAAC,KAAK,WAAW,KAAK,CAAC,GAAG,IAAI,EAAE;;KAEpF,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;AA/CQ,oBAAM,GAAG,CAAC,mBAAmB,CAAC,CAAA;AAET;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4CAAmB;AAClB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4CAAc;AAJrC,aAAa;IADlB,aAAa,CAAC,gBAAgB,CAAC;GAC1B,aAAa,CAgDlB","sourcesContent":["/**\n * @license Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport './property-event-hover'\nimport './property-event-tap'\n\nimport { html, LitElement } from 'lit'\nimport { customElement, property } from 'lit/decorators'\n\nimport { Properties, Scene } from '@hatiolab/things-scene'\n\nimport { PropertySharedStyle } from '../property-shared-style'\nimport { convert } from './value-converter'\n\n@customElement('property-event')\nclass PropertyEvent extends LitElement {\n static styles = [PropertySharedStyle]\n\n @property({ type: Object }) value?: Properties\n @property({ type: Object }) scene?: Scene\n\n firstUpdated() {\n this.renderRoot.addEventListener('change', this._onValueChange.bind(this))\n }\n\n render() {\n const value = this.value || {}\n\n return html`\n <fieldset>\n <legend>\n <title-with-help msgid=\"label.hover-event\" topic=\"board-modeller/effects/hover-event\"></title-with-help>\n </legend>\n\n <property-event-hover value-key=\"hover\" .scene=${this.scene} .value=${value.hover || {}}>\n </property-event-hover>\n </fieldset>\n\n <fieldset>\n <legend>\n <title-with-help msgid=\"label.tap-event\" topic=\"board-modeller/effects/tap-event\"></title-with-help>\n </legend>\n\n <property-event-tap value-key=\"tap\" .scene=${this.scene} .value=${value.tap || {}}> </property-event-tap>\n </fieldset>\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,22 @@
1
+ /**
2
+ * @license Copyright © HatioLab Inc. All rights reserved.
3
+ */
4
+ import '@things-factory/modeller-ui/client/editors/things-editor-color';
5
+ import { LitElement } from 'lit';
6
+ import { Properties } from '@hatiolab/things-scene';
7
+ /**
8
+ * 컴포넌트의 그림자 속성을 편집하는 element
9
+ *
10
+ * Example:
11
+ * <property-shadow
12
+ * @change="${e => { this.shadow = e.target.value }}"
13
+ * value="${this.shadow}"
14
+ * ></property-shadow>
15
+ */
16
+ export default class PropertyShadow extends LitElement {
17
+ static styles: import("lit").CSSResult[];
18
+ value?: Properties;
19
+ firstUpdated(): void;
20
+ render(): import("lit-html").TemplateResult<1>;
21
+ _onValueChange(e: Event): void;
22
+ }