@operato/process 7.1.31 → 7.1.32

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 (57) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/tsconfig.tsbuildinfo +1 -1
  3. package/package.json +14 -14
  4. package/.storybook/main.js +0 -3
  5. package/.storybook/preview.js +0 -52
  6. package/.storybook/server.mjs +0 -8
  7. package/demo/index-modeller.html +0 -112
  8. package/demo/index-viewer.html +0 -112
  9. package/demo/index.html +0 -112
  10. package/src/data-storage/data-storage.ts +0 -47
  11. package/src/graphql/data-subscription.ts +0 -30
  12. package/src/graphql/favorite-process.ts +0 -25
  13. package/src/graphql/index.ts +0 -3
  14. package/src/graphql/process-group.ts +0 -138
  15. package/src/graphql/process.ts +0 -141
  16. package/src/graphql/scenario.ts +0 -79
  17. package/src/index.ts +0 -8
  18. package/src/modeller/component-toolbar/component-detail.ts +0 -58
  19. package/src/modeller/component-toolbar/component-menu.ts +0 -193
  20. package/src/modeller/component-toolbar/component-toolbar.ts +0 -196
  21. package/src/modeller/component-toolbar/mode-icons.ts +0 -88
  22. package/src/modeller/edit-toolbar-style.ts +0 -229
  23. package/src/modeller/edit-toolbar.ts +0 -576
  24. package/src/modeller/property-sidebar/abstract-property.ts +0 -69
  25. package/src/modeller/property-sidebar/data-binding/data-binding-mapper.ts +0 -475
  26. package/src/modeller/property-sidebar/data-binding/data-binding.ts +0 -479
  27. package/src/modeller/property-sidebar/effects/effects-shared-style.ts +0 -62
  28. package/src/modeller/property-sidebar/effects/effects.ts +0 -52
  29. package/src/modeller/property-sidebar/effects/property-event-hover.ts +0 -201
  30. package/src/modeller/property-sidebar/effects/property-event-tap.ts +0 -212
  31. package/src/modeller/property-sidebar/effects/property-event.ts +0 -76
  32. package/src/modeller/property-sidebar/effects/property-shadow.ts +0 -114
  33. package/src/modeller/property-sidebar/effects/value-converter.ts +0 -23
  34. package/src/modeller/property-sidebar/inspector/inspector.ts +0 -408
  35. package/src/modeller/property-sidebar/property-shared-style.ts +0 -136
  36. package/src/modeller/property-sidebar/property-sidebar.ts +0 -342
  37. package/src/modeller/property-sidebar/shapes/box-padding-editor-styles.ts +0 -94
  38. package/src/modeller/property-sidebar/shapes/shapes.ts +0 -410
  39. package/src/modeller/property-sidebar/specifics/specific-properties-builder.ts +0 -147
  40. package/src/modeller/property-sidebar/specifics/specifics.ts +0 -81
  41. package/src/modeller/property-sidebar/styles/styles.ts +0 -577
  42. package/src/ox-editor-process-selector.ts +0 -91
  43. package/src/ox-process-list.ts +0 -401
  44. package/src/ox-process-modeller.ts +0 -432
  45. package/src/ox-process-template-list.ts +0 -272
  46. package/src/ox-process-template-viewer.ts +0 -198
  47. package/src/ox-process-viewer.ts +0 -575
  48. package/src/ox-property-editor-process-selector.ts +0 -23
  49. package/src/selector/ox-process-creation-card.ts +0 -95
  50. package/src/selector/ox-process-selector.ts +0 -324
  51. package/src/selector/process-creation-popup.ts +0 -151
  52. package/src/selector/process-thumbnail-card.ts +0 -175
  53. package/src/types.ts +0 -57
  54. package/stories/index.stories.ts +0 -54
  55. package/tsconfig.json +0 -24
  56. package/web-dev-server.config.mjs +0 -30
  57. package/web-test-runner.config.mjs +0 -29
@@ -1,410 +0,0 @@
1
- /**
2
- * @license Copyright © HatioLab Inc. All rights reserved.
3
- */
4
-
5
- import '@operato/input/ox-input-angle.js'
6
- import '@operato/input/ox-buttons-radio.js'
7
- import '@material/web/icon/icon.js'
8
- import '@operato/i18n/ox-i18n.js'
9
- import '@operato/help/ox-title-with-help.js'
10
-
11
- import { css, html } from 'lit'
12
- import { property, state } from 'lit/decorators.js'
13
- import { keyed } from 'lit/directives/keyed.js'
14
-
15
- import { BOUNDS, Component, Properties } from '@hatiolab/things-scene'
16
-
17
- import { AbstractProperty } from '../abstract-property'
18
- import { PropertySharedStyle } from '../property-shared-style'
19
- import { BoxPaddingEditorStyles } from './box-padding-editor-styles'
20
-
21
- export class PropertyShapes extends AbstractProperty {
22
- static styles = [
23
- PropertySharedStyle,
24
- BoxPaddingEditorStyles,
25
- css`
26
- fieldset[collapsable] legend {
27
- box-sizing: border-box;
28
- width: 100%;
29
- }
30
-
31
- fieldset[collapsable] legend md-icon {
32
- float: right;
33
- font-size: medium;
34
- margin: 0;
35
- cursor: pointer;
36
- }
37
-
38
- fieldset[collapsable][collapsed] > :not(legend) {
39
- display: none;
40
- }
41
- `,
42
- css`
43
- .icon-label label {
44
- background: var(--url-icon-properties-label) 7px -900px no-repeat;
45
- }
46
-
47
- .icon-label label.width {
48
- background-position: 7px -96px;
49
- }
50
-
51
- .icon-label label.height {
52
- background-position: 7px 4px;
53
- }
54
-
55
- .icon-label label.rotate {
56
- background-position: 7px -198px;
57
- }
58
-
59
- .icon-label label.twidth {
60
- background-position: 7px -296px;
61
- }
62
-
63
- .icon-label label.theight {
64
- background-position: 7px -396px;
65
- }
66
-
67
- .icon-label label.zPos {
68
- background-position: 5px -1098px;
69
- }
70
-
71
- .icon-label label.depth {
72
- background-position: 5px -1198px;
73
- }
74
-
75
- .icon-label label.rotationX {
76
- background-position: 5px -1296px;
77
- }
78
-
79
- .icon-label label.rotationY {
80
- background-position: 5px -1396px;
81
- }
82
-
83
- .icon-label label.rotationZ {
84
- background-position: 5px -1496px;
85
- }
86
-
87
- ox-buttons-radio > * {
88
- width: 30px;
89
- height: 25px;
90
- min-width: initial;
91
- margin: 0 4px 0 0;
92
- padding: 0;
93
- border-radius: 0;
94
- display: inline-block;
95
- border-bottom: 2px solid #fff;
96
- }
97
-
98
- ox-buttons-radio div {
99
- background: var(--url-icon-properties) no-repeat;
100
- }
101
-
102
- ox-buttons-radio div[data-value='left'] {
103
- background-position: 50% 3px;
104
- }
105
-
106
- ox-buttons-radio div[data-value='center'] {
107
- background-position: 50% -47px;
108
- }
109
-
110
- ox-buttons-radio div[data-value='right'] {
111
- background-position: 50% -97px;
112
- }
113
-
114
- ox-buttons-radio div[data-value='justify'] {
115
- background-position: 50% -147px;
116
- }
117
-
118
- ox-buttons-radio div[data-value='top'] {
119
- background-position: 50% -197px;
120
- }
121
-
122
- ox-buttons-radio div[data-value='middle'] {
123
- background-position: 50% -193px;
124
- }
125
-
126
- ox-buttons-radio div[data-value='bottom'] {
127
- background-position: 50% -188px;
128
- }
129
-
130
- ox-buttons-radio div[active] {
131
- border-color: #f2471c;
132
- }
133
- `
134
- ]
135
-
136
- @property({ type: Object }) value?: Properties
137
- @property({ type: Object }) bounds: BOUNDS | null = null
138
- @property({ type: Array }) selected: Component[] = []
139
-
140
- @state() private _3dExpanded: boolean = false
141
-
142
- firstUpdated() {
143
- this.renderRoot.addEventListener('change', this._onValueChange.bind(this))
144
- }
145
-
146
- render() {
147
- const value = this.value || {}
148
- const { width, height } = this.bounds || {}
149
-
150
- return html`
151
- <fieldset>
152
- <div class="property-grid">
153
- ${this._isIdentifiable(this.selected)
154
- ? html`
155
- <label> <ox-i18n msgid="label.id">ID</ox-i18n> </label>
156
- <input value-key="id" .value=${value.id || ''} />
157
- `
158
- : html``}
159
- ${this._isClassIdentifiable(this.selected)
160
- ? html`
161
- <label> <ox-i18n msgid="label.class">Class</ox-i18n> </label>
162
- <input value-key="class" .value=${value.class || ''} />
163
- `
164
- : html``}
165
- ${this._hasTextProperty(this.selected)
166
- ? html`
167
- <label> <ox-i18n msgid="label.text">Text</ox-i18n> </label>
168
- <input value-key="text" .value=${value.text || ''} />
169
- <label> <ox-i18n msgid="label.text-format">Text Format</ox-i18n> </label>
170
- <input value-key="textFormat" .value=${value.textFormat || ''} list="format-list" />
171
- <datalist id="format-list">
172
- <option value="#,###."></option>
173
- <option value="#,###.#"></option>
174
- <option value="#,###.0"></option>
175
- <option value="#,##0.#"></option>
176
- <option value="#,##0.0"></option>
177
- <option value="#,##0.0%"></option>
178
- </datalist>
179
- `
180
- : html``}
181
- ${this._hasProperties(this.selected)
182
- ? html`
183
- <div class="checkbox-row">
184
- <input id="checkbox-hidden" value-key="hidden" type="checkbox" .checked=${value.hidden} />
185
- <label for="checkbox-hidden"> <ox-i18n msgid="label.item-hidden">Item Hidden</ox-i18n> </label>
186
-
187
- <input id="checkbox-locked" value-key="locked" type="checkbox" .checked=${value.locked} />
188
- <label for="checkbox-locked"> <ox-i18n msgid="label.locked">Locked</ox-i18n> </label>
189
- </div>
190
- `
191
- : html``}
192
- </div>
193
- </fieldset>
194
-
195
- ${!this._isLine(this.selected)
196
- ? keyed(
197
- this.selected,
198
- html`
199
- <fieldset class="icon-label unit ratio">
200
- <legend>
201
- <ox-title-with-help topic="process-modeller/shapes/size" msgid="label.size">size</ox-title-with-help>
202
- </legend>
203
-
204
- <div class="property-grid">
205
- <label class="width"> <ox-i18n msgid="label.width">width</ox-i18n> </label>
206
- <input type="number" value-key="bounds.width" .value=${String(width)} />
207
- <label class="height"> <ox-i18n msgid="label.height">height</ox-i18n> </label>
208
- <input type="number" value-key="bounds.height" .value=${String(height)} />
209
-
210
- ${this.selected.length && this.selected[0].isRootModel()
211
- ? html``
212
- : html`
213
- <label class="rotate"> <ox-i18n msgid="label.rotate">rotate</ox-i18n> </label>
214
- <ox-input-angle value-key="rotation" .value=${value.rotation}> </ox-input-angle>
215
- `}
216
- </div>
217
- </fieldset>
218
- `
219
- )
220
- : html``}
221
- ${this._is3dish(this.selected)
222
- ? html`
223
- <fieldset class="icon-label unit ratio" collapsable ?collapsed=${!this._3dExpanded}>
224
- <legend>
225
- <ox-title-with-help topic="process-modeller/shapes/3dish" msgid="label.3dish">3D</ox-title-with-help>
226
- <md-icon
227
- @click=${(e: Event) => {
228
- this._3dExpanded = !this._3dExpanded
229
- }}
230
- >${this._3dExpanded ? 'expand_less' : 'expand_more'}</md-icon
231
- >
232
- </legend>
233
-
234
- <div class="property-grid">
235
- <label class="zPos"> <ox-i18n msgid="label.z-pos">pos. Z</ox-i18n> </label>
236
- <input type="number" value-key="zPos" .value=${value.zPos} />
237
- <label class="depth"> <ox-i18n msgid="label.depth">depth</ox-i18n> </label>
238
- <input type="number" value-key="depth" .value=${value.depth} />
239
-
240
- <label class="rotationX"> <ox-i18n msgid="label.rotation-x">rot. X</ox-i18n> </label>
241
- <ox-input-angle value-key="rotationX" .value=${value.rotationX}> </ox-input-angle>
242
-
243
- <label class="rotationY"> <ox-i18n msgid="label.rotation-y">rot. Y</ox-i18n> </label>
244
- <ox-input-angle value-key="rotationY" .value=${value.rotationY}> </ox-input-angle>
245
-
246
- <label class="rotationZ"> <ox-i18n msgid="label.rotation-z">rot. Z</ox-i18n> </label>
247
- <ox-input-angle value-key="rotation" .value=${value.rotation}> </ox-input-angle>
248
- </div>
249
- </fieldset>
250
- `
251
- : html``}
252
- ${this._hasTextProperty(this.selected)
253
- ? html`
254
- <fieldset>
255
- <legend>
256
- <ox-title-with-help topic="process-modeller/shapes/text-box" msgid="label.text-box"
257
- >text box</ox-title-with-help
258
- >
259
- </legend>
260
-
261
- <div class="property-grid">
262
- <label> <ox-i18n msgid="label.horizontal">horizontal</ox-i18n> </label>
263
- <ox-buttons-radio value-key="textAlign" .value=${value.textAlign}>
264
- <div data-value="left"></div>
265
- <div data-value="center"></div>
266
- <div data-value="right"></div>
267
- <div data-value="justify"></div>
268
- </ox-buttons-radio>
269
-
270
- <label> <ox-i18n msgid="label.vertical">vertical</ox-i18n> </label>
271
- <ox-buttons-radio value-key="textBaseline" .value=${value.textBaseline}>
272
- <div data-value="top"></div>
273
- <div data-value="middle"></div>
274
- <div data-value="bottom"></div>
275
- </ox-buttons-radio>
276
-
277
- <div class="checkbox-row">
278
- <input id="checkbox-textwrap" type="checkbox" value-key="textWrap" .checked=${value.textWrap} />
279
- <label for="checkbox-textwrap"> <ox-i18n msgid="label.text-wrap">Text Wrap</ox-i18n> </label>
280
- </div>
281
-
282
- ${!value.textWrap
283
- ? html` <label for="checkbox-textOverflow">
284
- <ox-i18n msgid="label.text-overflow">Text Overflow</ox-i18n>
285
- </label>
286
- <select value-key="textOverflow" .value=${value.textOverflow || ''}>
287
- <option value="" selected>none</option>
288
- <option value="ellipsis">ellipsis</option>
289
- <option value="clip">clip</option>
290
- </select>`
291
- : ''}
292
-
293
- <label> <ox-i18n msgid="label.padding">padding</ox-i18n> </label>
294
- <table class="box-padding">
295
- <tr>
296
- <td class="slide1"></td>
297
- <td class="slide2"></td>
298
- <td class="slide3"></td>
299
- </tr>
300
- <tr>
301
- <td class="slide4"></td>
302
- <td class="slide5">
303
- <input type="number" value-key="paddingTop" .value=${value.paddingTop || 0} />
304
- <input type="number" value-key="paddingLeft" .value=${value.paddingLeft || 0} />
305
- <input type="number" value-key="paddingRight" .value=${value.paddingRight || 0} />
306
- <input type="number" value-key="paddingBottom" .value=${value.paddingBottom || 0} />
307
- </td>
308
- <td class="slide6"></td>
309
- </tr>
310
- <tr>
311
- <td class="slide7"></td>
312
- <td class="slide8"></td>
313
- <td class="slide9"></td>
314
- </tr>
315
- </table>
316
- </div>
317
- </fieldset>
318
- `
319
- : html``}
320
- ${this.selected.length && this.selected[0].isRootModel()
321
- ? html`
322
- <fieldset class="icon-label">
323
- <legend>
324
- <ox-title-with-help topic="process-modeller/shapes/viewer-option" msgid="label.viewer-option"
325
- >Viewer Option</ox-title-with-help
326
- >
327
- </legend>
328
-
329
- <div class="property-grid">
330
- <label><ox-i18n msgid="label.fit">Fit</ox-i18n></label>
331
- <select value-key="fitMode" .value=${value.fitMode || 'ratio'}>
332
- <option value="none">none</option>
333
- <option value="center">center</option>
334
- <option value="ratio" selected>ratio</option>
335
- <option value="both">both</option>
336
- <option value="width">width</option>
337
- <option value="height">height</option>
338
- </select>
339
- </div>
340
- </fieldset>
341
- `
342
- : html``}
343
- `
344
- }
345
-
346
- _onValueChange(e: Event) {
347
- var element = e.target as HTMLElement
348
- var key = element.getAttribute('value-key')
349
-
350
- if (!key) {
351
- return
352
- }
353
-
354
- var value = this._getValueFromEventTarget(element)
355
-
356
- if (key.indexOf('bounds.') == 0) {
357
- if (isNaN(value)) return
358
- this.dispatchEvent(
359
- new CustomEvent('bounds-change', {
360
- bubbles: true,
361
- composed: true,
362
- detail: {
363
- [key.substr(7)]: value
364
- }
365
- })
366
- )
367
- } else {
368
- this._onAfterValueChange(key, value)
369
- }
370
- }
371
-
372
- _hasTextProperty(selected: Component[]) {
373
- for (let i = 0; i < selected.length; i++) {
374
- if (!selected[i].hasTextProperty) return false
375
- }
376
-
377
- return true
378
- }
379
-
380
- _hasProperties(selected: Component[]) {
381
- if (!selected || selected.length == 0 || (selected[0] && selected[0].isLayer && selected[0].isLayer())) return false
382
-
383
- return true
384
- }
385
-
386
- _isIdentifiable(selected: Component[]) {
387
- if (!selected || selected.length == 0 || selected.length > 1 || (selected[0].isLayer && selected[0].isLayer()))
388
- return false
389
-
390
- return true
391
- }
392
-
393
- _isClassIdentifiable(selected: Component[]) {
394
- if (!selected || (selected[0] && selected[0].isLayer())) return false
395
-
396
- return true
397
- }
398
-
399
- _isLine(selected: Component[]) {
400
- if (!selected || !(selected[0] && selected[0].isLine())) return false
401
-
402
- return true
403
- }
404
-
405
- _is3dish(selected: Component[]) {
406
- if (!selected || !(selected[0] && selected[0].is3dish())) return false
407
-
408
- return true
409
- }
410
- }
@@ -1,147 +0,0 @@
1
- /**
2
- * @license Copyright © HatioLab Inc. All rights reserved.
3
- */
4
-
5
- import '@operato/app/property-editor.js' /* for registering property editors */
6
-
7
- import { html, LitElement, PropertyValues } from 'lit'
8
- import { property } from 'lit/decorators.js'
9
-
10
- import { Properties } from '@hatiolab/things-scene'
11
- import { OxPropertyEditor, PropertySpec } from '@operato/property-editor'
12
-
13
- /**
14
- 모든 에디터들은 change 이벤트를 지원해야 한다. 또한, 모든 에디터들은 value속성에 값을 가져야 한다.
15
-
16
- Example:
17
-
18
- <specific-properties-builder value="{{value}}">
19
- <label>Center X</label>
20
- <input type="number" .value="${value.cx}">
21
- <label>Width</label>
22
- <input type="number" .value="${value.width}">
23
- </specific-properties-builder>
24
- */
25
-
26
- const DEFAULT_VALUE = {
27
- legend: '',
28
- number: 0,
29
- angle: 0,
30
- string: '',
31
- password: '',
32
- textarea: '',
33
- checkbox: false,
34
- select: '',
35
- color: '#000000',
36
- 'solidcolor-stops': null,
37
- 'gradientcolor-stops': null,
38
- 'gltf-selector': '',
39
- 'image-selector': '',
40
- multiplecolor: null,
41
- editortable: null,
42
- imageselector: '',
43
- options: null,
44
- date: null
45
- }
46
-
47
- function convertValue(type: string, value: any) {
48
- var converted = String(value).trim() == '' ? undefined : value
49
- switch (type) {
50
- case 'number':
51
- case 'angle':
52
- converted = parseFloat(value)
53
- converted = isNaN(converted) ? undefined : converted
54
- break
55
- }
56
-
57
- return converted
58
- }
59
-
60
- export class SpecificPropertiesBuilder extends LitElement {
61
- @property({ type: Object }) value: any
62
- @property({ type: Array }) props: any[] = []
63
- @property({ type: Object }) propertyEditor: any
64
-
65
- render() {
66
- return html`<slot></slot>`
67
- }
68
-
69
- firstUpdated() {
70
- this.addEventListener('change', this._onValueChanged.bind(this))
71
- }
72
-
73
- updated(changes: PropertyValues<this>) {
74
- changes.has('props') && this._onPropsChanged(this.props)
75
- changes.has('value') && this._setValues()
76
- }
77
-
78
- _onPropsChanged(props: any[]) {
79
- this.textContent = ''
80
- ;(props || []).forEach((spec: PropertySpec) => {
81
- const { label, type, placeholder, name, observe, property, editor, quantifier, defaultValue, disabled } = spec
82
-
83
- let elementType = OxPropertyEditor.getEditor(type)
84
- if (!elementType) {
85
- console.warn('Property Editor not defined', type)
86
- return
87
- }
88
- let element = document.createElement(elementType) as OxPropertyEditor
89
-
90
- element.label = label
91
- element.type = type
92
- element.placeholder = placeholder
93
- element.name = name
94
- element.setAttribute('name', name)
95
-
96
- if (observe) {
97
- element.observeHandler = observe
98
- }
99
- element.property = property
100
- element.editor = editor
101
- element.quantifier = quantifier
102
- element.defaultValue = defaultValue
103
- element.setAttribute('property-editor', 'true')
104
- element.disabled = disabled
105
-
106
- this.appendChild(element)
107
- })
108
- }
109
-
110
- _setValues() {
111
- this.value &&
112
- Array.from(this.querySelectorAll('[name]')).forEach((prop: Properties) => {
113
- let name = prop.getAttribute('name')
114
- var convertedValue = convertValue(prop.type, this.value[name])
115
- if (convertedValue === undefined) convertedValue = (DEFAULT_VALUE as any)[prop.type]
116
- prop.value = convertedValue
117
- prop.observe.call(prop, prop.value)
118
- })
119
- }
120
-
121
- _onValueChanged(e: Event) {
122
- e.stopPropagation()
123
- var target = e.target as Element
124
-
125
- const prop = target.closest('[property-editor]') as OxPropertyEditor
126
-
127
- var name = prop.getAttribute('name')
128
- if (!name) {
129
- return
130
- }
131
-
132
- this.value[name] = prop.value
133
-
134
- prop.observe(prop.value)
135
- this._setValues()
136
-
137
- this.dispatchEvent(
138
- new CustomEvent('property-change', {
139
- bubbles: true,
140
- composed: true,
141
- detail: {
142
- [name]: prop.value
143
- }
144
- })
145
- )
146
- }
147
- }
@@ -1,81 +0,0 @@
1
- /**
2
- * @license Copyright © HatioLab Inc. All rights reserved.
3
- */
4
-
5
- import '@operato/help/ox-help-icon.js'
6
-
7
- import { css, html, LitElement } from 'lit'
8
- import { property } from 'lit/decorators.js'
9
-
10
- import { Component, Scene } from '@hatiolab/things-scene'
11
- import { ScopedElementsMixin } from '@open-wc/scoped-elements'
12
-
13
- import { i18next } from '@operato/i18n'
14
-
15
- import { PropertySharedStyle } from '../property-shared-style'
16
- import { SpecificPropertiesBuilder } from './specific-properties-builder.js'
17
-
18
- export class PropertySpecific extends ScopedElementsMixin(LitElement) {
19
- static styles = [
20
- PropertySharedStyle,
21
- css`
22
- label {
23
- display: block;
24
- margin: 10px;
25
-
26
- text-align: right;
27
- font: bold 14px var(--theme-font);
28
- color: var(--md-sys-color-on-primary-container);
29
- text-transform: uppercase;
30
- }
31
- `
32
- ]
33
-
34
- @property({ type: Object }) value: any
35
- @property({ type: Object }) scene: Scene | null = null
36
- @property({ type: Array }) selected: Component[] = []
37
- @property({ type: Array }) props: any[] = []
38
- @property({ type: Array }) propertyEditor: any[] = []
39
-
40
- private boundINeedSelected: any = this._onINeedSelected.bind(this)
41
-
42
- connectedCallback() {
43
- super.connectedCallback()
44
-
45
- this.addEventListener('i-need-selected', this.boundINeedSelected)
46
- }
47
-
48
- disconnectedCallback() {
49
- super.disconnectedCallback()
50
-
51
- this.removeEventListener('i-need-selected', this.boundINeedSelected)
52
- }
53
- static get scopedElements() {
54
- return {
55
- 'property-specific-properties-builder': SpecificPropertiesBuilder
56
- }
57
- }
58
- render() {
59
- const selected = this.selected && this.selected[0]
60
- const value = this.value || {}
61
-
62
- return html`
63
- <label
64
- >${i18next.t(`component.${value.type}`)}<ox-help-icon .topic=${selected?.nature?.help}></ox-help-icon
65
- ></label>
66
-
67
- <property-specific-properties-builder .value=${value} .props=${this.props} .propertyEditor=${this.propertyEditor}>
68
- </property-specific-properties-builder>
69
- `
70
- }
71
-
72
- _onINeedSelected(e: CustomEvent) {
73
- e.stopPropagation()
74
-
75
- var { callback } = e.detail
76
-
77
- this.scene!.undoableChange(() => {
78
- callback.call(null, this.selected)
79
- })
80
- }
81
- }