@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.
Files changed (138) hide show
  1. package/@types/global/index.d.ts +1 -0
  2. package/CHANGELOG.md +51 -0
  3. package/assets/images/components/no-image.png +0 -0
  4. package/custom-elements.json +4720 -382
  5. package/dist/src/index.d.ts +1 -0
  6. package/dist/src/index.js +1 -0
  7. package/dist/src/index.js.map +1 -1
  8. package/dist/src/modeller/component-toolbar/component-menu.d.ts +4 -0
  9. package/dist/src/modeller/component-toolbar/component-menu.js +148 -0
  10. package/dist/src/modeller/component-toolbar/component-menu.js.map +1 -0
  11. package/dist/src/modeller/component-toolbar/component-toolbar.d.ts +4 -0
  12. package/dist/src/modeller/component-toolbar/component-toolbar.js +176 -0
  13. package/dist/src/modeller/component-toolbar/component-toolbar.js.map +1 -0
  14. package/dist/src/modeller/edit-toolbar-style.d.ts +4 -0
  15. package/dist/src/modeller/edit-toolbar-style.js +227 -0
  16. package/dist/src/modeller/edit-toolbar-style.js.map +1 -0
  17. package/dist/src/modeller/edit-toolbar.d.ts +61 -0
  18. package/dist/src/modeller/edit-toolbar.js +644 -0
  19. package/dist/src/modeller/edit-toolbar.js.map +1 -0
  20. package/dist/src/modeller/property-sidebar/abstract-property.d.ts +10 -0
  21. package/dist/src/modeller/property-sidebar/abstract-property.js +58 -0
  22. package/dist/src/modeller/property-sidebar/abstract-property.js.map +1 -0
  23. package/dist/src/modeller/property-sidebar/data-binding/data-binding-mapper.d.ts +49 -0
  24. package/dist/src/modeller/property-sidebar/data-binding/data-binding-mapper.js +348 -0
  25. package/dist/src/modeller/property-sidebar/data-binding/data-binding-mapper.js.map +1 -0
  26. package/dist/src/modeller/property-sidebar/data-binding/data-binding.d.ts +8 -0
  27. package/dist/src/modeller/property-sidebar/data-binding/data-binding.js +428 -0
  28. package/dist/src/modeller/property-sidebar/data-binding/data-binding.js.map +1 -0
  29. package/dist/src/modeller/property-sidebar/effects/effects-shared-style.d.ts +4 -0
  30. package/dist/src/modeller/property-sidebar/effects/effects-shared-style.js +57 -0
  31. package/dist/src/modeller/property-sidebar/effects/effects-shared-style.js.map +1 -0
  32. package/dist/src/modeller/property-sidebar/effects/effects.d.ts +7 -0
  33. package/dist/src/modeller/property-sidebar/effects/effects.js +59 -0
  34. package/dist/src/modeller/property-sidebar/effects/effects.js.map +1 -0
  35. package/dist/src/modeller/property-sidebar/effects/property-animation.d.ts +23 -0
  36. package/dist/src/modeller/property-sidebar/effects/property-animation.js +131 -0
  37. package/dist/src/modeller/property-sidebar/effects/property-animation.js.map +1 -0
  38. package/dist/src/modeller/property-sidebar/effects/property-animations.d.ts +6 -0
  39. package/dist/src/modeller/property-sidebar/effects/property-animations.js +84 -0
  40. package/dist/src/modeller/property-sidebar/effects/property-animations.js.map +1 -0
  41. package/dist/src/modeller/property-sidebar/effects/property-event-hover.d.ts +4 -0
  42. package/dist/src/modeller/property-sidebar/effects/property-event-hover.js +128 -0
  43. package/dist/src/modeller/property-sidebar/effects/property-event-hover.js.map +1 -0
  44. package/dist/src/modeller/property-sidebar/effects/property-event-tap.d.ts +4 -0
  45. package/dist/src/modeller/property-sidebar/effects/property-event-tap.js +124 -0
  46. package/dist/src/modeller/property-sidebar/effects/property-event-tap.js.map +1 -0
  47. package/dist/src/modeller/property-sidebar/effects/property-event.d.ts +6 -0
  48. package/dist/src/modeller/property-sidebar/effects/property-event.js +63 -0
  49. package/dist/src/modeller/property-sidebar/effects/property-event.js.map +1 -0
  50. package/dist/src/modeller/property-sidebar/effects/property-shadow.d.ts +23 -0
  51. package/dist/src/modeller/property-sidebar/effects/property-shadow.js +110 -0
  52. package/dist/src/modeller/property-sidebar/effects/property-shadow.js.map +1 -0
  53. package/dist/src/modeller/property-sidebar/effects/value-converter.d.ts +1 -0
  54. package/dist/src/modeller/property-sidebar/effects/value-converter.js +23 -0
  55. package/dist/src/modeller/property-sidebar/effects/value-converter.js.map +1 -0
  56. package/dist/src/modeller/property-sidebar/inspector/inspector.d.ts +24 -0
  57. package/dist/src/modeller/property-sidebar/inspector/inspector.js +290 -0
  58. package/dist/src/modeller/property-sidebar/inspector/inspector.js.map +1 -0
  59. package/dist/src/modeller/property-sidebar/property-shared-style.d.ts +4 -0
  60. package/dist/src/modeller/property-sidebar/property-shared-style.js +131 -0
  61. package/dist/src/modeller/property-sidebar/property-shared-style.js.map +1 -0
  62. package/dist/src/modeller/property-sidebar/property-sidebar.d.ts +10 -0
  63. package/dist/src/modeller/property-sidebar/property-sidebar.js +313 -0
  64. package/dist/src/modeller/property-sidebar/property-sidebar.js.map +1 -0
  65. package/dist/src/modeller/property-sidebar/shapes/box-padding-editor-styles.d.ts +1 -0
  66. package/dist/src/modeller/property-sidebar/shapes/box-padding-editor-styles.js +94 -0
  67. package/dist/src/modeller/property-sidebar/shapes/box-padding-editor-styles.js.map +1 -0
  68. package/dist/src/modeller/property-sidebar/shapes/shapes.d.ts +7 -0
  69. package/dist/src/modeller/property-sidebar/shapes/shapes.js +409 -0
  70. package/dist/src/modeller/property-sidebar/shapes/shapes.js.map +1 -0
  71. package/dist/src/modeller/property-sidebar/specifics/specific-properties-builder.d.ts +4 -0
  72. package/dist/src/modeller/property-sidebar/specifics/specific-properties-builder.js +127 -0
  73. package/dist/src/modeller/property-sidebar/specifics/specific-properties-builder.js.map +1 -0
  74. package/dist/src/modeller/property-sidebar/specifics/specifics.d.ts +5 -0
  75. package/dist/src/modeller/property-sidebar/specifics/specifics.js +78 -0
  76. package/dist/src/modeller/property-sidebar/specifics/specifics.js.map +1 -0
  77. package/dist/src/modeller/property-sidebar/styles/styles.d.ts +9 -0
  78. package/dist/src/modeller/property-sidebar/styles/styles.js +563 -0
  79. package/dist/src/modeller/property-sidebar/styles/styles.js.map +1 -0
  80. package/dist/src/modeller/scene-viewer/confidential-overlay.d.ts +4 -0
  81. package/dist/src/modeller/scene-viewer/confidential-overlay.js +14 -0
  82. package/dist/src/modeller/scene-viewer/confidential-overlay.js.map +1 -0
  83. package/dist/src/modeller/scene-viewer/ox-scene-handler.d.ts +11 -0
  84. package/dist/src/modeller/scene-viewer/ox-scene-handler.js +36 -0
  85. package/dist/src/modeller/scene-viewer/ox-scene-handler.js.map +1 -0
  86. package/dist/src/modeller/scene-viewer/ox-scene-layer.d.ts +10 -0
  87. package/dist/src/modeller/scene-viewer/ox-scene-layer.js +42 -0
  88. package/dist/src/modeller/scene-viewer/ox-scene-layer.js.map +1 -0
  89. package/dist/src/modeller/scene-viewer/ox-scene-player.d.ts +1 -0
  90. package/dist/src/modeller/scene-viewer/ox-scene-player.js +99 -0
  91. package/dist/src/modeller/scene-viewer/ox-scene-player.js.map +1 -0
  92. package/dist/src/modeller/scene-viewer/ox-scene-property.d.ts +6 -0
  93. package/dist/src/modeller/scene-viewer/ox-scene-property.js +19 -0
  94. package/dist/src/modeller/scene-viewer/ox-scene-property.js.map +1 -0
  95. package/dist/src/modeller/scene-viewer/ox-scene-viewer.d.ts +39 -0
  96. package/dist/src/modeller/scene-viewer/ox-scene-viewer.js +245 -0
  97. package/dist/src/modeller/scene-viewer/ox-scene-viewer.js.map +1 -0
  98. package/dist/src/ox-board-modeller.d.ts +40 -0
  99. package/dist/src/ox-board-modeller.js +318 -0
  100. package/dist/src/ox-board-modeller.js.map +1 -0
  101. package/dist/src/types.d.ts +12 -0
  102. package/dist/src/types.js +2 -0
  103. package/dist/src/types.js.map +1 -0
  104. package/dist/tsconfig.tsbuildinfo +1 -1
  105. package/package.json +26 -5
  106. package/src/index.ts +1 -0
  107. package/src/modeller/component-toolbar/component-menu.ts +142 -0
  108. package/src/modeller/component-toolbar/component-toolbar.ts +169 -0
  109. package/src/modeller/edit-toolbar-style.ts +228 -0
  110. package/src/modeller/edit-toolbar.ts +640 -0
  111. package/src/modeller/property-sidebar/abstract-property.ts +73 -0
  112. package/src/modeller/property-sidebar/data-binding/data-binding-mapper.ts +368 -0
  113. package/src/modeller/property-sidebar/data-binding/data-binding.ts +447 -0
  114. package/src/modeller/property-sidebar/effects/effects-shared-style.ts +58 -0
  115. package/src/modeller/property-sidebar/effects/effects.ts +55 -0
  116. package/src/modeller/property-sidebar/effects/property-animation.ts +131 -0
  117. package/src/modeller/property-sidebar/effects/property-animations.ts +82 -0
  118. package/src/modeller/property-sidebar/effects/property-event-hover.ts +133 -0
  119. package/src/modeller/property-sidebar/effects/property-event-tap.ts +129 -0
  120. package/src/modeller/property-sidebar/effects/property-event.ts +63 -0
  121. package/src/modeller/property-sidebar/effects/property-shadow.ts +112 -0
  122. package/src/modeller/property-sidebar/effects/value-converter.ts +26 -0
  123. package/src/modeller/property-sidebar/inspector/inspector.ts +327 -0
  124. package/src/modeller/property-sidebar/property-shared-style.ts +132 -0
  125. package/src/modeller/property-sidebar/property-sidebar.ts +308 -0
  126. package/src/modeller/property-sidebar/shapes/box-padding-editor-styles.ts +94 -0
  127. package/src/modeller/property-sidebar/shapes/shapes.ts +411 -0
  128. package/src/modeller/property-sidebar/specifics/specific-properties-builder.ts +135 -0
  129. package/src/modeller/property-sidebar/specifics/specifics.ts +72 -0
  130. package/src/modeller/property-sidebar/styles/styles.ts +578 -0
  131. package/src/modeller/scene-viewer/confidential-overlay.ts +18 -0
  132. package/src/modeller/scene-viewer/ox-scene-handler.ts +40 -0
  133. package/src/modeller/scene-viewer/ox-scene-layer.ts +42 -0
  134. package/src/modeller/scene-viewer/ox-scene-player.ts +104 -0
  135. package/src/modeller/scene-viewer/ox-scene-property.ts +10 -0
  136. package/src/modeller/scene-viewer/ox-scene-viewer.ts +248 -0
  137. package/src/ox-board-modeller.ts +302 -0
  138. package/src/types.ts +26 -0
@@ -0,0 +1,131 @@
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-angle-input';
7
+ import { LitElement, html } from 'lit';
8
+ import { customElement, property } from 'lit/decorators';
9
+ import { EffectsSharedStyle } from './effects-shared-style';
10
+ import { convert } from './value-converter';
11
+ /**
12
+ * 컴포넌트의 animation 속성을 편집하는 element
13
+
14
+ Example:
15
+
16
+ <property-animation .value=${animation}>
17
+ </property-animation>
18
+ */
19
+ let PropertyAnimation = class PropertyAnimation 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>Animation Type</label>
30
+ <select value-key="type" .value=${this.value && this.value.type}>
31
+ <option value="">None</option>
32
+ <option value="rotation">Rotation</option>
33
+ <option value="vibration">Vibration</option>
34
+ <option value="heartbeat">Heartbeat</option>
35
+ <option value="moving">Moving</option>
36
+ <option value="fade">Fade</option>
37
+ <option value="outline">Outline</option>
38
+ </select>
39
+
40
+ <label> <i18n-msg msgid="label.waiting-time">waiting time</i18n-msg> </label>
41
+ <input type="number" value-key="delay" .value=${this.value.delay} placeholder="ms" />
42
+
43
+ <label> <i18n-msg msgid="label.duration">duration</i18n-msg> </label>
44
+ <input type="number" value-key="duration" .value=${this.value.duration} placeholder="ms" />
45
+
46
+ ${this.value.type == 'rotation' || this.value.type == 'vibration'
47
+ ? html `
48
+ <label> <i18n-msg msgid="label.theta">theta</i18n-msg> </label>
49
+ <things-editor-angle-input value-key="theta" .radian=${this.value.theta}> </things-editor-angle-input>
50
+ `
51
+ : html ``}
52
+ ${this.value.type == 'heartbeat'
53
+ ? html `
54
+ <label> <i18n-msg msgid="label.scale">scale</i18n-msg> </label>
55
+ <input type="number" value-key="scale" .value=${this.value.scale} />
56
+ `
57
+ : html ``}
58
+ ${this.value.type == 'moving'
59
+ ? html `
60
+ <label> <i18n-msg msgid="label.x-axes">X-axes</i18n-msg> </label>
61
+ <input type="number" value-key="x" .value=${this.value.x} />
62
+
63
+ <label> <i18n-msg msgid="label.y-axes">Y-axes</i18n-msg> </label>
64
+ <input type="number" value-key="y" .value=${this.value.y} />
65
+ `
66
+ : html ``}
67
+ ${this.value.type == 'fade'
68
+ ? html `
69
+ <label> <i18n-msg msgid="label.start-alpha">start alpha</i18n-msg> </label>
70
+ <input type="number" value-key="startAlpha" .value=${this.value.startAlpha} />
71
+
72
+ <label> <i18n-msg msgid="label.end-alpha">end alpha</i18n-msg> </label>
73
+ <input type="number" value-key="endAlpha" .value=${this.value.endAlpha} />
74
+ `
75
+ : html ``}
76
+ ${this.value.type == 'outline'
77
+ ? html `
78
+ <label> <i18n-msg msgid="label.target">target</i18n-msg> </label>
79
+ <input value-key="rideOn" .value=${this.value.rideOn || ''} list="target-list" />
80
+ <datalist id="target-list">
81
+ ${this.scene.ids.map(info => info.key).map(id => html ` <option value=${id}></option> `)}
82
+ </datalist>
83
+ `
84
+ : html ``}
85
+
86
+ <input id="checkbox-repeat" value-key="repeat" type="checkbox" .checked=${this.value.repeat} />
87
+ <label for="checkbox-repeat" class="checkbox-label"> <i18n-msg msgid="label.repeat">repeat</i18n-msg> </label>
88
+
89
+ <label>delta</label>
90
+ <select value-key="delta" .value=${this.value.delta}>
91
+ <option value="linear">linear</option>
92
+ <option value="quad">quad</option>
93
+ <option value="circ">circ</option>
94
+ <option value="back">back</option>
95
+ <option value="bounce">bounce</option>
96
+ <option value="elastic">elastic</option>
97
+ </select>
98
+
99
+ <label>ease</label>
100
+ <select value-key="ease" .value=${this.value.ease}>
101
+ <option value="in">in</option>
102
+ <option value="out">out</option>
103
+ <option value="inout">inout</option>
104
+ </select>
105
+ `;
106
+ }
107
+ _onValueChange(e) {
108
+ var element = e.target;
109
+ var key = element.getAttribute('value-key');
110
+ if (!key) {
111
+ return;
112
+ }
113
+ this.value = {
114
+ ...this.value,
115
+ [key]: convert(element)
116
+ };
117
+ this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }));
118
+ }
119
+ };
120
+ PropertyAnimation.styles = [EffectsSharedStyle];
121
+ __decorate([
122
+ property({ type: Object })
123
+ ], PropertyAnimation.prototype, "value", void 0);
124
+ __decorate([
125
+ property({ type: Object })
126
+ ], PropertyAnimation.prototype, "scene", void 0);
127
+ PropertyAnimation = __decorate([
128
+ customElement('property-animation')
129
+ ], PropertyAnimation);
130
+ export default PropertyAnimation;
131
+ //# 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,2BAA2B,CAAA;AAClC,OAAO,sEAAsE,CAAA;AAE7E,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAEtC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAExD,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;IAAzD;;QAG8B,UAAK,GAAe,EAAE,CAAA;IAuGpD,CAAC;IApGC,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;;wCAEyB,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI;;;;;;;;;;;sDAWf,IAAI,CAAC,KAAK,CAAC,KAAK;;;yDAGb,IAAI,CAAC,KAAK,CAAC,QAAQ;;QAEpE,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,UAAU,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,WAAW;YAC/D,CAAC,CAAC,IAAI,CAAA;;mEAEqD,IAAI,CAAC,KAAK,CAAC,KAAK;WACxE;YACH,CAAC,CAAC,IA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A;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;AAzGQ,wBAAM,GAAG,CAAC,kBAAkB,CAAC,CAAA;AAER;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;gDAAuB;AACtB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;gDAAc;AAJtB,iBAAiB;IADrC,aAAa,CAAC,oBAAoB,CAAC;GACf,iBAAiB,CA0GrC;eA1GoB,iBAAiB","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-angle-input'\n\nimport { LitElement, html } from 'lit'\nimport { Properties, Scene } from '@hatiolab/things-scene'\nimport { customElement, property } from 'lit/decorators'\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 return html`\n <label>Animation Type</label>\n <select value-key=\"type\" .value=${this.value && this.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=${this.value.delay} placeholder=\"ms\" />\n\n <label> <i18n-msg msgid=\"label.duration\">duration</i18n-msg> </label>\n <input type=\"number\" value-key=\"duration\" .value=${this.value.duration} placeholder=\"ms\" />\n\n ${this.value.type == 'rotation' || this.value.type == 'vibration'\n ? html`\n <label> <i18n-msg msgid=\"label.theta\">theta</i18n-msg> </label>\n <things-editor-angle-input value-key=\"theta\" .radian=${this.value.theta}> </things-editor-angle-input>\n `\n : html``}\n ${this.value.type == 'heartbeat'\n ? html`\n <label> <i18n-msg msgid=\"label.scale\">scale</i18n-msg> </label>\n <input type=\"number\" value-key=\"scale\" .value=${this.value.scale} />\n `\n : html``}\n ${this.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=${this.value.x} />\n\n <label> <i18n-msg msgid=\"label.y-axes\">Y-axes</i18n-msg> </label>\n <input type=\"number\" value-key=\"y\" .value=${this.value.y} />\n `\n : html``}\n ${this.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=${this.value.startAlpha} />\n\n <label> <i18n-msg msgid=\"label.end-alpha\">end alpha</i18n-msg> </label>\n <input type=\"number\" value-key=\"endAlpha\" .value=${this.value.endAlpha} />\n `\n : html``}\n ${this.value.type == 'outline'\n ? html`\n <label> <i18n-msg msgid=\"label.target\">target</i18n-msg> </label>\n <input value-key=\"rideOn\" .value=${this.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=${this.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=${this.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=${this.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,6 @@
1
+ /**
2
+ * @license Copyright © HatioLab Inc. All rights reserved.
3
+ */
4
+ import '@things-factory/i18n-base';
5
+ import './property-animation';
6
+ import '@material/mwc-icon';
@@ -0,0 +1,84 @@
1
+ /**
2
+ * @license Copyright © HatioLab Inc. All rights reserved.
3
+ */
4
+ import { __decorate } from "tslib";
5
+ import '@things-factory/i18n-base';
6
+ import './property-animation';
7
+ import '@material/mwc-icon';
8
+ import { LitElement, css, html } from 'lit';
9
+ import { customElement, property, state } from 'lit/decorators';
10
+ import { PropertySharedStyle } from '../property-shared-style';
11
+ import { convert } from './value-converter';
12
+ let PropertyAnimations = class PropertyAnimations extends LitElement {
13
+ constructor() {
14
+ super(...arguments);
15
+ this.value = {};
16
+ this._expanded = false;
17
+ }
18
+ firstUpdated() {
19
+ this.renderRoot.addEventListener('change', this._onValueChange.bind(this));
20
+ }
21
+ render() {
22
+ return html `
23
+ <fieldset collapsable ?collapsed=${!this._expanded}>
24
+ <legend>
25
+ <title-with-help topic="board-modeller/effects/animation" msgid="label.animation">animation</title-with-help>
26
+ <mwc-icon
27
+ @click=${() => {
28
+ this._expanded = !this._expanded;
29
+ }}
30
+ >${this._expanded ? 'expand_less' : 'expand_more'}</mwc-icon
31
+ >
32
+ </legend>
33
+
34
+ <property-animation value-key="oncreate" .scene=${this.scene} .value=${this.value.oncreate || {}}>
35
+ </property-animation>
36
+ </fieldset>
37
+ `;
38
+ }
39
+ _onValueChange(e) {
40
+ var element = e.target;
41
+ var key = element.getAttribute('value-key');
42
+ if (!key) {
43
+ return;
44
+ }
45
+ this.value = {
46
+ ...this.value,
47
+ [key]: convert(element)
48
+ };
49
+ this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }));
50
+ }
51
+ };
52
+ PropertyAnimations.styles = [
53
+ PropertySharedStyle,
54
+ css `
55
+ fieldset[collapsable] legend {
56
+ box-sizing: border-box;
57
+ width: 100%;
58
+ }
59
+
60
+ fieldset[collapsable] legend mwc-icon {
61
+ float: right;
62
+ font-size: medium;
63
+ margin: 0;
64
+ cursor: pointer;
65
+ }
66
+
67
+ fieldset[collapsable][collapsed] > :not(legend) {
68
+ display: none;
69
+ }
70
+ `
71
+ ];
72
+ __decorate([
73
+ property({ type: Object })
74
+ ], PropertyAnimations.prototype, "value", void 0);
75
+ __decorate([
76
+ property({ type: Object })
77
+ ], PropertyAnimations.prototype, "scene", void 0);
78
+ __decorate([
79
+ state()
80
+ ], PropertyAnimations.prototype, "_expanded", void 0);
81
+ PropertyAnimations = __decorate([
82
+ customElement('property-animations')
83
+ ], PropertyAnimations);
84
+ //# 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,2BAA2B,CAAA;AAClC,OAAO,sBAAsB,CAAA;AAC7B,OAAO,oBAAoB,CAAA;AAE3B,OAAO,EAAE,UAAU,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AAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAA;IAClF,CAAC;CACF,CAAA;AAhEQ,yBAAM,GAAG;IACd,mBAAmB;IACnB,GAAG,CAAA;;;;;;;;;;;;;;;;KAgBF;CACF,CAAA;AAE2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;iDAAuB;AACtB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;iDAAc;AAEhC;IAAR,KAAK,EAAE;qDAA2B;AAzB/B,kBAAkB;IADvB,aAAa,CAAC,qBAAqB,CAAC;GAC/B,kBAAkB,CAiEvB","sourcesContent":["/**\n * @license Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport '@things-factory/i18n-base'\nimport './property-animation'\nimport '@material/mwc-icon'\n\nimport { LitElement, css, html } from 'lit'\nimport { Properties, Scene } from '@hatiolab/things-scene'\nimport { customElement, property, state } from 'lit/decorators'\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 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=${this.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
+ import '@things-factory/i18n-base';
@@ -0,0 +1,128 @@
1
+ /**
2
+ * @license Copyright © HatioLab Inc. All rights reserved.
3
+ */
4
+ import { __decorate } from "tslib";
5
+ import '@things-factory/i18n-base';
6
+ import { LitElement, html } from 'lit';
7
+ import { customElement, property } from 'lit/decorators';
8
+ import { EffectsSharedStyle } from './effects-shared-style';
9
+ import { convert } from './value-converter';
10
+ let PropertyEventHover = class PropertyEventHover extends LitElement {
11
+ constructor() {
12
+ super(...arguments);
13
+ this.value = {};
14
+ }
15
+ firstUpdated() {
16
+ this.renderRoot.addEventListener('change', this._onValueChange.bind(this));
17
+ }
18
+ render() {
19
+ var { action, value = '', target = '', emphasize, restore } = this.value;
20
+ return html `
21
+ <input id="checkbox-emphasize" type="checkbox" value-key="emphasize" .checked=${emphasize} />
22
+ <label for="checkbox-emphasize" class="checkbox-label">
23
+ <i18n-msg msgid="label.emphasize">emphasize</i18n-msg>
24
+ </label>
25
+
26
+ <label> <i18n-msg msgid="label.action">action</i18n-msg> </label>
27
+ <select id="tap-select" value-key="action" .value=${action || ''}>
28
+ <option value=""></option>
29
+ <option value="popup">popup target board</option>
30
+ <option value="infoWindow">open 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 == '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
49
+ value-key="target"
50
+ .value=${target || ''}
51
+ list="target-list"
52
+ .placeholder="${this._getPlaceHoder(action)}"
53
+ />
54
+
55
+ <datalist id="target-list">
56
+ ${this._getTargetList(action).map(item => html ` <option .value=${item}></option> `)}
57
+ </datalist>
58
+ `}
59
+ ${action == 'data-set' || action == 'value-set'
60
+ ? html `
61
+ <label> <i18n-msg msgid="label.value">value</i18n-msg> </label>
62
+ <things-editor-data value-key="value" .value=${value} custom-editor fullwidth></things-editor-data>
63
+ `
64
+ : html ``}
65
+
66
+ <input id="checkbox-restore" type="checkbox" value-key="restore" .checked=${restore} />
67
+ <label for="checkbox-restore" class="checkbox-label">
68
+ <i18n-msg msgid="label.restore-on-leave">restore on leave</i18n-msg>
69
+ </label>
70
+ `;
71
+ }
72
+ _getPlaceHoder(action) {
73
+ switch (action) {
74
+ case 'popup':
75
+ case 'goto':
76
+ return 'SCENE-100';
77
+ case 'link-open':
78
+ case 'link-move':
79
+ return 'http://www.hatiolab.com/';
80
+ default:
81
+ return '';
82
+ }
83
+ }
84
+ _getTargetList(action) {
85
+ switch (action) {
86
+ case 'data-toggle':
87
+ case 'data-tristate':
88
+ case 'data-set':
89
+ case 'value-set':
90
+ let ids = (this.scene && this.scene.ids.map(i => `#${i.key}`)) || [];
91
+ ids.unshift('(self)');
92
+ return ids;
93
+ case 'infoWindow':
94
+ return ((this.scene &&
95
+ this.scene.ids
96
+ .filter(i => {
97
+ return this.scene.findById(i.key).get('type') == 'info-window';
98
+ })
99
+ .map(i => `${i.key}`)) ||
100
+ []);
101
+ default:
102
+ return [];
103
+ }
104
+ }
105
+ _onValueChange(e) {
106
+ var element = e.target;
107
+ var key = element.getAttribute('value-key');
108
+ if (!key) {
109
+ return;
110
+ }
111
+ this.value = {
112
+ ...this.value,
113
+ [key]: convert(element)
114
+ };
115
+ this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }));
116
+ }
117
+ };
118
+ PropertyEventHover.styles = [EffectsSharedStyle];
119
+ __decorate([
120
+ property({ type: Object })
121
+ ], PropertyEventHover.prototype, "value", void 0);
122
+ __decorate([
123
+ property({ type: Object })
124
+ ], PropertyEventHover.prototype, "scene", void 0);
125
+ PropertyEventHover = __decorate([
126
+ customElement('property-event-hover')
127
+ ], PropertyEventHover);
128
+ //# 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,2BAA2B,CAAA;AAElC,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAEtC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAExD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAG3C,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,UAAU;IAA3C;;QAG8B,UAAK,GAAe,EAAE,CAAA;IAmHpD,CAAC;IAhHC,YAAY;QACV,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,QAAQ,EAAE,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA;IAC5E,CAAC;IAED,MAAM;QACJ,IAAI,EAAE,MAAM,EAAE,KAAK,GAAG,EAAE,EAAE,MAAM,GAAG,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,KAAK,CAAA;QAExE,OAAO,IAAI,CAAA;sFACuE,SAAS;;;;;;0DAMrC,MAAM,IAAI,EAAE;;;;;;;;;;;;QAY9D,MAAM,IAAI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,EAAE;wBACV,OAAO,IAAI,CAAC,KAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,aAAa,CAAA;oBACjE,CAAC,CAAC;yBACD,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;oBAC1B,EAAE,CACH,CAAA;YACH;gBACE,OAAO,EAAE,CAAA;SACZ;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;AArHQ,yBAAM,GAAG,CAAC,kBAAkB,CAAC,CAAA;AAER;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;iDAAuB;AACtB;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 '@things-factory/i18n-base'\n\nimport { LitElement, html } from 'lit'\nimport { Properties, Scene } from '@hatiolab/things-scene'\nimport { customElement, property } from 'lit/decorators'\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
+ import '@things-factory/i18n-base';
@@ -0,0 +1,124 @@
1
+ /**
2
+ * @license Copyright © HatioLab Inc. All rights reserved.
3
+ */
4
+ import { __decorate } from "tslib";
5
+ import '@things-factory/i18n-base';
6
+ import { LitElement, html } from 'lit';
7
+ import { customElement, property } from 'lit/decorators';
8
+ import { EffectsSharedStyle } from './effects-shared-style';
9
+ import { convert } from './value-converter';
10
+ let PropertyEventTap = class PropertyEventTap extends LitElement {
11
+ constructor() {
12
+ super(...arguments);
13
+ this.value = {};
14
+ }
15
+ firstUpdated() {
16
+ this.renderRoot.addEventListener('change', this._onValueChange.bind(this));
17
+ }
18
+ render() {
19
+ var { action, value = '', target = '', pressed } = this.value;
20
+ return html `
21
+ <input id="checkbox-pressed" type="checkbox" value-key="pressed" .checked=${pressed} />
22
+ <label for="checkbox-pressed" class="checkbox-label"> <i18n-msg msgid="label.pressed">pressed</i18n-msg> </label>
23
+
24
+ <label> <i18n-msg msgid="label.action">action</i18n-msg> </label>
25
+ <select id="tap-select" value-key="action" .value=${action || ''}>
26
+ <option value=""></option>
27
+ <option value="goto">go to target board</option>
28
+ <option value="link-open">open new window for target link</option>
29
+ <option value="link-move">move to target link</option>
30
+ <option value="route-page">route to page</option>
31
+ <option value="popup">popup target board</option>
32
+ <option value="modal-popup">modal popup target board</option>
33
+ <option value="close-scene">close current board</option>
34
+ <option value="infoWindow">open infowindow</option>
35
+ <option value="toggle-info-window">toggle infowindow</option>
36
+ <option value="data-toggle">toggle(true/false) target component data</option>
37
+ <option value="data-tristate">tristate(0/1/2) target component data</option>
38
+ <option value="data-set">set value to target component data</option>
39
+ <option value="value-set">set value to target component value</option>
40
+ </select>
41
+
42
+ <label> <i18n-msg msgid="label.target">target</i18n-msg> </label>
43
+
44
+ ${action == 'goto' || action == 'popup'
45
+ ? html `
46
+ <things-editor-board-selector
47
+ value-key="target"
48
+ .value=${target}
49
+ custom-editor
50
+ ></things-editor-board-selector>
51
+ `
52
+ : html `
53
+ <input value-key="target" .value=${target} list="target-list" .placeholder=${this._getPlaceHoder(action)} />
54
+
55
+ <datalist id="target-list">
56
+ ${this._getTargetList(action).map(item => html ` <option .value=${item}></option> `)}
57
+ </datalist>
58
+ `}
59
+ ${action == 'data-set' || action == 'value-set'
60
+ ? html `
61
+ <label> <i18n-msg msgid="label.value">value</i18n-msg> </label>
62
+ <things-editor-data value-key="value" .value=${value} custom-editor fullwidth></things-editor-data>
63
+ `
64
+ : html ``}
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
+ case 'toggle-info-window':
90
+ return ((this.scene &&
91
+ this.scene.ids
92
+ .filter(i => {
93
+ return this.scene.findById(i.key).get('type') == 'info-window';
94
+ })
95
+ .map(i => `${i.key}`)) ||
96
+ []);
97
+ default:
98
+ return [];
99
+ }
100
+ }
101
+ _onValueChange(e) {
102
+ var element = e.target;
103
+ var key = element.getAttribute('value-key');
104
+ if (!key) {
105
+ return;
106
+ }
107
+ this.value = {
108
+ ...this.value,
109
+ [key]: convert(element)
110
+ };
111
+ this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }));
112
+ }
113
+ };
114
+ PropertyEventTap.styles = [EffectsSharedStyle];
115
+ __decorate([
116
+ property({ type: Object })
117
+ ], PropertyEventTap.prototype, "value", void 0);
118
+ __decorate([
119
+ property({ type: Object })
120
+ ], PropertyEventTap.prototype, "scene", void 0);
121
+ PropertyEventTap = __decorate([
122
+ customElement('property-event-tap')
123
+ ], PropertyEventTap);
124
+ //# sourceMappingURL=property-event-tap.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"property-event-tap.js","sourceRoot":"","sources":["../../../../../src/modeller/property-sidebar/effects/property-event-tap.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,OAAO,2BAA2B,CAAA;AAElC,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAEtC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAExD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAG3C,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,UAAU;IAAzC;;QAG8B,UAAK,GAAe,EAAE,CAAA;IA+GpD,CAAC;IA5GC,YAAY;QACV,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,QAAQ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A3B,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 '@things-factory/i18n-base'\n\nimport { LitElement, html } from 'lit'\nimport { Properties, Scene } from '@hatiolab/things-scene'\nimport { customElement, property } from 'lit/decorators'\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,6 @@
1
+ /**
2
+ * @license Copyright © HatioLab Inc. All rights reserved.
3
+ */
4
+ import '@things-factory/i18n-base';
5
+ import './property-event-hover';
6
+ import './property-event-tap';
@@ -0,0 +1,63 @@
1
+ /**
2
+ * @license Copyright © HatioLab Inc. All rights reserved.
3
+ */
4
+ import { __decorate } from "tslib";
5
+ import '@things-factory/i18n-base';
6
+ import './property-event-hover';
7
+ import './property-event-tap';
8
+ import { LitElement, html } from 'lit';
9
+ import { customElement, property } from 'lit/decorators';
10
+ import { PropertySharedStyle } from '../property-shared-style';
11
+ import { convert } from './value-converter';
12
+ let PropertyEvent = class PropertyEvent extends LitElement {
13
+ constructor() {
14
+ super(...arguments);
15
+ this.value = {};
16
+ }
17
+ firstUpdated() {
18
+ this.renderRoot.addEventListener('change', this._onValueChange.bind(this));
19
+ }
20
+ render() {
21
+ return html `
22
+ <fieldset>
23
+ <legend>
24
+ <title-with-help msgid="label.hover-event" topic="board-modeller/effects/hover-event"></title-with-help>
25
+ </legend>
26
+
27
+ <property-event-hover value-key="hover" .scene=${this.scene} .value=${this.value.hover || {}}>
28
+ </property-event-hover>
29
+ </fieldset>
30
+
31
+ <fieldset>
32
+ <legend>
33
+ <title-with-help msgid="label.tap-event" topic="board-modeller/effects/tap-event"></title-with-help>
34
+ </legend>
35
+
36
+ <property-event-tap value-key="tap" .scene=${this.scene} .value=${this.value.tap || {}}> </property-event-tap>
37
+ </fieldset>
38
+ `;
39
+ }
40
+ _onValueChange(e) {
41
+ var element = e.target;
42
+ var key = element.getAttribute('value-key');
43
+ if (!key) {
44
+ return;
45
+ }
46
+ this.value = {
47
+ ...this.value,
48
+ [key]: convert(element)
49
+ };
50
+ this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }));
51
+ }
52
+ };
53
+ PropertyEvent.styles = [PropertySharedStyle];
54
+ __decorate([
55
+ property({ type: Object })
56
+ ], PropertyEvent.prototype, "value", void 0);
57
+ __decorate([
58
+ property({ type: Object })
59
+ ], PropertyEvent.prototype, "scene", void 0);
60
+ PropertyEvent = __decorate([
61
+ customElement('property-event')
62
+ ], PropertyEvent);
63
+ //# 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,2BAA2B,CAAA;AAClC,OAAO,wBAAwB,CAAA;AAC/B,OAAO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A;AAET;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4CAAuB;AACtB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4CAAc;AAJrC,aAAa;IADlB,aAAa,CAAC,gBAAgB,CAAC;GAC1B,aAAa,CA8ClB","sourcesContent":["/**\n * @license Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport '@things-factory/i18n-base'\nimport './property-event-hover'\nimport './property-event-tap'\n\nimport { LitElement, html } from 'lit'\nimport { Properties, Scene } from '@hatiolab/things-scene'\nimport { customElement, property } from 'lit/decorators'\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 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=${this.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=${this.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"]}