@operato/property-editor 0.4.2 → 1.0.0-alpha.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.
- package/@types/global/index.d.ts +2 -0
- package/CHANGELOG.md +98 -0
- package/demo/index.html +137 -2
- package/dist/src/index.d.ts +2 -1
- package/dist/src/index.js +2 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/ox-properties-dynamic-view.d.ts +4 -0
- package/dist/src/ox-properties-dynamic-view.js +118 -0
- package/dist/src/ox-properties-dynamic-view.js.map +1 -0
- package/dist/src/ox-property-editor-angle.d.ts +5 -0
- package/dist/src/ox-property-editor-angle.js +17 -0
- package/dist/src/ox-property-editor-angle.js.map +1 -0
- package/dist/src/ox-property-editor-checkbox.d.ts +6 -0
- package/dist/src/ox-property-editor-checkbox.js +18 -0
- package/dist/src/ox-property-editor-checkbox.js.map +1 -0
- package/dist/src/ox-property-editor-color.d.ts +5 -0
- package/dist/src/ox-property-editor-color.js +23 -0
- package/dist/src/ox-property-editor-color.js.map +1 -0
- package/dist/src/ox-property-editor-data.d.ts +5 -0
- package/dist/src/ox-property-editor-data.js +15 -0
- package/dist/src/ox-property-editor-data.js.map +1 -0
- package/dist/src/ox-property-editor-date.d.ts +4 -0
- package/dist/src/ox-property-editor-date.js +14 -0
- package/dist/src/ox-property-editor-date.js.map +1 -0
- package/dist/src/ox-property-editor-file.d.ts +5 -0
- package/dist/src/ox-property-editor-file.js +17 -0
- package/dist/src/ox-property-editor-file.js.map +1 -0
- package/dist/src/ox-property-editor-gradient-colorstops.d.ts +5 -0
- package/dist/src/ox-property-editor-gradient-colorstops.js +25 -0
- package/dist/src/ox-property-editor-gradient-colorstops.js.map +1 -0
- package/dist/src/ox-property-editor-image.d.ts +5 -0
- package/dist/src/ox-property-editor-image.js +16 -0
- package/dist/src/ox-property-editor-image.js.map +1 -0
- package/dist/src/ox-property-editor-legend.d.ts +4 -0
- package/dist/src/ox-property-editor-legend.js +14 -0
- package/dist/src/ox-property-editor-legend.js.map +1 -0
- package/dist/src/ox-property-editor-multiple-colors.d.ts +5 -0
- package/dist/src/ox-property-editor-multiple-colors.js +15 -0
- package/dist/src/ox-property-editor-multiple-colors.js.map +1 -0
- package/dist/src/ox-property-editor-number.d.ts +5 -0
- package/dist/src/ox-property-editor-number.js +28 -0
- package/dist/src/ox-property-editor-number.js.map +1 -0
- package/dist/src/ox-property-editor-options.d.ts +5 -0
- package/dist/src/ox-property-editor-options.js +15 -0
- package/dist/src/ox-property-editor-options.js.map +1 -0
- package/dist/src/ox-property-editor-password.d.ts +4 -0
- package/dist/src/ox-property-editor-password.js +14 -0
- package/dist/src/ox-property-editor-password.js.map +1 -0
- package/dist/src/ox-property-editor-range.d.ts +5 -0
- package/dist/src/ox-property-editor-range.js +18 -0
- package/dist/src/ox-property-editor-range.js.map +1 -0
- package/dist/src/ox-property-editor-scene-component-id.d.ts +5 -0
- package/dist/src/ox-property-editor-scene-component-id.js +21 -0
- package/dist/src/ox-property-editor-scene-component-id.js.map +1 -0
- package/dist/src/ox-property-editor-select.d.ts +16 -0
- package/dist/src/ox-property-editor-select.js +66 -0
- package/dist/src/ox-property-editor-select.js.map +1 -0
- package/dist/src/ox-property-editor-solid-colorstops.d.ts +5 -0
- package/dist/src/ox-property-editor-solid-colorstops.js +25 -0
- package/dist/src/ox-property-editor-solid-colorstops.js.map +1 -0
- package/dist/src/ox-property-editor-string.d.ts +4 -0
- package/dist/src/ox-property-editor-string.js +14 -0
- package/dist/src/ox-property-editor-string.js.map +1 -0
- package/dist/src/ox-property-editor-textarea.d.ts +5 -0
- package/dist/src/ox-property-editor-textarea.js +26 -0
- package/dist/src/ox-property-editor-textarea.js.map +1 -0
- package/dist/src/ox-property-editor.d.ts +1 -0
- package/dist/src/ox-property-editor.js +41 -5
- package/dist/src/ox-property-editor.js.map +1 -1
- package/dist/src/types.d.ts +8 -0
- package/dist/src/types.js +2 -0
- package/dist/src/types.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +28 -4
- package/src/index.ts +2 -1
- package/src/ox-properties-dynamic-view.ts +130 -0
- package/src/ox-property-editor-angle.ts +14 -0
- package/src/ox-property-editor-checkbox.ts +16 -0
- package/src/ox-property-editor-color.ts +20 -0
- package/src/ox-property-editor-data.ts +12 -0
- package/src/ox-property-editor-date.ts +10 -0
- package/src/ox-property-editor-file.ts +14 -0
- package/src/ox-property-editor-gradient-colorstops.ts +22 -0
- package/src/ox-property-editor-image.ts +13 -0
- package/src/ox-property-editor-legend.ts +10 -0
- package/src/ox-property-editor-multiple-colors.ts +12 -0
- package/src/ox-property-editor-number.ts +26 -0
- package/src/ox-property-editor-options.ts +12 -0
- package/src/ox-property-editor-password.ts +10 -0
- package/src/ox-property-editor-range.ts +16 -0
- package/src/ox-property-editor-scene-component-id.ts +18 -0
- package/src/ox-property-editor-select.ts +73 -0
- package/src/ox-property-editor-solid-colorstops.ts +22 -0
- package/src/ox-property-editor-string.ts +10 -0
- package/src/ox-property-editor-textarea.ts +22 -0
- package/src/ox-property-editor.ts +43 -5
- package/src/types.ts +8 -0
- package/translations/en.json +3 -0
- package/translations/ko.json +3 -0
- package/translations/ms.json +3 -0
- package/translations/zh.json +3 -0
- package/tsconfig.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,104 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.0.0-alpha.10](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.9...v1.0.0-alpha.10) (2022-03-12)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @operato/property-editor
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [1.0.0-alpha.9](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.8...v1.0.0-alpha.9) (2022-03-12)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### :rocket: New Features
|
|
18
|
+
|
|
19
|
+
* settled concept for input, property-editor, grist-editor, so on ([0c9e1d0](https://github.com/hatiolab/operato/commit/0c9e1d054c7aef5d965868242cf471667af7a3c3))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
## [1.0.0-alpha.8](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.7...v1.0.0-alpha.8) (2022-03-11)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
### :bug: Bug Fix
|
|
27
|
+
|
|
28
|
+
* ox-property-editor-checkbox fault ([7e54318](https://github.com/hatiolab/operato/commit/7e54318b6a350782113e18d01ce7999c1e95fe47))
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
## [1.0.0-alpha.7](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.6...v1.0.0-alpha.7) (2022-03-11)
|
|
33
|
+
|
|
34
|
+
**Note:** Version bump only for package @operato/property-editor
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
## [1.0.0-alpha.6](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.5...v1.0.0-alpha.6) (2022-03-11)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
### :bug: Bug Fix
|
|
44
|
+
|
|
45
|
+
* ox-property-editor package.json missing ([ee8d0f8](https://github.com/hatiolab/operato/commit/ee8d0f8634e7f701b322981b8194442cdc2ebed1))
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
## [1.0.0-alpha.5](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.4...v1.0.0-alpha.5) (2022-03-11)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
### :bug: Bug Fix
|
|
53
|
+
|
|
54
|
+
* migrate parameter-editor from things-factory ([019a30d](https://github.com/hatiolab/operato/commit/019a30df6fd4c8a273d4194d13f5784ed6f8d956))
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
### :rocket: New Features
|
|
58
|
+
|
|
59
|
+
* migrate property-editor from things-factory ([272cdaa](https://github.com/hatiolab/operato/commit/272cdaafd74f3c3c597403f88655cb5cf4a81313))
|
|
60
|
+
* migrated property-editors from things-factory ([9d0b73a](https://github.com/hatiolab/operato/commit/9d0b73a8c05187e7ca8db874ddde8c977ec52a55))
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
## [1.0.0-alpha.4](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.3...v1.0.0-alpha.4) (2022-03-11)
|
|
65
|
+
|
|
66
|
+
**Note:** Version bump only for package @operato/property-editor
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
## [1.0.0-alpha.3](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.2...v1.0.0-alpha.3) (2022-03-10)
|
|
73
|
+
|
|
74
|
+
**Note:** Version bump only for package @operato/property-editor
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
## [1.0.0-alpha.2](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.1...v1.0.0-alpha.2) (2022-03-10)
|
|
81
|
+
|
|
82
|
+
**Note:** Version bump only for package @operato/property-editor
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
## [1.0.0-alpha.1](https://github.com/hatiolab/operato/compare/v0.4.3...v1.0.0-alpha.1) (2022-03-09)
|
|
89
|
+
|
|
90
|
+
**Note:** Version bump only for package @operato/property-editor
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
### [0.4.3](https://github.com/hatiolab/operato/compare/v0.4.2...v0.4.3) (2022-03-06)
|
|
97
|
+
|
|
98
|
+
**Note:** Version bump only for package @operato/property-editor
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
6
104
|
### [0.4.2](https://github.com/hatiolab/operato/compare/v0.4.1...v0.4.2) (2022-03-06)
|
|
7
105
|
|
|
8
106
|
**Note:** Version bump only for package @operato/property-editor
|
package/demo/index.html
CHANGED
|
@@ -20,16 +20,151 @@
|
|
|
20
20
|
height: 100vh;
|
|
21
21
|
}
|
|
22
22
|
</style>
|
|
23
|
+
|
|
24
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/web-animations/2.3.2/web-animations-next-lite.min.js"></script>
|
|
25
|
+
|
|
23
26
|
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500" rel="stylesheet" />
|
|
24
27
|
<link href="https://fonts.googleapis.com/css?family=Material+Icons&display=block" rel="stylesheet" />
|
|
25
28
|
</head>
|
|
26
29
|
<body>
|
|
27
30
|
<div id="demo"></div>
|
|
31
|
+
|
|
28
32
|
<script type="module">
|
|
29
33
|
import { html, render } from 'lit'
|
|
30
|
-
import '
|
|
34
|
+
import '@operato/i18n/ox-i18n.js'
|
|
35
|
+
|
|
36
|
+
import '../dist/src/ox-property-editor-angle.js'
|
|
37
|
+
import '../dist/src/ox-property-editor-checkbox.js'
|
|
38
|
+
import '../dist/src/ox-property-editor-color.js'
|
|
39
|
+
import '../dist/src/ox-property-editor-date.js'
|
|
40
|
+
import '../dist/src/ox-property-editor-legend.js'
|
|
41
|
+
import '../dist/src/ox-property-editor-number.js'
|
|
42
|
+
import '../dist/src/ox-property-editor-password.js'
|
|
43
|
+
import '../dist/src/ox-property-editor-range.js'
|
|
44
|
+
import '../dist/src/ox-property-editor-select.js'
|
|
45
|
+
import '../dist/src/ox-property-editor-string.js'
|
|
46
|
+
import '../dist/src/ox-property-editor-image.js'
|
|
47
|
+
import '../dist/src/ox-property-editor-file.js'
|
|
48
|
+
import '../dist/src/ox-property-editor-multiple-colors.js'
|
|
49
|
+
// import '../dist/src/ox-property-editor-textarea.js'
|
|
50
|
+
// import '../dist/src/ox-property-editor-options.js'
|
|
51
|
+
|
|
52
|
+
import '../dist/src/ox-properties-dynamic-view.js'
|
|
53
|
+
|
|
54
|
+
const properties = [
|
|
55
|
+
{
|
|
56
|
+
type: 'string',
|
|
57
|
+
label: 'ABC',
|
|
58
|
+
name: 'ABC'
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
type: 'password',
|
|
62
|
+
label: 'PWD',
|
|
63
|
+
name: 'PWD'
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
type: 'select',
|
|
67
|
+
label: 'SLT',
|
|
68
|
+
name: 'SLT',
|
|
69
|
+
property: {
|
|
70
|
+
options: ['aaa', 'bbb']
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
type: 'number',
|
|
75
|
+
label: 'N#',
|
|
76
|
+
name: 'N#'
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
type: 'checkbox',
|
|
80
|
+
label: 'XV',
|
|
81
|
+
name: 'XV'
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
type: 'angle',
|
|
85
|
+
label: 'Degree',
|
|
86
|
+
name: 'Degree'
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
type: 'date',
|
|
90
|
+
label: 'DD',
|
|
91
|
+
name: 'DD'
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
type: 'legend',
|
|
95
|
+
label: '',
|
|
96
|
+
name: 'NEW-GROUP',
|
|
97
|
+
property: {
|
|
98
|
+
label: 'NEW-GROUP'
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
type: 'slider',
|
|
103
|
+
label: 'S',
|
|
104
|
+
name: 'S',
|
|
105
|
+
property: {
|
|
106
|
+
min: 30,
|
|
107
|
+
max: 300,
|
|
108
|
+
step: 10
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
type: 'textarea',
|
|
113
|
+
label: 'TA',
|
|
114
|
+
name: 'TA'
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
type: 'options',
|
|
118
|
+
label: 'OT',
|
|
119
|
+
name: 'OT'
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
type: 'data',
|
|
123
|
+
label: 'DT',
|
|
124
|
+
name: 'DT'
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
type: 'color',
|
|
128
|
+
label: 'CL',
|
|
129
|
+
name: 'CL'
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
type: 'multiple-color',
|
|
133
|
+
label: 'CLS',
|
|
134
|
+
name: 'CLS'
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
type: 'image',
|
|
138
|
+
label: 'IM',
|
|
139
|
+
name: 'IM'
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
type: 'file',
|
|
143
|
+
label: 'FL',
|
|
144
|
+
name: 'FL',
|
|
145
|
+
property: {
|
|
146
|
+
multiple: true
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
]
|
|
150
|
+
|
|
151
|
+
const value = {
|
|
152
|
+
S: 290,
|
|
153
|
+
SLT: 'bbb',
|
|
154
|
+
IM: 'https://www.hatiolab.com/assets/img/arch-thingsboard.png',
|
|
155
|
+
CLS: ['yello', 'green']
|
|
156
|
+
}
|
|
31
157
|
|
|
32
|
-
render(
|
|
158
|
+
render(
|
|
159
|
+
html`
|
|
160
|
+
<ox-properties-dynamic-view
|
|
161
|
+
.props=${properties}
|
|
162
|
+
.value=${value}
|
|
163
|
+
@property-change=${e => console.log(e.currentTarget.value)}
|
|
164
|
+
></ox-properties-dynamic-view>
|
|
165
|
+
`,
|
|
166
|
+
document.querySelector('#demo')
|
|
167
|
+
)
|
|
33
168
|
</script>
|
|
34
169
|
</body>
|
|
35
170
|
</html>
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './types.js';
|
|
2
|
+
export * from './ox-property-editor.js';
|
package/dist/src/index.js
CHANGED
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,yBAAyB,CAAA","sourcesContent":["export * from './types.js'\nexport * from './ox-property-editor.js'\n"]}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright © HatioLab Inc. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
import { __decorate } from "tslib";
|
|
5
|
+
import { LitElement, html } from 'lit';
|
|
6
|
+
import { customElement, property } from 'lit/decorators.js';
|
|
7
|
+
import { OxPropertyEditor } from './ox-property-editor.js';
|
|
8
|
+
/**
|
|
9
|
+
모든 에디터들은 change 이벤트를 지원해야 한다. 또한, 모든 에디터들은 value속성에 값을 가져야 한다.
|
|
10
|
+
|
|
11
|
+
Example:
|
|
12
|
+
|
|
13
|
+
<specific-properties-builder value="{{value}}">
|
|
14
|
+
<label>Center X</label>
|
|
15
|
+
<input type="number" .value="${value.cx}">
|
|
16
|
+
<label>Width</label>
|
|
17
|
+
<input type="number" .value="${value.width}">
|
|
18
|
+
</specific-properties-builder>
|
|
19
|
+
*/
|
|
20
|
+
const DEFAULT_VALUE = {
|
|
21
|
+
legend: '',
|
|
22
|
+
number: 0,
|
|
23
|
+
angle: 0,
|
|
24
|
+
string: '',
|
|
25
|
+
password: '',
|
|
26
|
+
textarea: '',
|
|
27
|
+
checkbox: false,
|
|
28
|
+
select: '',
|
|
29
|
+
color: '#000000',
|
|
30
|
+
'solidcolor-stops': null,
|
|
31
|
+
'gradientcolor-stops': null,
|
|
32
|
+
'gltf-selector': '',
|
|
33
|
+
'image-selector': '',
|
|
34
|
+
multiplecolor: null,
|
|
35
|
+
editortable: null,
|
|
36
|
+
imageselector: '',
|
|
37
|
+
options: null,
|
|
38
|
+
date: null
|
|
39
|
+
};
|
|
40
|
+
let OxPropertiesDynamicView = class OxPropertiesDynamicView extends LitElement {
|
|
41
|
+
constructor() {
|
|
42
|
+
super(...arguments);
|
|
43
|
+
this.value = {};
|
|
44
|
+
}
|
|
45
|
+
render() {
|
|
46
|
+
return html `<slot></slot>`;
|
|
47
|
+
}
|
|
48
|
+
firstUpdated() {
|
|
49
|
+
this.addEventListener('change', this._onValueChanged.bind(this));
|
|
50
|
+
}
|
|
51
|
+
updated(changes) {
|
|
52
|
+
changes.has('props') && this._onPropsChanged(this.props || []);
|
|
53
|
+
changes.has('value') && this._setValues();
|
|
54
|
+
}
|
|
55
|
+
_onPropsChanged(props) {
|
|
56
|
+
const specs = this.props || [];
|
|
57
|
+
this.textContent = '';
|
|
58
|
+
specs.forEach(spec => {
|
|
59
|
+
let elementType = OxPropertyEditor.getEditor(spec.type);
|
|
60
|
+
if (!elementType) {
|
|
61
|
+
console.warn('Property Editor not defined', spec.type);
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
let element = document.createElement(elementType);
|
|
65
|
+
element.label = spec.label;
|
|
66
|
+
element.type = spec.type;
|
|
67
|
+
element.placeholder = spec.placeholder;
|
|
68
|
+
element.setAttribute('name', spec.name);
|
|
69
|
+
if (spec.observe) {
|
|
70
|
+
element.observe = spec.observe;
|
|
71
|
+
}
|
|
72
|
+
element.property = spec.property;
|
|
73
|
+
element.setAttribute('property-editor', 'true');
|
|
74
|
+
this.appendChild(element);
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
_setValues() {
|
|
78
|
+
this.value &&
|
|
79
|
+
Array.from(this.querySelectorAll('[name]')).forEach(prop => {
|
|
80
|
+
const editor = prop;
|
|
81
|
+
const name = editor.getAttribute('name');
|
|
82
|
+
var value = this.value[name];
|
|
83
|
+
if (value === undefined) {
|
|
84
|
+
value = DEFAULT_VALUE[editor.type];
|
|
85
|
+
}
|
|
86
|
+
editor.value = value;
|
|
87
|
+
editor.observe && editor.observe.call(prop, editor.value);
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
_onValueChanged(e) {
|
|
91
|
+
e.stopPropagation();
|
|
92
|
+
var target = e.target;
|
|
93
|
+
const editor = target.closest('[property-editor]');
|
|
94
|
+
var name = editor.getAttribute('name');
|
|
95
|
+
if (!name) {
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
this.value[name] = editor.value;
|
|
99
|
+
this._setValues();
|
|
100
|
+
this.dispatchEvent(new CustomEvent('property-change', {
|
|
101
|
+
bubbles: true,
|
|
102
|
+
composed: true,
|
|
103
|
+
detail: {
|
|
104
|
+
[name]: editor.value
|
|
105
|
+
}
|
|
106
|
+
}));
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
__decorate([
|
|
110
|
+
property({ type: Object })
|
|
111
|
+
], OxPropertiesDynamicView.prototype, "value", void 0);
|
|
112
|
+
__decorate([
|
|
113
|
+
property({ type: Array })
|
|
114
|
+
], OxPropertiesDynamicView.prototype, "props", void 0);
|
|
115
|
+
OxPropertiesDynamicView = __decorate([
|
|
116
|
+
customElement('ox-properties-dynamic-view')
|
|
117
|
+
], OxPropertiesDynamicView);
|
|
118
|
+
//# sourceMappingURL=ox-properties-dynamic-view.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ox-properties-dynamic-view.js","sourceRoot":"","sources":["../../src/ox-properties-dynamic-view.ts"],"names":[],"mappings":"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","sourcesContent":["/**\n * @license Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport { LitElement, PropertyValues, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\nimport { OxPropertyEditor } from './ox-property-editor.js'\nimport { PropertySpec } from './types.js'\n\n/**\n모든 에디터들은 change 이벤트를 지원해야 한다. 또한, 모든 에디터들은 value속성에 값을 가져야 한다.\n\nExample:\n\n <specific-properties-builder value=\"{{value}}\">\n <label>Center X</label>\n <input type=\"number\" .value=\"${value.cx}\">\n <label>Width</label>\n <input type=\"number\" .value=\"${value.width}\">\n </specific-properties-builder>\n*/\n\nconst DEFAULT_VALUE = {\n legend: '',\n number: 0,\n angle: 0,\n string: '',\n password: '',\n textarea: '',\n checkbox: false,\n select: '',\n color: '#000000',\n 'solidcolor-stops': null,\n 'gradientcolor-stops': null,\n 'gltf-selector': '',\n 'image-selector': '',\n multiplecolor: null,\n editortable: null,\n imageselector: '',\n options: null,\n date: null\n}\n\n@customElement('ox-properties-dynamic-view')\nclass OxPropertiesDynamicView extends LitElement {\n @property({ type: Object }) value: { [name: string]: any } = {}\n @property({ type: Array }) props?: PropertySpec[]\n\n render() {\n return html`<slot></slot>`\n }\n\n firstUpdated() {\n this.addEventListener('change', this._onValueChanged.bind(this))\n }\n\n updated(changes: PropertyValues<this>) {\n changes.has('props') && this._onPropsChanged(this.props || [])\n changes.has('value') && this._setValues()\n }\n\n _onPropsChanged(props: PropertySpec[]) {\n const specs = this.props || []\n\n this.textContent = ''\n specs.forEach(spec => {\n let elementType = OxPropertyEditor.getEditor(spec.type)\n if (!elementType) {\n console.warn('Property Editor not defined', spec.type)\n return\n }\n let element = document.createElement(elementType) as OxPropertyEditor\n\n element.label = spec.label\n element.type = spec.type\n element.placeholder = spec.placeholder\n element.setAttribute('name', spec.name)\n\n if (spec.observe) {\n element.observe = spec.observe\n }\n element.property = spec.property\n element.setAttribute('property-editor', 'true')\n\n this.appendChild(element)\n })\n }\n\n _setValues() {\n this.value &&\n Array.from(this.querySelectorAll('[name]')).forEach(prop => {\n const editor = prop as OxPropertyEditor\n const name = editor.getAttribute('name')\n\n var value = this.value[name!]\n if (value === undefined) {\n value = (DEFAULT_VALUE as any)[editor.type]\n }\n\n editor.value = value\n editor.observe && editor.observe.call(prop, editor.value)\n })\n }\n\n _onValueChanged(e: Event) {\n e.stopPropagation()\n var target = e.target as Element\n\n const editor = target.closest('[property-editor]') as OxPropertyEditor\n\n var name = editor.getAttribute('name')\n if (!name) {\n return\n }\n\n this.value[name] = editor.value\n this._setValues()\n\n this.dispatchEvent(\n new CustomEvent('property-change', {\n bubbles: true,\n composed: true,\n detail: {\n [name]: editor.value\n }\n })\n )\n }\n}\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import '@operato/input/ox-input-angle.js';
|
|
3
|
+
import { OxPropertyEditor } from './ox-property-editor.js';
|
|
4
|
+
import { customElement } from 'lit/decorators.js';
|
|
5
|
+
import { html } from 'lit';
|
|
6
|
+
let OxPropertyEditorAngle = class OxPropertyEditorAngle extends OxPropertyEditor {
|
|
7
|
+
editorTemplate() {
|
|
8
|
+
return html `
|
|
9
|
+
<ox-input-angle id="editor" .radian=${this.value} placeholder=${this.placeholder || ''}></ox-input-angle>
|
|
10
|
+
`;
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
OxPropertyEditorAngle = __decorate([
|
|
14
|
+
customElement('ox-property-editor-angle')
|
|
15
|
+
], OxPropertyEditorAngle);
|
|
16
|
+
export { OxPropertyEditorAngle };
|
|
17
|
+
//# sourceMappingURL=ox-property-editor-angle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ox-property-editor-angle.js","sourceRoot":"","sources":["../../src/ox-property-editor-angle.ts"],"names":[],"mappings":";AAAA,OAAO,kCAAkC,CAAA;AAEzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAG1B,IAAa,qBAAqB,GAAlC,MAAa,qBAAsB,SAAQ,gBAAgB;IACzD,cAAc;QACZ,OAAO,IAAI,CAAA;4CAC6B,IAAI,CAAC,KAAK,gBAAgB,IAAI,CAAC,WAAW,IAAI,EAAE;KACvF,CAAA;IACH,CAAC;CACF,CAAA;AANY,qBAAqB;IADjC,aAAa,CAAC,0BAA0B,CAAC;GAC7B,qBAAqB,CAMjC;SANY,qBAAqB","sourcesContent":["import '@operato/input/ox-input-angle.js'\n\nimport { OxPropertyEditor } from './ox-property-editor.js'\nimport { customElement } from 'lit/decorators.js'\nimport { html } from 'lit'\n\n@customElement('ox-property-editor-angle')\nexport class OxPropertyEditorAngle extends OxPropertyEditor {\n editorTemplate() {\n return html`\n <ox-input-angle id=\"editor\" .radian=${this.value} placeholder=${this.placeholder || ''}></ox-input-angle>\n `\n }\n}\n"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import '@operato/input/ox-checkbox.js';
|
|
3
|
+
import { OxPropertyEditor } from './ox-property-editor.js';
|
|
4
|
+
import { customElement } from 'lit/decorators.js';
|
|
5
|
+
import { html } from 'lit';
|
|
6
|
+
let OxPropertyEditorCheckbox = class OxPropertyEditorCheckbox extends OxPropertyEditor {
|
|
7
|
+
get valueProperty() {
|
|
8
|
+
return 'checked';
|
|
9
|
+
}
|
|
10
|
+
editorTemplate() {
|
|
11
|
+
return html ` <ox-checkbox id="editor" ?checked=${this.value}></ox-checkbox>`;
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
OxPropertyEditorCheckbox = __decorate([
|
|
15
|
+
customElement('ox-property-editor-checkbox')
|
|
16
|
+
], OxPropertyEditorCheckbox);
|
|
17
|
+
export { OxPropertyEditorCheckbox };
|
|
18
|
+
//# sourceMappingURL=ox-property-editor-checkbox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ox-property-editor-checkbox.js","sourceRoot":"","sources":["../../src/ox-property-editor-checkbox.ts"],"names":[],"mappings":";AAAA,OAAO,+BAA+B,CAAA;AAEtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAG1B,IAAa,wBAAwB,GAArC,MAAa,wBAAyB,SAAQ,gBAAgB;IAC5D,IAAI,aAAa;QACf,OAAO,SAAS,CAAA;IAClB,CAAC;IAED,cAAc;QACZ,OAAO,IAAI,CAAA,sCAAsC,IAAI,CAAC,KAAK,iBAAiB,CAAA;IAC9E,CAAC;CACF,CAAA;AARY,wBAAwB;IADpC,aAAa,CAAC,6BAA6B,CAAC;GAChC,wBAAwB,CAQpC;SARY,wBAAwB","sourcesContent":["import '@operato/input/ox-checkbox.js'\n\nimport { OxPropertyEditor } from './ox-property-editor.js'\nimport { customElement } from 'lit/decorators.js'\nimport { html } from 'lit'\n\n@customElement('ox-property-editor-checkbox')\nexport class OxPropertyEditorCheckbox extends OxPropertyEditor {\n get valueProperty() {\n return 'checked'\n }\n\n editorTemplate() {\n return html` <ox-checkbox id=\"editor\" ?checked=${this.value}></ox-checkbox>`\n }\n}\n"]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import '@operato/input/ox-input-color.js';
|
|
3
|
+
import { OxPropertyEditor } from './ox-property-editor.js';
|
|
4
|
+
import { customElement } from 'lit/decorators.js';
|
|
5
|
+
import { html } from 'lit';
|
|
6
|
+
let OxPropertyEditorColor = class OxPropertyEditorColor extends OxPropertyEditor {
|
|
7
|
+
editorTemplate() {
|
|
8
|
+
return html `
|
|
9
|
+
<ox-input-color
|
|
10
|
+
id="editor"
|
|
11
|
+
.value=${this.value}
|
|
12
|
+
placeholder=${this.placeholder || ''}
|
|
13
|
+
.properties=${this.property}
|
|
14
|
+
>
|
|
15
|
+
</ox-input-color>
|
|
16
|
+
`;
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
OxPropertyEditorColor = __decorate([
|
|
20
|
+
customElement('ox-property-editor-color')
|
|
21
|
+
], OxPropertyEditorColor);
|
|
22
|
+
export { OxPropertyEditorColor };
|
|
23
|
+
//# sourceMappingURL=ox-property-editor-color.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ox-property-editor-color.js","sourceRoot":"","sources":["../../src/ox-property-editor-color.ts"],"names":[],"mappings":";AAAA,OAAO,kCAAkC,CAAA;AAEzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAG1B,IAAa,qBAAqB,GAAlC,MAAa,qBAAsB,SAAQ,gBAAgB;IACzD,cAAc;QACZ,OAAO,IAAI,CAAA;;;iBAGE,IAAI,CAAC,KAAK;sBACL,IAAI,CAAC,WAAW,IAAI,EAAE;sBACtB,IAAI,CAAC,QAAQ;;;KAG9B,CAAA;IACH,CAAC;CACF,CAAA;AAZY,qBAAqB;IADjC,aAAa,CAAC,0BAA0B,CAAC;GAC7B,qBAAqB,CAYjC;SAZY,qBAAqB","sourcesContent":["import '@operato/input/ox-input-color.js'\n\nimport { OxPropertyEditor } from './ox-property-editor.js'\nimport { customElement } from 'lit/decorators.js'\nimport { html } from 'lit'\n\n@customElement('ox-property-editor-color')\nexport class OxPropertyEditorColor extends OxPropertyEditor {\n editorTemplate() {\n return html`\n <ox-input-color\n id=\"editor\"\n .value=${this.value}\n placeholder=${this.placeholder || ''}\n .properties=${this.property}\n >\n </ox-input-color>\n `\n }\n}\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import '@operato/input/ox-input-data.js';
|
|
3
|
+
import { OxPropertyEditor } from './ox-property-editor.js';
|
|
4
|
+
import { customElement } from 'lit/decorators.js';
|
|
5
|
+
import { html } from 'lit';
|
|
6
|
+
let OxPropertyEditorData = class OxPropertyEditorData extends OxPropertyEditor {
|
|
7
|
+
editorTemplate() {
|
|
8
|
+
return html ` <ox-input-data id="editor" .value=${this.value || []}></ox-input-data> `;
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
OxPropertyEditorData = __decorate([
|
|
12
|
+
customElement('ox-property-editor-data')
|
|
13
|
+
], OxPropertyEditorData);
|
|
14
|
+
export { OxPropertyEditorData };
|
|
15
|
+
//# sourceMappingURL=ox-property-editor-data.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ox-property-editor-data.js","sourceRoot":"","sources":["../../src/ox-property-editor-data.ts"],"names":[],"mappings":";AAAA,OAAO,iCAAiC,CAAA;AAExC,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAG1B,IAAa,oBAAoB,GAAjC,MAAa,oBAAqB,SAAQ,gBAAgB;IACxD,cAAc;QACZ,OAAO,IAAI,CAAA,sCAAsC,IAAI,CAAC,KAAK,IAAI,EAAE,oBAAoB,CAAA;IACvF,CAAC;CACF,CAAA;AAJY,oBAAoB;IADhC,aAAa,CAAC,yBAAyB,CAAC;GAC5B,oBAAoB,CAIhC;SAJY,oBAAoB","sourcesContent":["import '@operato/input/ox-input-data.js'\n\nimport { OxPropertyEditor } from './ox-property-editor.js'\nimport { customElement } from 'lit/decorators.js'\nimport { html } from 'lit'\n\n@customElement('ox-property-editor-data')\nexport class OxPropertyEditorData extends OxPropertyEditor {\n editorTemplate() {\n return html` <ox-input-data id=\"editor\" .value=${this.value || []}></ox-input-data> `\n }\n}\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { OxPropertyEditor } from './ox-property-editor.js';
|
|
3
|
+
import { customElement } from 'lit/decorators.js';
|
|
4
|
+
import { html } from 'lit';
|
|
5
|
+
let OxPropertyEditorDate = class OxPropertyEditorDate extends OxPropertyEditor {
|
|
6
|
+
editorTemplate() {
|
|
7
|
+
return html ` <input type="date" id="editor" .value=${this.value} /> `;
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
OxPropertyEditorDate = __decorate([
|
|
11
|
+
customElement('ox-property-editor-date')
|
|
12
|
+
], OxPropertyEditorDate);
|
|
13
|
+
export { OxPropertyEditorDate };
|
|
14
|
+
//# sourceMappingURL=ox-property-editor-date.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ox-property-editor-date.js","sourceRoot":"","sources":["../../src/ox-property-editor-date.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAG1B,IAAa,oBAAoB,GAAjC,MAAa,oBAAqB,SAAQ,gBAAgB;IACxD,cAAc;QACZ,OAAO,IAAI,CAAA,0CAA0C,IAAI,CAAC,KAAK,MAAM,CAAA;IACvE,CAAC;CACF,CAAA;AAJY,oBAAoB;IADhC,aAAa,CAAC,yBAAyB,CAAC;GAC5B,oBAAoB,CAIhC;SAJY,oBAAoB","sourcesContent":["import { OxPropertyEditor } from './ox-property-editor.js'\nimport { customElement } from 'lit/decorators.js'\nimport { html } from 'lit'\n\n@customElement('ox-property-editor-date')\nexport class OxPropertyEditorDate extends OxPropertyEditor {\n editorTemplate() {\n return html` <input type=\"date\" id=\"editor\" .value=${this.value} /> `\n }\n}\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import '@operato/input/ox-input-file.js';
|
|
3
|
+
import { OxPropertyEditor } from './ox-property-editor.js';
|
|
4
|
+
import { customElement } from 'lit/decorators.js';
|
|
5
|
+
import { html } from 'lit';
|
|
6
|
+
let OxPropertyEditorFile = class OxPropertyEditorFile extends OxPropertyEditor {
|
|
7
|
+
// TODO file change event 처리
|
|
8
|
+
editorTemplate() {
|
|
9
|
+
const { multiple = false } = this.property || {};
|
|
10
|
+
return html ` <ox-input-file id="editor" .value=${this.value || []} ?multiple=${multiple}></ox-input-file> `;
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
OxPropertyEditorFile = __decorate([
|
|
14
|
+
customElement('ox-property-editor-file')
|
|
15
|
+
], OxPropertyEditorFile);
|
|
16
|
+
export { OxPropertyEditorFile };
|
|
17
|
+
//# sourceMappingURL=ox-property-editor-file.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ox-property-editor-file.js","sourceRoot":"","sources":["../../src/ox-property-editor-file.ts"],"names":[],"mappings":";AAAA,OAAO,iCAAiC,CAAA;AAExC,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAG1B,IAAa,oBAAoB,GAAjC,MAAa,oBAAqB,SAAQ,gBAAgB;IACxD,4BAA4B;IAC5B,cAAc;QACZ,MAAM,EAAE,QAAQ,GAAG,KAAK,EAAE,GAAG,IAAI,CAAC,QAAQ,IAAI,EAAE,CAAA;QAChD,OAAO,IAAI,CAAA,sCAAsC,IAAI,CAAC,KAAK,IAAI,EAAE,cAAc,QAAQ,oBAAoB,CAAA;IAC7G,CAAC;CACF,CAAA;AANY,oBAAoB;IADhC,aAAa,CAAC,yBAAyB,CAAC;GAC5B,oBAAoB,CAMhC;SANY,oBAAoB","sourcesContent":["import '@operato/input/ox-input-file.js'\n\nimport { OxPropertyEditor } from './ox-property-editor.js'\nimport { customElement } from 'lit/decorators.js'\nimport { html } from 'lit'\n\n@customElement('ox-property-editor-file')\nexport class OxPropertyEditorFile extends OxPropertyEditor {\n // TODO file change event 처리\n editorTemplate() {\n const { multiple = false } = this.property || {}\n return html` <ox-input-file id=\"editor\" .value=${this.value || []} ?multiple=${multiple}></ox-input-file> `\n }\n}\n"]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import '@operato/input/ox-input-color-stops.js';
|
|
3
|
+
import { OxPropertyEditor } from './ox-property-editor.js';
|
|
4
|
+
import { customElement } from 'lit/decorators.js';
|
|
5
|
+
import { html } from 'lit';
|
|
6
|
+
let OxPropertyEditorGradientColorStops = class OxPropertyEditorGradientColorStops extends OxPropertyEditor {
|
|
7
|
+
editorTemplate() {
|
|
8
|
+
return html `
|
|
9
|
+
<ox-input-color-stops
|
|
10
|
+
id="editor"
|
|
11
|
+
type="gradient"
|
|
12
|
+
.value=${this.value}
|
|
13
|
+
.min=${this.property && this.property.min}
|
|
14
|
+
.max=${this.property && this.property.max}
|
|
15
|
+
fullwidth
|
|
16
|
+
>
|
|
17
|
+
</ox-input-color-stops>
|
|
18
|
+
`;
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
OxPropertyEditorGradientColorStops = __decorate([
|
|
22
|
+
customElement('ox-property-editor-gradient-colorstops')
|
|
23
|
+
], OxPropertyEditorGradientColorStops);
|
|
24
|
+
export { OxPropertyEditorGradientColorStops };
|
|
25
|
+
//# sourceMappingURL=ox-property-editor-gradient-colorstops.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ox-property-editor-gradient-colorstops.js","sourceRoot":"","sources":["../../src/ox-property-editor-gradient-colorstops.ts"],"names":[],"mappings":";AAAA,OAAO,wCAAwC,CAAA;AAE/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAG1B,IAAa,kCAAkC,GAA/C,MAAa,kCAAmC,SAAQ,gBAAgB;IACtE,cAAc;QACZ,OAAO,IAAI,CAAA;;;;iBAIE,IAAI,CAAC,KAAK;eACZ,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG;eAClC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG;;;;KAI5C,CAAA;IACH,CAAC;CACF,CAAA;AAdY,kCAAkC;IAD9C,aAAa,CAAC,wCAAwC,CAAC;GAC3C,kCAAkC,CAc9C;SAdY,kCAAkC","sourcesContent":["import '@operato/input/ox-input-color-stops.js'\n\nimport { OxPropertyEditor } from './ox-property-editor.js'\nimport { customElement } from 'lit/decorators.js'\nimport { html } from 'lit'\n\n@customElement('ox-property-editor-gradient-colorstops')\nexport class OxPropertyEditorGradientColorStops extends OxPropertyEditor {\n editorTemplate() {\n return html`\n <ox-input-color-stops\n id=\"editor\"\n type=\"gradient\"\n .value=${this.value}\n .min=${this.property && this.property.min}\n .max=${this.property && this.property.max}\n fullwidth\n >\n </ox-input-color-stops>\n `\n }\n}\n"]}
|