@operato/board 8.0.0-beta.0 → 8.0.0-beta.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/dist/tsconfig.tsbuildinfo +1 -1
  3. package/package.json +14 -14
  4. package/.storybook/main.js +0 -3
  5. package/.storybook/server.mjs +0 -8
  6. package/db.sqlite +0 -0
  7. package/demo/index-modeller.html +0 -112
  8. package/demo/index-player.html +0 -112
  9. package/demo/index-viewer.html +0 -112
  10. package/demo/index.html +0 -112
  11. package/logs/.08636eb59927f12972f6774f5947c8507b3564c2-audit.json +0 -15
  12. package/logs/.5e5d741d8b7784a2fbad65eedc0fd46946aaf6f2-audit.json +0 -15
  13. package/logs/application-2023-03-12-02.log +0 -14
  14. package/logs/connections-2023-03-12-02.log +0 -70
  15. package/src/component/3d.ts +0 -29
  16. package/src/component/chart-and-gauge.ts +0 -28
  17. package/src/component/container.ts +0 -63
  18. package/src/component/data-source.ts +0 -30
  19. package/src/component/etc.ts +0 -88
  20. package/src/component/form.ts +0 -42
  21. package/src/component/index.ts +0 -12
  22. package/src/component/iot.ts +0 -52
  23. package/src/component/line.ts +0 -156
  24. package/src/component/register-default-groups.ts +0 -28
  25. package/src/component/shape.ts +0 -156
  26. package/src/component/table.ts +0 -28
  27. package/src/component/text-and-media.ts +0 -125
  28. package/src/component/warehouse.ts +0 -26
  29. package/src/data-storage/data-storage.ts +0 -76
  30. package/src/graphql/board.ts +0 -144
  31. package/src/graphql/data-subscription.ts +0 -30
  32. package/src/graphql/favorite-board.ts +0 -25
  33. package/src/graphql/group.ts +0 -138
  34. package/src/graphql/index.ts +0 -4
  35. package/src/graphql/play-group.ts +0 -225
  36. package/src/graphql/scenario.ts +0 -79
  37. package/src/index.ts +0 -10
  38. package/src/modeller/component-toolbar/component-detail.ts +0 -52
  39. package/src/modeller/component-toolbar/component-menu.ts +0 -196
  40. package/src/modeller/component-toolbar/component-toolbar.ts +0 -196
  41. package/src/modeller/component-toolbar/mode-icons.ts +0 -88
  42. package/src/modeller/edit-toolbar-style.ts +0 -232
  43. package/src/modeller/edit-toolbar.ts +0 -587
  44. package/src/modeller/property-sidebar/abstract-property.ts +0 -69
  45. package/src/modeller/property-sidebar/data-binding/data-binding-mapper.ts +0 -475
  46. package/src/modeller/property-sidebar/data-binding/data-binding-value-map.ts +0 -19
  47. package/src/modeller/property-sidebar/data-binding/data-binding-value-range.ts +0 -19
  48. package/src/modeller/property-sidebar/data-binding/data-binding.ts +0 -480
  49. package/src/modeller/property-sidebar/effects/effects-shared-style.ts +0 -62
  50. package/src/modeller/property-sidebar/effects/effects.ts +0 -69
  51. package/src/modeller/property-sidebar/effects/property-animation.ts +0 -146
  52. package/src/modeller/property-sidebar/effects/property-animations.ts +0 -93
  53. package/src/modeller/property-sidebar/effects/property-event-hover.ts +0 -200
  54. package/src/modeller/property-sidebar/effects/property-event-tap.ts +0 -251
  55. package/src/modeller/property-sidebar/effects/property-event.ts +0 -73
  56. package/src/modeller/property-sidebar/effects/property-shadow.ts +0 -114
  57. package/src/modeller/property-sidebar/effects/value-converter.ts +0 -23
  58. package/src/modeller/property-sidebar/inspector/inspector.ts +0 -404
  59. package/src/modeller/property-sidebar/property-shared-style.ts +0 -136
  60. package/src/modeller/property-sidebar/property-sidebar.ts +0 -326
  61. package/src/modeller/property-sidebar/shapes/box-padding-editor-styles.ts +0 -94
  62. package/src/modeller/property-sidebar/shapes/shapes.ts +0 -432
  63. package/src/modeller/property-sidebar/specifics/specific-properties-builder.ts +0 -152
  64. package/src/modeller/property-sidebar/specifics/specifics.ts +0 -81
  65. package/src/modeller/property-sidebar/styles/styles.ts +0 -577
  66. package/src/modeller/scene-viewer/confidential-overlay.ts +0 -18
  67. package/src/modeller/scene-viewer/ox-scene-handler.ts +0 -40
  68. package/src/modeller/scene-viewer/ox-scene-layer.ts +0 -42
  69. package/src/modeller/scene-viewer/ox-scene-property.ts +0 -10
  70. package/src/modeller/scene-viewer/ox-scene-viewer.ts +0 -263
  71. package/src/ox-board-component-info.ts +0 -236
  72. package/src/ox-board-list.ts +0 -401
  73. package/src/ox-board-modeller.ts +0 -408
  74. package/src/ox-board-player-style.ts +0 -200
  75. package/src/ox-board-player.ts +0 -333
  76. package/src/ox-board-template-list.ts +0 -267
  77. package/src/ox-board-template-viewer.ts +0 -198
  78. package/src/ox-board-viewer.ts +0 -727
  79. package/src/ox-editor-board-selector.ts +0 -91
  80. package/src/ox-property-editor-board-selector.ts +0 -23
  81. package/src/player/ox-board-player-carousel.ts +0 -197
  82. package/src/player/ox-board-player-grid.ts +0 -78
  83. package/src/player/ox-board-wrapper.ts +0 -152
  84. package/src/selector/board-creation-popup.ts +0 -151
  85. package/src/selector/board-thumbnail-card.ts +0 -175
  86. package/src/selector/ox-board-creation-card.ts +0 -98
  87. package/src/selector/ox-board-selector.ts +0 -382
  88. package/src/types.ts +0 -63
  89. package/stories/property-data-binding.stories.ts +0 -34
  90. package/tsconfig.json +0 -24
  91. package/web-dev-server.config.mjs +0 -30
  92. package/web-test-runner.config.mjs +0 -29
@@ -1,577 +0,0 @@
1
- /**
2
- * @license Copyright © HatioLab Inc. All rights reserved.
3
- */
4
-
5
- import '@polymer/paper-dropdown-menu/paper-dropdown-menu'
6
- import '@operato/help/ox-title-with-help.js'
7
- import '@operato/input/ox-input-color.js'
8
- import '@operato/input/ox-input-range.js'
9
- import '@operato/app/input/ox-input-fill-style.js'
10
- import '@operato/font/ox-font-selector.js'
11
- import '@operato/i18n/ox-i18n.js'
12
-
13
- import { css, html } from 'lit'
14
- import { property } from 'lit/decorators.js'
15
-
16
- import { Component } from '@hatiolab/things-scene'
17
-
18
- import { AbstractProperty } from '../abstract-property.js'
19
- import { PropertySharedStyle } from '../property-shared-style.js'
20
-
21
- export class PropertyStyles extends AbstractProperty {
22
- static styles = [
23
- PropertySharedStyle,
24
- css`
25
- ox-input-range {
26
- width: 100%;
27
- }
28
-
29
- .btn-group {
30
- height: 24px;
31
- }
32
-
33
- .btn-group paper-button {
34
- width: 30px;
35
- height: 24px;
36
- min-width: initial;
37
- margin: 0 4px 0 0;
38
- padding: 0;
39
- border-radius: 0;
40
- display: inline-block;
41
- border-bottom: 2px solid #fff;
42
-
43
- background: var(--url-icon-properties) no-repeat;
44
- background-size: 70%;
45
- }
46
-
47
- .btn-group paper-button.tbold {
48
- background-position: 50% -170px;
49
- }
50
-
51
- .btn-group paper-button.titalic {
52
- background-position: 50% -205px;
53
- }
54
-
55
- .btn-group paper-button.tunderline {
56
- background-position: 50% -240px;
57
- }
58
-
59
- .btn-group paper-button.tstrikethrough {
60
- background-position: 50% -415px;
61
- }
62
-
63
- .btn-group paper-button[active] {
64
- border-color: #f2471c;
65
- }
66
-
67
- .line-type paper-listbox {
68
- overflow: hidden;
69
- max-width: 100px;
70
- }
71
- .line-type paper-item {
72
- background: var(--url-icon-properties-line-type) 50% 0 no-repeat;
73
- min-height: 25px;
74
- padding: 3px 9px;
75
- width: 80px;
76
- }
77
-
78
- .line-type paper-item.solid {
79
- background-position: 50% 10px;
80
- }
81
- .line-type paper-item.round-dot {
82
- background-position: 50% -40px;
83
- }
84
- .line-type paper-item.square-dot {
85
- background-position: 50% -90px;
86
- }
87
- .line-type paper-item.dash {
88
- background-position: 50% -140px;
89
- }
90
- .line-type paper-item.dash-dot {
91
- background-position: 50% -190px;
92
- }
93
- .line-type paper-item.long-dash {
94
- background-position: 50% -240px;
95
- }
96
- .line-type paper-item.long-dash-dot {
97
- background-position: 50% -290px;
98
- }
99
- .line-type paper-item.long-dash-dot-dot {
100
- background-position: 50% -340px;
101
- }
102
-
103
- .line-type .paper-input-container input {
104
- background: var(--url-icon-properties-line-type) 50% 0 no-repeat !important;
105
- }
106
- .line-type.solid .paper-input-container input {
107
- background-position: 50% 5px !important;
108
- }
109
- .line-type.round-dot .paper-input-container input {
110
- background-position: 50% -45px !important;
111
- }
112
- .line-type.square-dot .paper-input-container input {
113
- background-position: 50% -85px !important;
114
- }
115
- .line-type.dash .paper-input-container input {
116
- background-position: 50% -145px !important;
117
- }
118
- .line-type.dash-dot .paper-input-container input {
119
- background-position: 50% -185px !important;
120
- }
121
- .line-type.long-dash .paper-input-container input {
122
- background-position: 50% -245px !important;
123
- }
124
- .line-type.long-dash-dot .paper-input-container input {
125
- background-position: 50% -285px !important;
126
- }
127
- .line-type.long-dash-dot-dot .paper-input-container input {
128
- background-position: 50% -345px !important;
129
- }
130
-
131
- .arrow-type paper-menu {
132
- overflow: hidden;
133
- max-width: 140px;
134
- }
135
- .arrow-type paper-item {
136
- background: var(--url-icon-properties-arrow-type) 50% 0 no-repeat;
137
- min-height: 30px;
138
- padding: 3px 7px;
139
- width: 30px;
140
- float: left;
141
- }
142
- .arrow-type paper-item.begin-no {
143
- background-position: 50% 16px;
144
- }
145
- .arrow-type paper-item.begin-arrow {
146
- background-position: 50% -39px;
147
- }
148
- .arrow-type paper-item.begin-open-arrow {
149
- background-position: 50% -89px;
150
- }
151
- .arrow-type paper-item.begin-stealth-arrow {
152
- background-position: 50% -139px;
153
- }
154
- .arrow-type paper-item.begin-diamond-arrow {
155
- background-position: 50% -190px;
156
- }
157
- .arrow-type paper-item.begin-oval-arrow {
158
- background-position: 50% -238px;
159
- }
160
- .arrow-type paper-item.begin-size1 {
161
- background-position: 50% -286px;
162
- }
163
- .arrow-type paper-item.begin-size2 {
164
- background-position: 50% -336px;
165
- }
166
- .arrow-type paper-item.begin-size3 {
167
- background-position: 50% -386px;
168
- }
169
- .arrow-type paper-item.begin-size4 {
170
- background-position: 50% -436px;
171
- }
172
- .arrow-type paper-item.begin-size5 {
173
- background-position: 50% -486px;
174
- }
175
- .arrow-type paper-item.begin-size6 {
176
- background-position: 50% -536px;
177
- }
178
- .arrow-type paper-item.begin-size7 {
179
- background-position: 50% -589px;
180
- }
181
- .arrow-type paper-item.begin-size8 {
182
- background-position: 50% -639px;
183
- }
184
- .arrow-type paper-item.begin-size9 {
185
- background-position: 50% -689px;
186
- }
187
- .arrow-type paper-item.end-no {
188
- background-position: 50% 16px;
189
- }
190
- .arrow-type paper-item.end-arrow {
191
- background-position: 50% -739px;
192
- }
193
- .arrow-type paper-item.end-open-arrow {
194
- background-position: 50% -789px;
195
- }
196
- .arrow-type paper-item.end-stealth-arrow {
197
- background-position: 50% -839px;
198
- }
199
- .arrow-type paper-item.end-diamond-arrow {
200
- background-position: 50% -890px;
201
- }
202
- .arrow-type paper-item.end-oval-arrow {
203
- background-position: 50% -938px;
204
- }
205
- .arrow-type paper-item.end-size1 {
206
- background-position: 50% -986px;
207
- }
208
- .arrow-type paper-item.end-size2 {
209
- background-position: 50% -1036px;
210
- }
211
- .arrow-type paper-item.end-size3 {
212
- background-position: 50% -1086px;
213
- }
214
- .arrow-type paper-item.end-size4 {
215
- background-position: 50% -1136px;
216
- }
217
- .arrow-type paper-item.end-size5 {
218
- background-position: 50% -1186px;
219
- }
220
- .arrow-type paper-item.end-size6 {
221
- background-position: 50% -1236px;
222
- }
223
- .arrow-type paper-item.end-size7 {
224
- background-position: 50% -1289px;
225
- }
226
- .arrow-type paper-item.end-size8 {
227
- background-position: 50% -1339px;
228
- }
229
- .arrow-type paper-item.end-size9 {
230
- background-position: 50% -1389px;
231
- }
232
-
233
- .arrow-type .paper-input-container input {
234
- background: var(--url-icon-properties-arrow-type) 110% 0 no-repeat !important;
235
- }
236
- .arrow-type.begin-no .paper-input-container input {
237
- background-position: 110% 5px !important;
238
- }
239
- .arrow-type.begin-arrow .paper-input-container input {
240
- background-position: 110% -50px !important;
241
- }
242
- .arrow-type.begin-open-arrow .paper-input-container input {
243
- background-position: 110% -100px !important;
244
- }
245
- .arrow-type.begin-stealth-arrow .paper-input-container input {
246
- background-position: 110% -150px !important;
247
- }
248
- .arrow-type.begin-diamond-arrow .paper-input-container input {
249
- background-position: 110% -200px !important;
250
- }
251
- .arrow-type.begin-oval-arrow .paper-input-container input {
252
- background-position: 110% -250px !important;
253
- }
254
- .arrow-type.begin-size1 .paper-input-container input {
255
- background-position: 110% -298px !important;
256
- }
257
- .arrow-type.begin-size2 .paper-input-container input {
258
- background-position: 110% -348px !important;
259
- }
260
- .arrow-type.begin-size3 .paper-input-container input {
261
- background-position: 110% -398px !important;
262
- }
263
- .arrow-type.begin-size4 .paper-input-container input {
264
- background-position: 110% -448px !important;
265
- }
266
- .arrow-type.begin-size5 .paper-input-container input {
267
- background-position: 110% -498px !important;
268
- }
269
- .arrow-type.begin-size6 .paper-input-container input {
270
- background-position: 110% -548px !important;
271
- }
272
- .arrow-type.begin-size7 .paper-input-container input {
273
- background-position: 110% -600px !important;
274
- }
275
- .arrow-type.begin-size8 .paper-input-container input {
276
- background-position: 110% -650px !important;
277
- }
278
- .arrow-type.begin-size9 .paper-input-container input {
279
- background-position: 110% -700px !important;
280
- }
281
- .arrow-type.end-no .paper-input-container input {
282
- background-position: 110% 5px !important;
283
- }
284
- .arrow-type.end-arrow .paper-input-container input {
285
- background-position: 110% -750px !important;
286
- }
287
- .arrow-type.end-open-arrow .paper-input-container input {
288
- background-position: 110% -800px !important;
289
- }
290
- .arrow-type.end-stealth-arrow .paper-input-container input {
291
- background-position: 110% -850px !important;
292
- }
293
- .arrow-type.end-diamond-arrow .paper-input-container input {
294
- background-position: 110% -900px !important;
295
- }
296
- .arrow-type.end-oval-arrow .paper-input-container input {
297
- background-position: 110% -950px !important;
298
- }
299
- .arrow-type.end-size1 .paper-input-container input {
300
- background-position: 110% -998px !important;
301
- }
302
- .arrow-type.end-size2 .paper-input-container input {
303
- background-position: 110% -1048px !important;
304
- }
305
- .arrow-type.end-size3 .paper-input-container input {
306
- background-position: 110% -1098px !important;
307
- }
308
- .arrow-type.end-size4 .paper-input-container input {
309
- background-position: 110% -1148px !important;
310
- }
311
- .arrow-type.end-size5 .paper-input-container input {
312
- background-position: 110% -1198px !important;
313
- }
314
- .arrow-type.end-size6 .paper-input-container input {
315
- background-position: 110% -1248px !important;
316
- }
317
- .arrow-type.end-size7 .paper-input-container input {
318
- background-position: 110% -1300px !important;
319
- }
320
- .arrow-type.end-size8 .paper-input-container input {
321
- background-position: 110% -1350px !important;
322
- }
323
- .arrow-type.end-size9 .paper-input-container input {
324
- background-position: 110% -1400px !important;
325
- }
326
- `
327
- ]
328
- @property({ type: Object }) value: any = {}
329
- @property({ type: Array }) selected: Component[] = []
330
- @property({ type: Array }) fonts: any[] = []
331
-
332
- firstUpdated() {
333
- this.renderRoot.addEventListener('change', this._onValueChange.bind(this))
334
- }
335
-
336
- render() {
337
- var {
338
- alpha = 1,
339
- fontFamily,
340
- fontSize,
341
- lineHeight,
342
- fontColor,
343
- bold,
344
- italic,
345
- fillStyle,
346
- lineWidth,
347
- strokeStyle,
348
- lineDash,
349
- lineCap,
350
- lineJoin,
351
- begin,
352
- beginSize,
353
- end,
354
- endSize
355
- } = this.value || {}
356
-
357
- return html`
358
- <fieldset>
359
- <legend>
360
- <ox-title-with-help topic="board-modeller/styles/opacity" msgid="label.opacity">opacity</ox-title-with-help>
361
- </legend>
362
- <ox-input-range min="0" max="1" step="0.1" value-key="alpha" .value=${alpha} editable> </ox-input-range>
363
- </fieldset>
364
-
365
- <fieldset>
366
- <legend>
367
- <ox-title-with-help topic="board-modeller/styles/text-style" msgid="label.text-style"
368
- >text style</ox-title-with-help
369
- >
370
- </legend>
371
-
372
- <div class="property-grid">
373
- <label class="property-full-label">
374
- <ox-i18n msgid="label.font-family">Font Family</ox-i18n>
375
- </label>
376
-
377
- <ox-font-selector
378
- value-key="fontFamily"
379
- .value=${fontFamily}
380
- class="property-full-input"
381
- custom-editor
382
- ></ox-font-selector>
383
-
384
- <label class="property-half-label icon-only-label font-size"></label>
385
- <input type="number" value-key="fontSize" .value=${fontSize} class="property-half-input" />
386
-
387
- <label class="property-half-label icon-only-label lineHeight"></label>
388
- <input type="number" value-key="lineHeight" .value=${lineHeight} class="property-half-input" />
389
-
390
- <label class="property-half-label icon-only-label color"></label>
391
- <ox-input-color value-key="fontColor" .value=${fontColor} class="property-half-input"> </ox-input-color>
392
-
393
- <label class="property-half-label"></label>
394
- <div class="property-half-input btn-group">
395
- <paper-button toggles value-key="bold" ?active=${bold} class="tbold"> </paper-button>
396
- <paper-button toggles value-key="italic" ?active=${italic} class="titalic"> </paper-button>
397
- </div>
398
- </div>
399
- </fieldset>
400
-
401
- <fieldset>
402
- <legend>
403
- <ox-title-with-help topic="board-modeller/styles/fill-style" msgid="label.fill-style"
404
- >fill style</ox-title-with-help
405
- >
406
- </legend>
407
-
408
- <ox-input-fill-style value-key="fillStyle" .value=${fillStyle}> </ox-input-fill-style>
409
- </fieldset>
410
-
411
- <fieldset>
412
- <legend>
413
- <ox-title-with-help msgid="label.line-style" topic="board-modeller/styles/line-style"></ox-title-with-help>
414
- </legend>
415
-
416
- <div class="property-grid">
417
- <label class="property-half-label icon-only-label linewidth"></label>
418
- <input type="number" value-key="lineWidth" .value=${lineWidth} class="property-half-input" />
419
-
420
- <label class="property-half-label icon-only-label color"></label>
421
- <ox-input-color value-key="strokeStyle" .value=${strokeStyle} class="property-half-input"> </ox-input-color>
422
-
423
- <label class="property-full-label">
424
- <ox-i18n msgid="label.line-type">line type</ox-i18n>
425
- </label>
426
- <paper-dropdown-menu no-label-float="true" class="property-full-input line-type solid">
427
- <!-- solid는 선택된 항목 보여주기위한 class로 하위 paper-item의 class와 동일하게 -->
428
- <paper-listbox
429
- value-key="lineDash"
430
- @selected-changed=${(e: CustomEvent) => this._onValueChange(e)}
431
- slot="dropdown-content"
432
- .selected=${lineDash}
433
- attr-for-selected="name"
434
- >
435
- <paper-item class="solid" name="solid"></paper-item>
436
- <paper-item class="round-dot" name="round-dot"></paper-item>
437
- <paper-item class="square-dot" name="square-dot"></paper-item>
438
- <paper-item class="dash" name="dash"></paper-item>
439
- <paper-item class="dash-dot" name="dash-dot"></paper-item>
440
- <paper-item class="long-dash" name="long-dash"></paper-item>
441
- <paper-item class="long-dash-dot" name="long-dash-dot"></paper-item>
442
- <paper-item class="long-dash-dot-dot" name="long-dash-dot-dot"></paper-item>
443
- </paper-listbox>
444
- </paper-dropdown-menu>
445
-
446
- <label class="property-full-label">
447
- <ox-i18n msgid="label.cap-type">cap type</ox-i18n>
448
- </label>
449
- <select class="property-full-input select-content" value-key="lineCap" .value=${lineCap}>
450
- <option value="butt"><ox-i18n msgid="label.square">square</ox-i18n></option>
451
- <option value="round"><ox-i18n msgid="label.round">round</ox-i18n></option>
452
- </select>
453
-
454
- <label class="property-full-label">
455
- <ox-i18n msgid="label.join-type">join type</ox-i18n>
456
- </label>
457
- <select class="property-full-input select-content" value-key="lineJoin" .value=${lineJoin}>
458
- <option value="miter"><ox-i18n msgid="label.miter">miter</ox-i18n></option>
459
- <option value="round"><ox-i18n msgid="label.round">round</ox-i18n></option>
460
- <option value="bevel"><ox-i18n msgid="label.bevel">bevel</ox-i18n></option>
461
- </select>
462
-
463
- ${this._isLine(this.selected)
464
- ? html`
465
- <label class="property-full-label">
466
- <ox-i18n msgid="label.begin-type">begin type</ox-i18n>
467
- </label>
468
- <paper-dropdown-menu no-label-float="true" class="property-full-input arrow-type begin-no">
469
- <!-- begin-no는 선택된 항목 보여주기위한 class로 하위 paper-item의 class와 동일하게 -->
470
- <paper-listbox
471
- value-key="begin"
472
- @selected-changed=${(e: CustomEvent) => this._onValueChange(e)}
473
- slot="dropdown-content"
474
- .selected=${begin}
475
- attr-for-selected="name"
476
- >
477
- <paper-item class="begin-no" name="none"></paper-item>
478
- <paper-item class="begin-arrow" name="arrow"></paper-item>
479
- <paper-item class="begin-open-arrow" name="open-arrow"></paper-item>
480
- <paper-item class="begin-stealth-arrow" name="sharp-arrow"></paper-item>
481
- <paper-item class="begin-diamond-arrow" name="diamond"></paper-item>
482
- <paper-item class="begin-oval-arrow" name="oval"></paper-item>
483
- </paper-listbox>
484
- </paper-dropdown-menu>
485
-
486
- <label class="property-full-label">
487
- <ox-i18n msgid="label.begin-size">begin size</ox-i18n>
488
- </label>
489
- <paper-dropdown-menu no-label-float="true" class="property-full-input arrow-type begin-size1">
490
- <!-- begin-size1는 선택된 항목 보여주기위한 class로 하위 paper-item의 class와 동일하게 -->
491
- <paper-listbox
492
- value-key="beginSize"
493
- @selected-changed=${(e: CustomEvent) => this._onValueChange(e)}
494
- slot="dropdown-content"
495
- .selected=${beginSize}
496
- attr-for-selected="name"
497
- >
498
- <paper-item class="begin-size1" name="size1"></paper-item>
499
- <paper-item class="begin-size2" name="size2"></paper-item>
500
- <paper-item class="begin-size3" name="size3"></paper-item>
501
- <paper-item class="begin-size4" name="size4"></paper-item>
502
- <paper-item class="begin-size5" name="size5"></paper-item>
503
- <paper-item class="begin-size6" name="size6"></paper-item>
504
- <paper-item class="begin-size7" name="size7"></paper-item>
505
- <paper-item class="begin-size8" name="size8"></paper-item>
506
- <paper-item class="begin-size9" name="size9"></paper-item>
507
- </paper-listbox>
508
- </paper-dropdown-menu>
509
-
510
- <label class="property-full-label">
511
- <ox-i18n msgid="label.end-type">end type</ox-i18n>
512
- </label>
513
- <paper-dropdown-menu no-label-float="true" class="property-full-input arrow-type end-no">
514
- <!-- end-no는 선택된 항목 보여주기위한 class로 하위 paper-item의 class와 동일하게 -->
515
- <paper-listbox
516
- value-key="end"
517
- @selected-changed=${(e: CustomEvent) => this._onValueChange(e)}
518
- slot="dropdown-content"
519
- .selected=${end}
520
- attr-for-selected="name"
521
- >
522
- <paper-item class="end-no" name="none"></paper-item>
523
- <paper-item class="end-arrow" name="arrow"></paper-item>
524
- <paper-item class="end-open-arrow" name="open-arrow"></paper-item>
525
- <paper-item class="end-stealth-arrow" name="sharp-arrow"></paper-item>
526
- <paper-item class="end-diamond-arrow" name="diamond"></paper-item>
527
- <paper-item class="end-oval-arrow" name="oval"></paper-item>
528
- </paper-listbox>
529
- </paper-dropdown-menu>
530
-
531
- <label class="property-full-label">
532
- <ox-i18n msgid="label.end-size">end size</ox-i18n>
533
- </label>
534
- <paper-dropdown-menu no-label-float="true" class="property-full-input arrow-type end-size1">
535
- <!-- end-size1는 선택된 항목 보여주기위한 class로 하위 paper-item의 class와 동일하게 -->
536
- <paper-listbox
537
- value-key="endSize"
538
- @selected-changed=${(e: CustomEvent) => this._onValueChange(e)}
539
- slot="dropdown-content"
540
- .selected=${endSize}
541
- attr-for-selected="name"
542
- >
543
- <paper-item class="end-size1" name="size1"></paper-item>
544
- <paper-item class="end-size2" name="size2"></paper-item>
545
- <paper-item class="end-size3" name="size3"></paper-item>
546
- <paper-item class="end-size4" name="size4"></paper-item>
547
- <paper-item class="end-size5" name="size5"></paper-item>
548
- <paper-item class="end-size6" name="size6"></paper-item>
549
- <paper-item class="end-size7" name="size7"></paper-item>
550
- <paper-item class="end-size8" name="size8"></paper-item>
551
- <paper-item class="end-size9" name="size9"></paper-item>
552
- </paper-listbox>
553
- </paper-dropdown-menu>
554
- `
555
- : html``}
556
- </div>
557
- </fieldset>
558
- `
559
- }
560
-
561
- _isLine(selected: Component[]) {
562
- var isLine = false
563
-
564
- for (var i = 0; i < selected.length; i++) {
565
- var comp = selected[i]
566
-
567
- if (!comp.isLine || !comp.isLine()) {
568
- isLine = false
569
- return isLine
570
- }
571
-
572
- isLine = true
573
- }
574
-
575
- return isLine
576
- }
577
- }
@@ -1,18 +0,0 @@
1
- /*
2
- * Copyright © HatioLab Inc. All rights reserved.
3
- */
4
-
5
- import { Component as SceneComponent, Layer as SceneLayer } from '@hatiolab/things-scene'
6
-
7
- export default class ConfidentialOverlay extends SceneLayer {
8
- _draw(context: CanvasRenderingContext2D) {
9
- context.globalAlpha = 0.3
10
-
11
- context.font = '50px Verdana'
12
- context.fillStyle = 'red'
13
-
14
- context.fillText(this.get('text') || 'CONFIDENTIAL', 20, 60)
15
- }
16
- }
17
-
18
- SceneComponent.register('confidential-overlay', ConfidentialOverlay)
@@ -1,40 +0,0 @@
1
- import './ox-scene-property'
2
-
3
- import { LitElement, html } from 'lit'
4
- import { customElement, property } from 'lit/decorators.js'
5
-
6
- @customElement('ox-scene-handler')
7
- export default class OxSceneHandler extends LitElement {
8
- @property({ type: String }) type!: string
9
- @property({ type: Object }) model!: {
10
- type: Object
11
- notify: true
12
- }
13
-
14
- render() {
15
- return html` <slot select="ox-scene-property"></slot> `
16
- }
17
-
18
- connectedCallback() {
19
- super.connectedCallback()
20
-
21
- let model: any = {
22
- type: this.type
23
- }
24
-
25
- model = Array.from(this.querySelectorAll('ox-scene-property')).reduce((model: any, property: any) => {
26
- const name = property.getAttribute('name')
27
- const value = property.getAttribute('value')
28
-
29
- if (name) {
30
- model[name] = value
31
- }
32
-
33
- return model
34
- }, model)
35
-
36
- model.__host__ = this
37
-
38
- this.model = model
39
- }
40
- }
@@ -1,42 +0,0 @@
1
- import './ox-scene-property'
2
-
3
- import { LitElement, html } from 'lit'
4
- import { customElement, property } from 'lit/decorators.js'
5
-
6
- @customElement('ox-scene-layer')
7
- export default class OxSceneLayer extends LitElement {
8
- @property({ type: String }) type?: String
9
- @property({ type: String }) text?: String
10
-
11
- render() {
12
- return html` <slot select="ox-scene-property"></slot> `
13
- }
14
-
15
- getModel() {
16
- let model = {
17
- type: this.type
18
- }
19
-
20
- model = Array.from(this.querySelectorAll('ox-scene-property')).reduce((model: any, property: any) => {
21
- let value: any = property.value
22
-
23
- if (property.name) {
24
- switch (property.type) {
25
- case 'number':
26
- value = Number(value)
27
- break
28
- case 'boolean':
29
- value = Boolean(value)
30
- break
31
- default:
32
- }
33
-
34
- model[property.name] = value
35
- }
36
-
37
- return model
38
- }, model)
39
-
40
- return model
41
- }
42
- }
@@ -1,10 +0,0 @@
1
- import { customElement, property } from 'lit/decorators.js'
2
-
3
- import { LitElement } from 'lit'
4
-
5
- @customElement('ox-scene-property')
6
- export default class OxSceneProperty extends LitElement {
7
- @property({ type: String }) name!: string
8
- @property({ type: String }) value!: string
9
- @property({ type: String }) type!: string
10
- }