@operato/property-panel 9.0.0-beta.14

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 (156) hide show
  1. package/.editorconfig +29 -0
  2. package/.storybook/main.js +5 -0
  3. package/.storybook/preview.js +52 -0
  4. package/.storybook/server.mjs +8 -0
  5. package/CHANGELOG.md +11 -0
  6. package/LICENSE +21 -0
  7. package/README.md +76 -0
  8. package/demo/index.html +30 -0
  9. package/dist/src/graphql/board.d.ts +6 -0
  10. package/dist/src/graphql/board.js +130 -0
  11. package/dist/src/graphql/board.js.map +1 -0
  12. package/dist/src/graphql/data-subscription.d.ts +5 -0
  13. package/dist/src/graphql/data-subscription.js +24 -0
  14. package/dist/src/graphql/data-subscription.js.map +1 -0
  15. package/dist/src/graphql/favorite-board.d.ts +1 -0
  16. package/dist/src/graphql/favorite-board.js +23 -0
  17. package/dist/src/graphql/favorite-board.js.map +1 -0
  18. package/dist/src/graphql/group.d.ts +7 -0
  19. package/dist/src/graphql/group.js +125 -0
  20. package/dist/src/graphql/group.js.map +1 -0
  21. package/dist/src/graphql/index.d.ts +4 -0
  22. package/dist/src/graphql/index.js +5 -0
  23. package/dist/src/graphql/index.js.map +1 -0
  24. package/dist/src/graphql/play-group.d.ts +13 -0
  25. package/dist/src/graphql/play-group.js +205 -0
  26. package/dist/src/graphql/play-group.js.map +1 -0
  27. package/dist/src/graphql/scenario.d.ts +6 -0
  28. package/dist/src/graphql/scenario.js +69 -0
  29. package/dist/src/graphql/scenario.js.map +1 -0
  30. package/dist/src/index.d.ts +7 -0
  31. package/dist/src/index.js +8 -0
  32. package/dist/src/index.js.map +1 -0
  33. package/dist/src/ox-property-panel.d.ts +46 -0
  34. package/dist/src/ox-property-panel.js +346 -0
  35. package/dist/src/ox-property-panel.js.map +1 -0
  36. package/dist/src/property-panel/abstract-property.d.ts +10 -0
  37. package/dist/src/property-panel/abstract-property.js +53 -0
  38. package/dist/src/property-panel/abstract-property.js.map +1 -0
  39. package/dist/src/property-panel/data-binding/data-binding-mapper.d.ts +58 -0
  40. package/dist/src/property-panel/data-binding/data-binding-mapper.js +380 -0
  41. package/dist/src/property-panel/data-binding/data-binding-mapper.js.map +1 -0
  42. package/dist/src/property-panel/data-binding/data-binding-value-map.d.ts +6 -0
  43. package/dist/src/property-panel/data-binding/data-binding-value-map.js +20 -0
  44. package/dist/src/property-panel/data-binding/data-binding-value-map.js.map +1 -0
  45. package/dist/src/property-panel/data-binding/data-binding-value-range.d.ts +6 -0
  46. package/dist/src/property-panel/data-binding/data-binding-value-range.js +20 -0
  47. package/dist/src/property-panel/data-binding/data-binding-value-range.js.map +1 -0
  48. package/dist/src/property-panel/data-binding/data-binding.d.ts +44 -0
  49. package/dist/src/property-panel/data-binding/data-binding.js +442 -0
  50. package/dist/src/property-panel/data-binding/data-binding.js.map +1 -0
  51. package/dist/src/property-panel/effects/effects.d.ts +24 -0
  52. package/dist/src/property-panel/effects/effects.js +72 -0
  53. package/dist/src/property-panel/effects/effects.js.map +1 -0
  54. package/dist/src/property-panel/effects/property-animation.d.ts +23 -0
  55. package/dist/src/property-panel/effects/property-animation.js +147 -0
  56. package/dist/src/property-panel/effects/property-animation.js.map +1 -0
  57. package/dist/src/property-panel/effects/property-animations.d.ts +22 -0
  58. package/dist/src/property-panel/effects/property-animations.js +70 -0
  59. package/dist/src/property-panel/effects/property-animations.js.map +1 -0
  60. package/dist/src/property-panel/effects/property-event-hover.d.ts +21 -0
  61. package/dist/src/property-panel/effects/property-event-hover.js +193 -0
  62. package/dist/src/property-panel/effects/property-event-hover.js.map +1 -0
  63. package/dist/src/property-panel/effects/property-event-tap.d.ts +36 -0
  64. package/dist/src/property-panel/effects/property-event-tap.js +262 -0
  65. package/dist/src/property-panel/effects/property-event-tap.js.map +1 -0
  66. package/dist/src/property-panel/effects/property-event.d.ts +22 -0
  67. package/dist/src/property-panel/effects/property-event.js +64 -0
  68. package/dist/src/property-panel/effects/property-event.js.map +1 -0
  69. package/dist/src/property-panel/effects/property-shadow.d.ts +23 -0
  70. package/dist/src/property-panel/effects/property-shadow.js +66 -0
  71. package/dist/src/property-panel/effects/property-shadow.js.map +1 -0
  72. package/dist/src/property-panel/effects/value-converter.d.ts +1 -0
  73. package/dist/src/property-panel/effects/value-converter.js +17 -0
  74. package/dist/src/property-panel/effects/value-converter.js.map +1 -0
  75. package/dist/src/property-panel/inspector/inspector.d.ts +27 -0
  76. package/dist/src/property-panel/inspector/inspector.js +357 -0
  77. package/dist/src/property-panel/inspector/inspector.js.map +1 -0
  78. package/dist/src/property-panel/shapes/shapes.d.ts +26 -0
  79. package/dist/src/property-panel/shapes/shapes.js +312 -0
  80. package/dist/src/property-panel/shapes/shapes.js.map +1 -0
  81. package/dist/src/property-panel/specifics/specific-properties-builder.d.ts +16 -0
  82. package/dist/src/property-panel/specifics/specific-properties-builder.js +138 -0
  83. package/dist/src/property-panel/specifics/specific-properties-builder.js.map +1 -0
  84. package/dist/src/property-panel/specifics/specifics.d.ts +25 -0
  85. package/dist/src/property-panel/specifics/specifics.js +84 -0
  86. package/dist/src/property-panel/specifics/specifics.js.map +1 -0
  87. package/dist/src/property-panel/styles/styles.d.ts +23 -0
  88. package/dist/src/property-panel/styles/styles.js +269 -0
  89. package/dist/src/property-panel/styles/styles.js.map +1 -0
  90. package/dist/src/types.d.ts +43 -0
  91. package/dist/src/types.js +2 -0
  92. package/dist/src/types.js.map +1 -0
  93. package/dist/stories/index.stories.d.ts +22 -0
  94. package/dist/stories/index.stories.js +121 -0
  95. package/dist/stories/index.stories.js.map +1 -0
  96. package/dist/stories/input-table-property.stories.d.ts +21 -0
  97. package/dist/stories/input-table-property.stories.js +84 -0
  98. package/dist/stories/input-table-property.stories.js.map +1 -0
  99. package/dist/test/ox-property-panel.test.d.ts +1 -0
  100. package/dist/test/ox-property-panel.test.js +24 -0
  101. package/dist/test/ox-property-panel.test.js.map +1 -0
  102. package/dist/tsconfig.tsbuildinfo +1 -0
  103. package/package.json +108 -0
  104. package/src/graphql/board.ts +144 -0
  105. package/src/graphql/data-subscription.ts +30 -0
  106. package/src/graphql/favorite-board.ts +25 -0
  107. package/src/graphql/group.ts +138 -0
  108. package/src/graphql/index.ts +4 -0
  109. package/src/graphql/play-group.ts +225 -0
  110. package/src/graphql/scenario.ts +79 -0
  111. package/src/index.ts +8 -0
  112. package/src/ox-property-panel.ts +347 -0
  113. package/src/property-panel/abstract-property.ts +67 -0
  114. package/src/property-panel/data-binding/data-binding-mapper.ts +412 -0
  115. package/src/property-panel/data-binding/data-binding-value-map.ts +19 -0
  116. package/src/property-panel/data-binding/data-binding-value-range.ts +19 -0
  117. package/src/property-panel/data-binding/data-binding.ts +464 -0
  118. package/src/property-panel/effects/effects.ts +77 -0
  119. package/src/property-panel/effects/property-animation.ts +155 -0
  120. package/src/property-panel/effects/property-animations.ts +74 -0
  121. package/src/property-panel/effects/property-event-hover.ts +212 -0
  122. package/src/property-panel/effects/property-event-tap.ts +269 -0
  123. package/src/property-panel/effects/property-event.ts +73 -0
  124. package/src/property-panel/effects/property-shadow.ts +77 -0
  125. package/src/property-panel/effects/value-converter.ts +17 -0
  126. package/src/property-panel/inspector/inspector.ts +407 -0
  127. package/src/property-panel/shapes/shapes.ts +321 -0
  128. package/src/property-panel/specifics/specific-properties-builder.ts +152 -0
  129. package/src/property-panel/specifics/specifics.ts +81 -0
  130. package/src/property-panel/styles/styles.ts +287 -0
  131. package/src/types.ts +63 -0
  132. package/stories/index.stories.ts +134 -0
  133. package/stories/input-table-property.stories.ts +96 -0
  134. package/test/ox-property-panel.test.ts +32 -0
  135. package/themes/app-theme.css +138 -0
  136. package/themes/calendar-theme.css +61 -0
  137. package/themes/dark.css +51 -0
  138. package/themes/grist-theme.css +175 -0
  139. package/themes/help-theme.css +57 -0
  140. package/themes/layout-theme.css +94 -0
  141. package/themes/light.css +51 -0
  142. package/themes/material-theme.css +23 -0
  143. package/themes/md-typescale-styles.css +100 -0
  144. package/themes/oops-theme.css +22 -0
  145. package/themes/report-theme.css +47 -0
  146. package/themes/spacing.css +23 -0
  147. package/themes/state-color.css +6 -0
  148. package/themes/tooltip-theme.css +11 -0
  149. package/translations/en.json +723 -0
  150. package/translations/ja.json +727 -0
  151. package/translations/ko.json +727 -0
  152. package/translations/ms.json +609 -0
  153. package/translations/zh.json +726 -0
  154. package/tsconfig.json +25 -0
  155. package/web-dev-server.config.mjs +27 -0
  156. package/web-test-runner.config.mjs +41 -0
@@ -0,0 +1,412 @@
1
+ /**
2
+ * @license Copyright © HatioLab Inc. All rights reserved.
3
+ */
4
+
5
+ import '@operato/input/ox-buttons-radio.js'
6
+ import '@operato/input/ox-input-code.js'
7
+ import '@operato/i18n/ox-i18n.js'
8
+ import '@operato/help/ox-help-icon.js'
9
+ import './data-binding-value-map.js'
10
+ import './data-binding-value-range.js'
11
+
12
+ import { css, html, LitElement, PropertyValues } from 'lit'
13
+ import { property, query, state } from 'lit/decorators.js'
14
+
15
+ import { Properties, Scene } from '@hatiolab/things-scene'
16
+ import { PropertyGridStyles } from '@operato/styles/property-grid-styles.js'
17
+
18
+ export type Rule =
19
+ | {
20
+ map?: Properties
21
+ range?: Properties[]
22
+ eval?: string
23
+ }
24
+ | any
25
+
26
+ export type Mapping = {
27
+ source?: string
28
+ rule: 'map' | 'range' | 'eval' | 'value'
29
+ accessor?: string
30
+ target?: string
31
+ property?: string
32
+ param?: Rule
33
+ ndnsp?: boolean
34
+ partial?: boolean
35
+ }
36
+
37
+ /**
38
+ element for mapping data value editing
39
+
40
+ Example:
41
+
42
+ <data-binding-mapper mapping=${mapping}>
43
+ </data-binding-mapper>
44
+ */
45
+
46
+ export class DataBindingMapper extends LitElement {
47
+ static styles = [
48
+ PropertyGridStyles,
49
+ css`
50
+ :host {
51
+ display: flex;
52
+ overflow: hidden;
53
+ padding: 7px 0 0 0;
54
+ border: 1px solid rgba(0, 0, 0, 0.2);
55
+ border-width: 0 1px 1px 1px;
56
+ padding: 4px;
57
+ line-height: 2;
58
+ }
59
+
60
+ select {
61
+ height: 22px;
62
+ }
63
+
64
+ [mapping-rule] {
65
+ display: flex;
66
+ }
67
+
68
+ [mapping-rule] * {
69
+ flex: auto;
70
+ margin: 0;
71
+ text-align: left;
72
+ align-self: center;
73
+ }
74
+
75
+ [rule-editors] {
76
+ display: 'flex';
77
+ align-content: auto;
78
+ }
79
+
80
+ [rule-editors] :not([active]) {
81
+ display: none;
82
+ }
83
+
84
+ ox-input-code {
85
+ height: 300px;
86
+ overflow: auto;
87
+ }
88
+ `
89
+ ]
90
+
91
+ @property({ type: Object }) mapping: Mapping = {
92
+ rule: 'value'
93
+ }
94
+ @property({ type: Object }) rule: Rule = {}
95
+ @property({ type: Array }) properties: Properties[] = []
96
+ @property({ type: Object }) scene?: Scene
97
+
98
+ @state() _valueTypes: any = {
99
+ play: 'boolean',
100
+ hidden: 'boolean',
101
+ started: 'boolean',
102
+
103
+ rotation: 'number',
104
+ value: 'number',
105
+
106
+ fillStyle: 'color',
107
+ strokeStyle: 'color',
108
+ fontColor: 'color',
109
+
110
+ data: 'object',
111
+ source: 'attachment',
112
+ location: 'object',
113
+ dimension: 'object',
114
+
115
+ text: 'string',
116
+ ref: 'string'
117
+ }
118
+ @state() _componentIds: { value: string; description: string }[] = []
119
+
120
+ @query('#eval-editor') editor!: HTMLInputElement
121
+ @query('#source-input') source!: HTMLInputElement
122
+ @query('#target-input') target!: HTMLInputElement
123
+
124
+ firstUpdated() {
125
+ this.renderRoot.addEventListener('change', e => this._onChange(e))
126
+ }
127
+
128
+ updated(changes: PropertyValues<this>) {
129
+ changes.has('mapping') && this._onChangedMapping()
130
+ }
131
+
132
+ findComponentIds() {
133
+ this._componentIds =
134
+ (this.scene &&
135
+ this.scene.ids.map(i => {
136
+ const id = i.key
137
+ return { value: `#${id}`, description: this.scene!.findById(id)?.get('type') }
138
+ })) ||
139
+ []
140
+ }
141
+
142
+ render() {
143
+ const mapping = this.mapping || {
144
+ rule: 'value'
145
+ }
146
+
147
+ return html`
148
+ <div class="property-grid">
149
+ <label for="source-input"> <ox-i18n msgid="label.source">source</ox-i18n> </label>
150
+ <input
151
+ id="source-input"
152
+ type="text"
153
+ value-key="source"
154
+ list="source-list"
155
+ .value=${mapping.source || ''}
156
+ @focusin=${() => this.findComponentIds()}
157
+ />
158
+
159
+ <label for="accessor-input">
160
+ <ox-i18n msgid="label.accessor">accessor</ox-i18n
161
+ ><ox-help-icon topic="board-modeller/accessor"></ox-help-icon>
162
+ </label>
163
+ <input
164
+ id="accessor-input"
165
+ value-key="accessor"
166
+ type="text"
167
+ data-mapping-accessor
168
+ .value=${mapping.accessor || ''}
169
+ />
170
+
171
+ <label for="target-input"> <ox-i18n msgid="label.target">target</ox-i18n> </label>
172
+ <input
173
+ id="target-input"
174
+ type="text"
175
+ value-key="target"
176
+ list="target-list"
177
+ .value=${mapping.target || ''}
178
+ @focusin=${() => this.findComponentIds()}
179
+ />
180
+
181
+ <datalist id="source-list">
182
+ <option value="(self)"></option>
183
+ ${this._componentIds.length
184
+ ? html`
185
+ ${this._componentIds.map(
186
+ ({ value, description }) => html` <option value=${value}>${description}</option> `
187
+ )}
188
+ `
189
+ : html``}
190
+ </datalist>
191
+
192
+ <datalist id="target-list">
193
+ <option value="(self)"></option>
194
+ <option value="(children)"></option>
195
+ <option value="(key)"></option>
196
+ <option value="[propkey]"></option>
197
+ ${this._componentIds.length
198
+ ? html`
199
+ ${this._componentIds.map(
200
+ ({ value, description }) => html` <option value=${value}>${description}</option> `
201
+ )}
202
+ `
203
+ : html``}
204
+ </datalist>
205
+
206
+ <label for="property-input">
207
+ <ox-i18n msgid="label.property">property</ox-i18n
208
+ ><ox-help-icon topic="board-modeller/data-binding-property"></ox-help-icon
209
+ ></label>
210
+ <select id="property-input" value-key="property" .value=${mapping.property || ''}>
211
+ ${this.properties.map(
212
+ item => html`
213
+ <option .value=${item.name} ?selected=${item.name == mapping.property}>${item.label}</option>
214
+ `
215
+ )}
216
+ </select>
217
+
218
+ <label> <ox-i18n msgid="label.rule-type">rule type</ox-i18n> </label>
219
+ <ox-buttons-radio .value=${mapping.rule} @change=${(e: Event) => this._onChangeRule(e)}>
220
+ <div data-value="value"><ox-i18n msgid="label.value"></ox-i18n></div>
221
+ <div data-value="map"><ox-i18n msgid="label.map"></ox-i18n></div>
222
+ <div data-value="range"><ox-i18n msgid="label.range"></ox-i18n></div>
223
+ <div data-value="eval"><ox-i18n msgid="label.eval"></ox-i18n></div>
224
+ </ox-buttons-radio>
225
+
226
+ <div class="property-full-bleed" rule-editors ?hidden=${mapping.rule == 'value'}>
227
+ <data-binding-value-map
228
+ value-key="map"
229
+ .value=${this.rule.map || {}}
230
+ .valuetype=${this._valuetype(mapping.property!)}
231
+ ?active=${mapping.rule == 'map'}
232
+ >
233
+ </data-binding-value-map>
234
+
235
+ <data-binding-value-range
236
+ value-key="range"
237
+ .value=${this.rule.range || []}
238
+ .valuetype=${this._valuetype(mapping.property!)}
239
+ ?active=${mapping.rule == 'range'}
240
+ >
241
+ </data-binding-value-range>
242
+
243
+ <ox-input-code
244
+ class="property-full-bleed"
245
+ value-key="eval"
246
+ id="eval-editor"
247
+ .value=${this.rule.eval || ''}
248
+ ?active=${mapping.rule == 'eval'}
249
+ language="javascript"
250
+ >
251
+ </ox-input-code>
252
+ </div>
253
+
254
+ <input id="checkbox-partial" type="checkbox" value-key="partial" .checked=${mapping.partial === true} />
255
+ <label for="checkbox-partial"> <ox-i18n msgid="label.partial-spreading">Partial Spreading</ox-i18n> </label>
256
+
257
+ <input id="checkbox-ndnsp" type="checkbox" value-key="ndnsp" .checked=${mapping.ndnsp === true} />
258
+ <label for="checkbox-ndnsp"> <ox-i18n msgid="label.ndnsp">No Data No Spreading</ox-i18n> </label>
259
+ </div>
260
+ `
261
+ }
262
+
263
+ _valuetype(property: string) {
264
+ return this._valueTypes[property] || 'string'
265
+ }
266
+
267
+ private _keep_saved_rule_params: boolean = false
268
+
269
+ async _onChangedMapping() {
270
+ if (this._keep_saved_rule_params) {
271
+ this._keep_saved_rule_params = false
272
+ } else {
273
+ await this.updateComplete
274
+
275
+ var rule: Rule = {}
276
+
277
+ if (this.mapping) {
278
+ switch (this.mapping.rule) {
279
+ case 'map':
280
+ rule.map = this.mapping.param || {}
281
+ break
282
+ case 'range':
283
+ rule.range = this.mapping.param || []
284
+ break
285
+ case 'eval':
286
+ rule.eval = this.mapping.param || ''
287
+ break
288
+ default:
289
+ this.mapping.rule = 'value'
290
+ break
291
+ }
292
+ }
293
+
294
+ this.rule = rule
295
+ this.requestUpdate()
296
+ }
297
+ }
298
+
299
+ _onChangeRule(e: Event) {
300
+ var element = e.target as HTMLInputElement
301
+ var value = element.value
302
+
303
+ let param
304
+
305
+ switch (value) {
306
+ case 'map':
307
+ param = this.rule.map
308
+ break
309
+ case 'range':
310
+ param = this.rule.range
311
+ break
312
+ case 'eval':
313
+ param = this.rule.eval || ''
314
+
315
+ // rule.eval에 값이 없을 때, ace-editor 내용이 초기화되지 않는 문제때문에 처리함.
316
+ if (!param) {
317
+ this.editor.value = 'return'
318
+ }
319
+ break
320
+ default:
321
+ }
322
+
323
+ this.mapping = {
324
+ ...this.mapping,
325
+ rule: value as 'value' | 'map' | 'range' | 'eval',
326
+ param
327
+ }
328
+
329
+ this._keep_saved_rule_params = true
330
+ this.dispatchEvent(new CustomEvent('value-change', { bubbles: true, composed: true }))
331
+ }
332
+
333
+ _onChange(e: Event) {
334
+ var element = e.target as HTMLInputElement
335
+ var key = element.getAttribute('value-key')
336
+
337
+ if (!key) return
338
+
339
+ var value: string | boolean = element.value
340
+
341
+ if (key === 'source') {
342
+ if (value.length > 0) {
343
+ value = value.trim()
344
+
345
+ this.source.value = value
346
+ }
347
+
348
+ this.mapping = {
349
+ ...this.mapping,
350
+ source: value
351
+ }
352
+ } else if (key === 'target') {
353
+ if (value.length > 0 && !/^[.#(\[]/.test(value)) {
354
+ value = '#' + value.trim()
355
+
356
+ this.target.value = value
357
+ }
358
+
359
+ this.mapping = {
360
+ ...this.mapping,
361
+ target: value
362
+ }
363
+ } else if (key === 'accessor') {
364
+ this.mapping = {
365
+ ...this.mapping,
366
+ accessor: (value || '').trim()
367
+ }
368
+ } else if (key === 'property') {
369
+ this.mapping = {
370
+ ...this.mapping,
371
+ property: (value || '').trim()
372
+ }
373
+ } else if (key === 'map' || key === 'range' || key === 'eval') {
374
+ this.rule[key] = value
375
+ this.mapping = {
376
+ ...this.mapping,
377
+ param: value
378
+ }
379
+ } else if (key === 'ndnsp' /* no data no spreading */) {
380
+ value = element.checked
381
+
382
+ this.mapping = {
383
+ ...this.mapping,
384
+ ndnsp: value
385
+ }
386
+ } else if (key === 'partial' /* partial spreading */) {
387
+ value = element.checked
388
+
389
+ this.mapping = {
390
+ ...this.mapping,
391
+ partial: value
392
+ }
393
+ }
394
+
395
+ if (!this.mapping.rule) {
396
+ this.mapping.rule = 'value'
397
+ }
398
+
399
+ this._keep_saved_rule_params = true
400
+ this.dispatchEvent(
401
+ new CustomEvent('value-change', {
402
+ bubbles: true,
403
+ composed: true,
404
+ detail: {
405
+ changed: {
406
+ [key]: value
407
+ }
408
+ }
409
+ })
410
+ )
411
+ }
412
+ }
@@ -0,0 +1,19 @@
1
+ import { html } from 'lit'
2
+ import { customElement } from 'lit/decorators.js'
3
+ import { ifDefined } from 'lit/directives/if-defined.js'
4
+
5
+ import { OxInputValueMap } from '@operato/input'
6
+
7
+ import '@operato/attachment/ox-attachment-selector.js'
8
+
9
+ @customElement('data-binding-value-map')
10
+ export class DataBindingValueMap extends OxInputValueMap {
11
+ static styles = OxInputValueMap.styles
12
+
13
+ valueInputTemplate(value?: any) {
14
+ if (this.valuetype == 'attachment') {
15
+ return html`<ox-attachment-selector data-value value=${ifDefined(value)}></ox-attachment-selector>`
16
+ }
17
+ return super.valueInputTemplate(value)
18
+ }
19
+ }
@@ -0,0 +1,19 @@
1
+ import { html } from 'lit'
2
+ import { customElement } from 'lit/decorators.js'
3
+ import { ifDefined } from 'lit/directives/if-defined.js'
4
+
5
+ import { OxInputValueRange } from '@operato/input'
6
+
7
+ import '@operato/attachment/ox-attachment-selector.js'
8
+
9
+ @customElement('data-binding-value-range')
10
+ export class DataBindingValueRange extends OxInputValueRange {
11
+ static styles = OxInputValueRange.styles
12
+
13
+ valueInputTemplate(value?: any) {
14
+ if (this.valuetype == 'attachment') {
15
+ return html`<ox-attachment-selector data-value value=${ifDefined(value)}></ox-attachment-selector>`
16
+ }
17
+ return super.valueInputTemplate(value)
18
+ }
19
+ }