@operato/property-editor 1.0.0-beta.9 → 1.0.6

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 (123) hide show
  1. package/CHANGELOG.md +400 -0
  2. package/demo/index.html +19 -5
  3. package/dist/src/ox-properties-dynamic-view.js +14 -10
  4. package/dist/src/ox-properties-dynamic-view.js.map +1 -1
  5. package/dist/src/ox-property-editor-angle.d.ts +2 -1
  6. package/dist/src/ox-property-editor-angle.js +4 -6
  7. package/dist/src/ox-property-editor-angle.js.map +1 -1
  8. package/dist/src/ox-property-editor-checkbox.d.ts +2 -1
  9. package/dist/src/ox-property-editor-checkbox.js +4 -4
  10. package/dist/src/ox-property-editor-checkbox.js.map +1 -1
  11. package/dist/src/ox-property-editor-color.d.ts +2 -1
  12. package/dist/src/ox-property-editor-color.js +4 -9
  13. package/dist/src/ox-property-editor-color.js.map +1 -1
  14. package/dist/src/ox-property-editor-crontab.d.ts +2 -1
  15. package/dist/src/ox-property-editor-crontab.js +3 -2
  16. package/dist/src/ox-property-editor-crontab.js.map +1 -1
  17. package/dist/src/ox-property-editor-data.d.ts +2 -1
  18. package/dist/src/ox-property-editor-data.js +5 -4
  19. package/dist/src/ox-property-editor-data.js.map +1 -1
  20. package/dist/src/ox-property-editor-date.d.ts +2 -1
  21. package/dist/src/ox-property-editor-date.js +4 -4
  22. package/dist/src/ox-property-editor-date.js.map +1 -1
  23. package/dist/src/ox-property-editor-duration.d.ts +6 -0
  24. package/dist/src/ox-property-editor-duration.js +16 -0
  25. package/dist/src/ox-property-editor-duration.js.map +1 -0
  26. package/dist/src/ox-property-editor-file.d.ts +2 -1
  27. package/dist/src/ox-property-editor-file.js +8 -5
  28. package/dist/src/ox-property-editor-file.js.map +1 -1
  29. package/dist/src/ox-property-editor-gradient-colorstops.d.ts +2 -1
  30. package/dist/src/ox-property-editor-gradient-colorstops.js +8 -7
  31. package/dist/src/ox-property-editor-gradient-colorstops.js.map +1 -1
  32. package/dist/src/ox-property-editor-image.d.ts +2 -1
  33. package/dist/src/ox-property-editor-image.js +5 -4
  34. package/dist/src/ox-property-editor-image.js.map +1 -1
  35. package/dist/src/ox-property-editor-key-values.d.ts +6 -0
  36. package/dist/src/ox-property-editor-key-values.js +24 -0
  37. package/dist/src/ox-property-editor-key-values.js.map +1 -0
  38. package/dist/src/ox-property-editor-legend.d.ts +2 -1
  39. package/dist/src/ox-property-editor-legend.js +4 -4
  40. package/dist/src/ox-property-editor-legend.js.map +1 -1
  41. package/dist/src/ox-property-editor-multiple-colors.d.ts +2 -1
  42. package/dist/src/ox-property-editor-multiple-colors.js +4 -4
  43. package/dist/src/ox-property-editor-multiple-colors.js.map +1 -1
  44. package/dist/src/ox-property-editor-number.d.ts +2 -1
  45. package/dist/src/ox-property-editor-number.js +6 -6
  46. package/dist/src/ox-property-editor-number.js.map +1 -1
  47. package/dist/src/ox-property-editor-options.d.ts +2 -1
  48. package/dist/src/ox-property-editor-options.js +5 -4
  49. package/dist/src/ox-property-editor-options.js.map +1 -1
  50. package/dist/src/ox-property-editor-partition-keys.d.ts +6 -0
  51. package/dist/src/ox-property-editor-partition-keys.js +18 -0
  52. package/dist/src/ox-property-editor-partition-keys.js.map +1 -0
  53. package/dist/src/ox-property-editor-password.d.ts +2 -1
  54. package/dist/src/ox-property-editor-password.js +4 -4
  55. package/dist/src/ox-property-editor-password.js.map +1 -1
  56. package/dist/src/ox-property-editor-range.d.ts +2 -1
  57. package/dist/src/ox-property-editor-range.js +13 -5
  58. package/dist/src/ox-property-editor-range.js.map +1 -1
  59. package/dist/src/ox-property-editor-scene-component-id.d.ts +2 -1
  60. package/dist/src/ox-property-editor-scene-component-id.js +4 -8
  61. package/dist/src/ox-property-editor-scene-component-id.js.map +1 -1
  62. package/dist/src/ox-property-editor-select.d.ts +4 -1
  63. package/dist/src/ox-property-editor-select.js +11 -5
  64. package/dist/src/ox-property-editor-select.js.map +1 -1
  65. package/dist/src/ox-property-editor-solid-colorstops.d.ts +2 -1
  66. package/dist/src/ox-property-editor-solid-colorstops.js +8 -7
  67. package/dist/src/ox-property-editor-solid-colorstops.js.map +1 -1
  68. package/dist/src/ox-property-editor-string.d.ts +2 -1
  69. package/dist/src/ox-property-editor-string.js +4 -4
  70. package/dist/src/ox-property-editor-string.js.map +1 -1
  71. package/dist/src/ox-property-editor-table.d.ts +2 -1
  72. package/dist/src/ox-property-editor-table.js +5 -4
  73. package/dist/src/ox-property-editor-table.js.map +1 -1
  74. package/dist/src/ox-property-editor-textarea.d.ts +2 -1
  75. package/dist/src/ox-property-editor-textarea.js +9 -8
  76. package/dist/src/ox-property-editor-textarea.js.map +1 -1
  77. package/dist/src/ox-property-editor-value-map.d.ts +2 -1
  78. package/dist/src/ox-property-editor-value-map.js +11 -5
  79. package/dist/src/ox-property-editor-value-map.js.map +1 -1
  80. package/dist/src/ox-property-editor-value-ranges.d.ts +2 -1
  81. package/dist/src/ox-property-editor-value-ranges.js +9 -3
  82. package/dist/src/ox-property-editor-value-ranges.js.map +1 -1
  83. package/dist/src/ox-property-editor-work-shift.d.ts +3 -2
  84. package/dist/src/ox-property-editor-work-shift.js +8 -7
  85. package/dist/src/ox-property-editor-work-shift.js.map +1 -1
  86. package/dist/src/ox-property-editor.d.ts +8 -6
  87. package/dist/src/ox-property-editor.js +60 -7
  88. package/dist/src/ox-property-editor.js.map +1 -1
  89. package/dist/src/types.d.ts +5 -0
  90. package/dist/src/types.js.map +1 -1
  91. package/dist/tsconfig.tsbuildinfo +1 -1
  92. package/package.json +105 -11
  93. package/src/ox-properties-dynamic-view.ts +15 -10
  94. package/src/ox-property-editor-angle.ts +6 -6
  95. package/src/ox-property-editor-checkbox.ts +6 -4
  96. package/src/ox-property-editor-color.ts +6 -9
  97. package/src/ox-property-editor-crontab.ts +5 -2
  98. package/src/ox-property-editor-data.ts +8 -4
  99. package/src/ox-property-editor-date.ts +6 -4
  100. package/src/ox-property-editor-duration.ts +16 -0
  101. package/src/ox-property-editor-file.ts +11 -5
  102. package/src/ox-property-editor-gradient-colorstops.ts +11 -7
  103. package/src/ox-property-editor-image.ts +9 -4
  104. package/src/ox-property-editor-key-values.ts +24 -0
  105. package/src/ox-property-editor-legend.ts +6 -4
  106. package/src/ox-property-editor-multiple-colors.ts +6 -4
  107. package/src/ox-property-editor-number.ts +8 -6
  108. package/src/ox-property-editor-options.ts +8 -4
  109. package/src/ox-property-editor-partition-keys.ts +18 -0
  110. package/src/ox-property-editor-password.ts +6 -4
  111. package/src/ox-property-editor-range.ts +15 -5
  112. package/src/ox-property-editor-scene-component-id.ts +6 -8
  113. package/src/ox-property-editor-select.ts +12 -6
  114. package/src/ox-property-editor-solid-colorstops.ts +11 -7
  115. package/src/ox-property-editor-string.ts +6 -4
  116. package/src/ox-property-editor-table.ts +8 -4
  117. package/src/ox-property-editor-textarea.ts +12 -8
  118. package/src/ox-property-editor-value-map.ts +13 -5
  119. package/src/ox-property-editor-value-ranges.ts +10 -3
  120. package/src/ox-property-editor-work-shift.ts +6 -4
  121. package/src/ox-property-editor.ts +59 -10
  122. package/src/types.ts +6 -0
  123. package/yarn-error.log +0 -18150
package/CHANGELOG.md CHANGED
@@ -3,6 +3,406 @@
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.6](https://github.com/hatiolab/operato/compare/v1.0.5...v1.0.6) (2022-07-31)
7
+
8
+ **Note:** Version bump only for package @operato/property-editor
9
+
10
+
11
+
12
+
13
+
14
+ ### [1.0.5](https://github.com/hatiolab/operato/compare/v1.0.4...v1.0.5) (2022-07-31)
15
+
16
+ **Note:** Version bump only for package @operato/property-editor
17
+
18
+
19
+
20
+
21
+
22
+ ### [1.0.4](https://github.com/hatiolab/operato/compare/v1.0.3...v1.0.4) (2022-07-31)
23
+
24
+ **Note:** Version bump only for package @operato/property-editor
25
+
26
+
27
+
28
+
29
+
30
+ ### [1.0.3](https://github.com/hatiolab/operato/compare/v1.0.2...v1.0.3) (2022-07-31)
31
+
32
+
33
+ ### :bug: Bug Fix
34
+
35
+ * exports types ([ff5dc11](https://github.com/hatiolab/operato/commit/ff5dc119acbbf5a93459115f3929ba4a6720f9bb))
36
+
37
+
38
+
39
+ ### [1.0.1](https://github.com/hatiolab/operato/compare/v1.0.0...v1.0.1) (2022-07-25)
40
+
41
+ **Note:** Version bump only for package @operato/property-editor
42
+
43
+
44
+
45
+
46
+
47
+ ## [1.0.0](https://github.com/hatiolab/operato/compare/v1.0.0-beta.51...v1.0.0) (2022-07-24)
48
+
49
+ **Note:** Version bump only for package @operato/property-editor
50
+
51
+
52
+
53
+
54
+
55
+ ## [1.0.0-beta.51](https://github.com/hatiolab/operato/compare/v1.0.0-beta.50...v1.0.0-beta.51) (2022-07-22)
56
+
57
+ **Note:** Version bump only for package @operato/property-editor
58
+
59
+
60
+
61
+
62
+
63
+ ## [1.0.0-beta.50](https://github.com/hatiolab/operato/compare/v1.0.0-beta.49...v1.0.0-beta.50) (2022-07-18)
64
+
65
+
66
+ ### :bug: Bug Fix
67
+
68
+ * ox-select label ([6dde9bb](https://github.com/hatiolab/operato/commit/6dde9bb629ca81fa6ac69d70efbe3c5d6c08e80a))
69
+
70
+
71
+
72
+ ## [1.0.0-beta.49](https://github.com/hatiolab/operato/compare/v1.0.0-beta.48...v1.0.0-beta.49) (2022-07-17)
73
+
74
+ **Note:** Version bump only for package @operato/property-editor
75
+
76
+
77
+
78
+
79
+
80
+ ## [1.0.0-beta.48](https://github.com/hatiolab/operato/compare/v1.0.0-beta.47...v1.0.0-beta.48) (2022-07-17)
81
+
82
+ **Note:** Version bump only for package @operato/property-editor
83
+
84
+
85
+
86
+
87
+
88
+ ## [1.0.0-beta.47](https://github.com/hatiolab/operato/compare/v1.0.0-beta.46...v1.0.0-beta.47) (2022-07-15)
89
+
90
+ **Note:** Version bump only for package @operato/property-editor
91
+
92
+
93
+
94
+
95
+
96
+ ## [1.0.0-beta.46](https://github.com/hatiolab/operato/compare/v1.0.0-beta.45...v1.0.0-beta.46) (2022-07-11)
97
+
98
+
99
+ ### :bug: Bug Fix
100
+
101
+ * property-editor spec. changed ([b10e4ef](https://github.com/hatiolab/operato/commit/b10e4ef151450a0ca19cbf00c9c96da80ddaaed8))
102
+
103
+
104
+
105
+ ## [1.0.0-beta.45](https://github.com/hatiolab/operato/compare/v1.0.0-beta.44...v1.0.0-beta.45) (2022-07-09)
106
+
107
+
108
+ ### :bug: Bug Fix
109
+
110
+ * ox-property-editor-crontab ([faafc16](https://github.com/hatiolab/operato/commit/faafc165d6b319c0abc4103298aae78cecfc5bd8))
111
+ * upgrade dependencies ([4986392](https://github.com/hatiolab/operato/commit/4986392e64524b5602cc9a144def239e85524bee))
112
+
113
+
114
+
115
+ ## [1.0.0-beta.44](https://github.com/hatiolab/operato/compare/v1.0.0-beta.43...v1.0.0-beta.44) (2022-07-07)
116
+
117
+
118
+ ### :bug: Bug Fix
119
+
120
+ * board property-editor style, option-able fullwidth, ox-input-select event ([6d181de](https://github.com/hatiolab/operato/commit/6d181de26467ee0f1733f6367049517c69383f31))
121
+
122
+
123
+
124
+ ## [1.0.0-beta.43](https://github.com/hatiolab/operato/compare/v1.0.0-beta.42...v1.0.0-beta.43) (2022-07-03)
125
+
126
+ **Note:** Version bump only for package @operato/property-editor
127
+
128
+
129
+
130
+
131
+
132
+ ## [1.0.0-beta.42](https://github.com/hatiolab/operato/compare/v1.0.0-beta.41...v1.0.0-beta.42) (2022-07-03)
133
+
134
+ **Note:** Version bump only for package @operato/property-editor
135
+
136
+
137
+
138
+
139
+
140
+ ## [1.0.0-beta.41](https://github.com/hatiolab/operato/compare/v1.0.0-beta.40...v1.0.0-beta.41) (2022-06-30)
141
+
142
+ **Note:** Version bump only for package @operato/property-editor
143
+
144
+
145
+
146
+
147
+
148
+ ## [1.0.0-beta.40](https://github.com/hatiolab/operato/compare/v1.0.0-beta.39...v1.0.0-beta.40) (2022-06-29)
149
+
150
+
151
+ ### :bug: Bug Fix
152
+
153
+ * duration editor for grist and property editor ([db2a59e](https://github.com/hatiolab/operato/commit/db2a59eca05c3d5c324d351ad9c201f5f93113c4))
154
+
155
+
156
+
157
+ ## [1.0.0-beta.39](https://github.com/hatiolab/operato/compare/v1.0.0-beta.38...v1.0.0-beta.39) (2022-06-22)
158
+
159
+ **Note:** Version bump only for package @operato/property-editor
160
+
161
+
162
+
163
+
164
+
165
+ ## [1.0.0-beta.38](https://github.com/hatiolab/operato/compare/v1.0.0-beta.37...v1.0.0-beta.38) (2022-06-20)
166
+
167
+ **Note:** Version bump only for package @operato/property-editor
168
+
169
+
170
+
171
+
172
+
173
+ ## [1.0.0-beta.37](https://github.com/hatiolab/operato/compare/v1.0.0-beta.36...v1.0.0-beta.37) (2022-06-20)
174
+
175
+ **Note:** Version bump only for package @operato/property-editor
176
+
177
+
178
+
179
+
180
+
181
+ ## [1.0.0-beta.36](https://github.com/hatiolab/operato/compare/v1.0.0-beta.35...v1.0.0-beta.36) (2022-06-16)
182
+
183
+ **Note:** Version bump only for package @operato/property-editor
184
+
185
+
186
+
187
+
188
+
189
+ ## [1.0.0-beta.35](https://github.com/hatiolab/operato/compare/v1.0.0-beta.34...v1.0.0-beta.35) (2022-06-16)
190
+
191
+ **Note:** Version bump only for package @operato/property-editor
192
+
193
+
194
+
195
+
196
+
197
+ ## [1.0.0-beta.34](https://github.com/hatiolab/operato/compare/v1.0.0-beta.33...v1.0.0-beta.34) (2022-06-16)
198
+
199
+ **Note:** Version bump only for package @operato/property-editor
200
+
201
+
202
+
203
+
204
+
205
+ ## [1.0.0-beta.33](https://github.com/hatiolab/operato/compare/v1.0.0-beta.32...v1.0.0-beta.33) (2022-06-16)
206
+
207
+ **Note:** Version bump only for package @operato/property-editor
208
+
209
+
210
+
211
+
212
+
213
+ ## [1.0.0-beta.32](https://github.com/hatiolab/operato/compare/v1.0.0-beta.31...v1.0.0-beta.32) (2022-06-15)
214
+
215
+ **Note:** Version bump only for package @operato/property-editor
216
+
217
+
218
+
219
+
220
+
221
+ ## [1.0.0-beta.31](https://github.com/hatiolab/operato/compare/v1.0.0-beta.30...v1.0.0-beta.31) (2022-06-15)
222
+
223
+ **Note:** Version bump only for package @operato/property-editor
224
+
225
+
226
+
227
+
228
+
229
+ ## [1.0.0-beta.30](https://github.com/hatiolab/operato/compare/v1.0.0-beta.29...v1.0.0-beta.30) (2022-06-13)
230
+
231
+ **Note:** Version bump only for package @operato/property-editor
232
+
233
+
234
+
235
+
236
+
237
+ ## [1.0.0-beta.29](https://github.com/hatiolab/operato/compare/v1.0.0-beta.28...v1.0.0-beta.29) (2022-06-10)
238
+
239
+ **Note:** Version bump only for package @operato/property-editor
240
+
241
+
242
+
243
+
244
+
245
+ ## [1.0.0-beta.28](https://github.com/hatiolab/operato/compare/v1.0.0-beta.27...v1.0.0-beta.28) (2022-06-10)
246
+
247
+ **Note:** Version bump only for package @operato/property-editor
248
+
249
+
250
+
251
+
252
+
253
+ ## [1.0.0-beta.27](https://github.com/hatiolab/operato/compare/v1.0.0-beta.26...v1.0.0-beta.27) (2022-06-09)
254
+
255
+ **Note:** Version bump only for package @operato/property-editor
256
+
257
+
258
+
259
+
260
+
261
+ ## [1.0.0-beta.26](https://github.com/hatiolab/operato/compare/v1.0.0-beta.25...v1.0.0-beta.26) (2022-06-04)
262
+
263
+ **Note:** Version bump only for package @operato/property-editor
264
+
265
+
266
+
267
+
268
+
269
+ ## [1.0.0-beta.25](https://github.com/hatiolab/operato/compare/v1.0.0-beta.24...v1.0.0-beta.25) (2022-06-02)
270
+
271
+ **Note:** Version bump only for package @operato/property-editor
272
+
273
+
274
+
275
+
276
+
277
+ ## [1.0.0-beta.24](https://github.com/hatiolab/operato/compare/v1.0.0-beta.23...v1.0.0-beta.24) (2022-06-02)
278
+
279
+ **Note:** Version bump only for package @operato/property-editor
280
+
281
+
282
+
283
+
284
+
285
+ ## [1.0.0-beta.23](https://github.com/hatiolab/operato/compare/v1.0.0-beta.22...v1.0.0-beta.23) (2022-06-02)
286
+
287
+ **Note:** Version bump only for package @operato/property-editor
288
+
289
+
290
+
291
+
292
+
293
+ ## [1.0.0-beta.22](https://github.com/hatiolab/operato/compare/v1.0.0-beta.21...v1.0.0-beta.22) (2022-05-31)
294
+
295
+ **Note:** Version bump only for package @operato/property-editor
296
+
297
+
298
+
299
+
300
+
301
+ ## [1.0.0-beta.21](https://github.com/hatiolab/operato/compare/v1.0.0-beta.20...v1.0.0-beta.21) (2022-05-31)
302
+
303
+
304
+ ### :bug: Bug Fix
305
+
306
+ * add ox-input-key-values, ox-property-editor-key-values and so on ([d26b2e9](https://github.com/hatiolab/operato/commit/d26b2e94a5e43935e5e80a1ebb0948642624ca92))
307
+
308
+
309
+
310
+ ## [1.0.0-beta.20](https://github.com/hatiolab/operato/compare/v1.0.0-beta.19...v1.0.0-beta.20) (2022-05-30)
311
+
312
+ **Note:** Version bump only for package @operato/property-editor
313
+
314
+
315
+
316
+
317
+
318
+ ## [1.0.0-beta.19](https://github.com/hatiolab/operato/compare/v1.0.0-beta.18...v1.0.0-beta.19) (2022-05-29)
319
+
320
+ **Note:** Version bump only for package @operato/property-editor
321
+
322
+
323
+
324
+
325
+
326
+ ## [1.0.0-beta.18](https://github.com/hatiolab/operato/compare/v1.0.0-beta.17...v1.0.0-beta.18) (2022-05-27)
327
+
328
+ **Note:** Version bump only for package @operato/property-editor
329
+
330
+
331
+
332
+
333
+
334
+ ## [1.0.0-beta.17](https://github.com/hatiolab/operato/compare/v1.0.0-beta.16...v1.0.0-beta.17) (2022-05-25)
335
+
336
+ **Note:** Version bump only for package @operato/property-editor
337
+
338
+
339
+
340
+
341
+
342
+ ## [1.0.0-beta.16](https://github.com/hatiolab/operato/compare/v1.0.0-beta.15...v1.0.0-beta.16) (2022-05-23)
343
+
344
+ **Note:** Version bump only for package @operato/property-editor
345
+
346
+
347
+
348
+
349
+
350
+ ## [1.0.0-beta.15](https://github.com/hatiolab/operato/compare/v1.0.0-beta.14...v1.0.0-beta.15) (2022-05-20)
351
+
352
+ **Note:** Version bump only for package @operato/property-editor
353
+
354
+
355
+
356
+
357
+
358
+ ## [1.0.0-beta.14](https://github.com/hatiolab/operato/compare/v1.0.0-beta.13...v1.0.0-beta.14) (2022-05-19)
359
+
360
+ **Note:** Version bump only for package @operato/property-editor
361
+
362
+
363
+
364
+
365
+
366
+ ## [1.0.0-beta.13](https://github.com/hatiolab/operato/compare/v1.0.0-beta.12...v1.0.0-beta.13) (2022-05-19)
367
+
368
+
369
+ ### :bug: Bug Fix
370
+
371
+ * incorrect package.json scripts for storybooks ([8c8c405](https://github.com/hatiolab/operato/commit/8c8c405443247108b9c411b8161c008d9b6a2261))
372
+
373
+
374
+
375
+ ## [1.0.0-beta.12](https://github.com/hatiolab/operato/compare/v1.0.0-beta.11...v1.0.0-beta.12) (2022-05-13)
376
+
377
+
378
+ ### :rocket: New Features
379
+
380
+ * storybook started ([90c08c9](https://github.com/hatiolab/operato/commit/90c08c9a15e5fe554baaa1becca07793e8434799))
381
+
382
+
383
+
384
+ ## [1.0.0-beta.11](https://github.com/hatiolab/operato/compare/v1.0.0-beta.10...v1.0.0-beta.11) (2022-05-01)
385
+
386
+
387
+ ### :bug: Bug Fix
388
+
389
+ * input-data, input-script height ([a151994](https://github.com/hatiolab/operato/commit/a151994f06285799d8e05fb6842f8a7f8b13660d))
390
+
391
+
392
+ ### :rocket: New Features
393
+
394
+ * separated filter-form from data-grist ([21e27f7](https://github.com/hatiolab/operato/commit/21e27f74d3e66d782da4aa75801c39a037627f62))
395
+
396
+
397
+
398
+ ## [1.0.0-beta.10](https://github.com/hatiolab/operato/compare/v1.0.0-beta.9...v1.0.0-beta.10) (2022-04-28)
399
+
400
+ **Note:** Version bump only for package @operato/property-editor
401
+
402
+
403
+
404
+
405
+
6
406
  ## [1.0.0-beta.9](https://github.com/hatiolab/operato/compare/v1.0.0-beta.8...v1.0.0-beta.9) (2022-04-28)
7
407
 
8
408
  **Note:** Version bump only for package @operato/property-editor
package/demo/index.html CHANGED
@@ -2,7 +2,7 @@
2
2
  <html lang="en-GB">
3
3
  <head>
4
4
  <meta charset="utf-8" />
5
- <meta name="viewport" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
6
6
  <style>
7
7
  body {
8
8
  margin: 0;
@@ -46,8 +46,10 @@
46
46
  import '../dist/src/ox-property-editor-multiple-colors.js'
47
47
  import '../dist/src/ox-property-editor-crontab.js'
48
48
  import '../dist/src/ox-property-editor-work-shift.js'
49
+ import '../dist/src/ox-property-editor-partition-keys.js'
50
+ import '../dist/src/ox-property-editor-key-values.js'
49
51
  // import '../dist/src/ox-property-editor-textarea.js'
50
- // import '../dist/src/ox-property-editor-options.js'
52
+ import '../dist/src/ox-property-editor-options.js'
51
53
 
52
54
  import '../dist/src/ox-properties-dynamic-view.js'
53
55
 
@@ -85,14 +87,17 @@
85
87
  'id-input': 'ox-property-editor-scene-component-id',
86
88
  'font-selector': 'ox-property-editor-font-selector',
87
89
  crontab: 'ox-property-editor-crontab',
88
- shift: 'ox-property-editor-work-shift'
90
+ shift: 'ox-property-editor-work-shift',
91
+ 'partition-keys': 'ox-property-editor-partition-keys',
92
+ 'key-values': 'ox-property-editor-key-values'
89
93
  })
90
94
 
91
95
  const properties = [
92
96
  {
93
97
  type: 'string',
94
98
  label: 'ABC',
95
- name: 'ABC'
99
+ name: 'ABC',
100
+ quantifier: [1, 20]
96
101
  },
97
102
  {
98
103
  type: 'password',
@@ -153,7 +158,10 @@
153
158
  {
154
159
  type: 'options',
155
160
  label: 'OT',
156
- name: 'OT'
161
+ name: 'OT',
162
+ editor: {
163
+ fullwidth: true
164
+ }
157
165
  },
158
166
  {
159
167
  type: 'data',
@@ -192,10 +200,16 @@
192
200
  type: 'shift',
193
201
  label: 'shift',
194
202
  name: 'shift'
203
+ },
204
+ {
205
+ type: 'key-values',
206
+ label: 'key-values',
207
+ name: 'key-values'
195
208
  }
196
209
  ]
197
210
 
198
211
  const value = {
212
+ ABC: [4, 3, 2, 1],
199
213
  S: 290,
200
214
  SLT: 'bbb',
201
215
  IM: 'https://www.hatiolab.com/assets/img/arch-thingsboard.png',
@@ -2,7 +2,7 @@
2
2
  * @license Copyright © HatioLab Inc. All rights reserved.
3
3
  */
4
4
  import { __decorate } from "tslib";
5
- import { LitElement, html } from 'lit';
5
+ import { html, LitElement } from 'lit';
6
6
  import { customElement, property } from 'lit/decorators.js';
7
7
  import { OxPropertyEditor } from './ox-property-editor.js';
8
8
  /**
@@ -56,20 +56,24 @@ let OxPropertiesDynamicView = class OxPropertiesDynamicView extends LitElement {
56
56
  const specs = this.props || [];
57
57
  this.textContent = '';
58
58
  specs.forEach(spec => {
59
- let elementType = OxPropertyEditor.getEditor(spec.type);
59
+ const { label, type, name, placeholder, editor, quantifier, observe, property } = spec;
60
+ let elementType = OxPropertyEditor.getEditor(type);
60
61
  if (!elementType) {
61
- console.warn('Property Editor not defined', spec.type);
62
+ console.warn('Property Editor not defined', type);
62
63
  return;
63
64
  }
64
65
  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;
66
+ element.label = label;
67
+ element.type = type;
68
+ element.placeholder = placeholder;
69
+ element.name = name;
70
+ element.setAttribute('name', name);
71
+ element.editor = editor;
72
+ element.quantifier = quantifier;
73
+ if (observe) {
74
+ element.observe = observe;
71
75
  }
72
- element.property = spec.property;
76
+ element.property = property;
73
77
  element.setAttribute('property-editor', 'true');
74
78
  this.appendChild(element);
75
79
  });
@@ -1 +1 @@
1
- {"version":3,"file":"ox-properties-dynamic-view.js","sourceRoot":"","sources":["../../src/ox-properties-dynamic-view.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,OAAO,EAAE,UAAU,EAAkB,IAAI,EAAE,MAAM,KAAK,CAAA;AACtD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA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AAK,GAAG,KAAK,CAAA;gBACpB,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,CAAA;YAC3D,CAAC,CAAC,CAAA;IACN,CAAC;IAED,eAAe,CAAC,CAAQ;QACtB,CAAC,CAAC,eAAe,EAAE,CAAA;QACnB,IAAI,MAAM,GAAG,CAAC,CAAC,MAAiB,CAAA;QAEhC,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,mBAAmB,CAAqB,CAAA;QAEtE,IAAI,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,CAAA;QACtC,IAAI,CAAC,IAAI,EAAE;YACT,OAAM;SACP;QAED,IAAI,IAAI,CAAC,KAAK,EAAE;YACd,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,KAAK,CAAA;SAChC;aAAM;YACL,IAAI,CAAC,KAAK,GAAG;gBACX,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,KAAK;aACrB,CAAA;SACF;QAED,IAAI,CAAC,aAAa,CAChB,IAAI,WAAW,CAAC,iBAAiB,EAAE;YACjC,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI;YACd,MAAM,EAAE,IAAI,CAAC,KAAK;SACnB,CAAC,CACH,CAAA;IACH,CAAC;CACF,CAAA;AAtF6B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;sDAAoC;AACpC;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;sDAAuB;AAF7C,uBAAuB;IAD5B,aAAa,CAAC,4BAA4B,CAAC;GACtC,uBAAuB,CAuF5B","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 <ox-properties-dynamic-view 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 </ox-properties-dynamic-view>\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 if (this.value) {\n this.value[name] = editor.value\n } else {\n this.value = {\n [name]: editor.value\n }\n }\n\n this.dispatchEvent(\n new CustomEvent('property-change', {\n bubbles: true,\n composed: true,\n detail: this.value\n })\n )\n }\n}\n"]}
1
+ {"version":3,"file":"ox-properties-dynamic-view.js","sourceRoot":"","sources":["../../src/ox-properties-dynamic-view.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,OAAO,EAAE,IAAI,EAAE,UAAU,EAAkB,MAAM,KAAK,CAAA;AACtD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAG1D;;;;;;;;;;;EAWE;AAEF,MAAM,aAAa,GAAG;IACpB,MAAM,EAAE,EAAE;IACV,MAAM,EAAE,CAAC;IACT,KAAK,EAAE,CAAC;IACR,MAAM,EAAE,EAAE;IACV,QAAQ,EAAE,EAAE;IACZ,QAAQ,EAAE,EAAE;IACZ,QAAQ,EAAE,KAAK;IACf,MAAM,EAAE,EAAE;IACV,KAAK,EAAE,SAAS;IAChB,kBAAkB,EAAE,IAAI;IACxB,qBAAqB,EAAE,IAAI;IAC3B,eAAe,EAAE,EAAE;IACnB,gBAAgB,EAAE,EAAE;IACpB,aAAa,EAAE,IAAI;IACnB,WAAW,EAAE,IAAI;IACjB,aAAa,EAAE,EAAE;IACjB,OAAO,EAAE,IAAI;IACb,IAAI,EAAE,IAAI;CACX,CAAA;AAGD,IAAM,uBAAuB,GAA7B,MAAM,uBAAwB,SAAQ,UAAU;IAAhD;;QAC8B,UAAK,GAA4B,EAAE,CAAA;IA2FjE,CAAC;IAxFC,MAAM;QACJ,OAAO,IAAI,CA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EAAE;YACd,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,KAAK,CAAA;SAChC;aAAM;YACL,IAAI,CAAC,KAAK,GAAG;gBACX,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,KAAK;aACrB,CAAA;SACF;QAED,IAAI,CAAC,aAAa,CAChB,IAAI,WAAW,CAAC,iBAAiB,EAAE;YACjC,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI;YACd,MAAM,EAAE,IAAI,CAAC,KAAK;SACnB,CAAC,CACH,CAAA;IACH,CAAC;CACF,CAAA;AA3F6B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;sDAAoC;AACpC;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;sDAAuB;AAF7C,uBAAuB;IAD5B,aAAa,CAAC,4BAA4B,CAAC;GACtC,uBAAuB,CA4F5B","sourcesContent":["/**\n * @license Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport { html, LitElement, PropertyValues } 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 <ox-properties-dynamic-view 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 </ox-properties-dynamic-view>\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 const { label, type, name, placeholder, editor, quantifier, observe, property } = spec\n\n let elementType = OxPropertyEditor.getEditor(type)\n if (!elementType) {\n console.warn('Property Editor not defined', type)\n return\n }\n let element = document.createElement(elementType) as OxPropertyEditor\n\n element.label = label\n element.type = type\n element.placeholder = placeholder\n element.name = name\n element.setAttribute('name', name)\n element.editor = editor\n element.quantifier = quantifier\n\n if (observe) {\n element.observe = observe\n }\n element.property = 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 if (this.value) {\n this.value[name] = editor.value\n } else {\n this.value = {\n [name]: editor.value\n }\n }\n\n this.dispatchEvent(\n new CustomEvent('property-change', {\n bubbles: true,\n composed: true,\n detail: this.value\n })\n )\n }\n}\n"]}
@@ -1,5 +1,6 @@
1
1
  import '@operato/input/ox-input-angle.js';
2
2
  import { OxPropertyEditor } from './ox-property-editor.js';
3
+ import { PropertySpec } from './types.js';
3
4
  export declare class OxPropertyEditorAngle extends OxPropertyEditor {
4
- editorTemplate(): import("lit-html").TemplateResult<1>;
5
+ editorTemplate(value: any, spec: PropertySpec): import("lit-html").TemplateResult<1>;
5
6
  }
@@ -1,13 +1,11 @@
1
1
  import { __decorate } from "tslib";
2
2
  import '@operato/input/ox-input-angle.js';
3
- import { OxPropertyEditor } from './ox-property-editor.js';
4
- import { customElement } from 'lit/decorators.js';
5
3
  import { html } from 'lit';
4
+ import { customElement } from 'lit/decorators.js';
5
+ import { OxPropertyEditor } from './ox-property-editor.js';
6
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
- `;
7
+ editorTemplate(value, spec) {
8
+ return html ` <ox-input-angle id="editor" .radian=${value} placeholder=${spec.placeholder || ''}></ox-input-angle> `;
11
9
  }
12
10
  };
13
11
  OxPropertyEditorAngle = __decorate([
@@ -1 +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"]}
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,IAAI,EAAE,MAAM,KAAK,CAAA;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAI1D,IAAa,qBAAqB,GAAlC,MAAa,qBAAsB,SAAQ,gBAAgB;IACzD,cAAc,CAAC,KAAU,EAAE,IAAkB;QAC3C,OAAO,IAAI,CAAA,wCAAwC,KAAK,gBAAgB,IAAI,CAAC,WAAW,IAAI,EAAE,qBAAqB,CAAA;IACrH,CAAC;CACF,CAAA;AAJY,qBAAqB;IADjC,aAAa,CAAC,0BAA0B,CAAC;GAC7B,qBAAqB,CAIjC;SAJY,qBAAqB","sourcesContent":["import '@operato/input/ox-input-angle.js'\n\nimport { html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\nimport { OxPropertyEditor } from './ox-property-editor.js'\nimport { PropertySpec } from './types.js'\n\n@customElement('ox-property-editor-angle')\nexport class OxPropertyEditorAngle extends OxPropertyEditor {\n editorTemplate(value: any, spec: PropertySpec) {\n return html` <ox-input-angle id=\"editor\" .radian=${value} placeholder=${spec.placeholder || ''}></ox-input-angle> `\n }\n}\n"]}
@@ -1,6 +1,7 @@
1
1
  import '@operato/input/ox-checkbox.js';
2
2
  import { OxPropertyEditor } from './ox-property-editor.js';
3
+ import { PropertySpec } from './types.js';
3
4
  export declare class OxPropertyEditorCheckbox extends OxPropertyEditor {
4
5
  get valueProperty(): string;
5
- editorTemplate(): import("lit-html").TemplateResult<1>;
6
+ editorTemplate(value: any, spec: PropertySpec): import("lit-html").TemplateResult<1>;
6
7
  }
@@ -1,14 +1,14 @@
1
1
  import { __decorate } from "tslib";
2
2
  import '@operato/input/ox-checkbox.js';
3
- import { OxPropertyEditor } from './ox-property-editor.js';
4
- import { customElement } from 'lit/decorators.js';
5
3
  import { html } from 'lit';
4
+ import { customElement } from 'lit/decorators.js';
5
+ import { OxPropertyEditor } from './ox-property-editor.js';
6
6
  let OxPropertyEditorCheckbox = class OxPropertyEditorCheckbox extends OxPropertyEditor {
7
7
  get valueProperty() {
8
8
  return 'checked';
9
9
  }
10
- editorTemplate() {
11
- return html ` <ox-checkbox id="editor" ?checked=${this.value}></ox-checkbox>`;
10
+ editorTemplate(value, spec) {
11
+ return html ` <ox-checkbox id="editor" ?checked=${value}></ox-checkbox>`;
12
12
  }
13
13
  };
14
14
  OxPropertyEditorCheckbox = __decorate([
@@ -1 +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"]}
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,IAAI,EAAE,MAAM,KAAK,CAAA;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAI1D,IAAa,wBAAwB,GAArC,MAAa,wBAAyB,SAAQ,gBAAgB;IAC5D,IAAI,aAAa;QACf,OAAO,SAAS,CAAA;IAClB,CAAC;IAED,cAAc,CAAC,KAAU,EAAE,IAAkB;QAC3C,OAAO,IAAI,CAAA,sCAAsC,KAAK,iBAAiB,CAAA;IACzE,CAAC;CACF,CAAA;AARY,wBAAwB;IADpC,aAAa,CAAC,6BAA6B,CAAC;GAChC,wBAAwB,CAQpC;SARY,wBAAwB","sourcesContent":["import '@operato/input/ox-checkbox.js'\n\nimport { html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\nimport { OxPropertyEditor } from './ox-property-editor.js'\nimport { PropertySpec } from './types.js'\n\n@customElement('ox-property-editor-checkbox')\nexport class OxPropertyEditorCheckbox extends OxPropertyEditor {\n get valueProperty() {\n return 'checked'\n }\n\n editorTemplate(value: any, spec: PropertySpec) {\n return html` <ox-checkbox id=\"editor\" ?checked=${value}></ox-checkbox>`\n }\n}\n"]}
@@ -1,5 +1,6 @@
1
1
  import '@operato/input/ox-input-color.js';
2
2
  import { OxPropertyEditor } from './ox-property-editor.js';
3
+ import { PropertySpec } from './types.js';
3
4
  export declare class OxPropertyEditorColor extends OxPropertyEditor {
4
- editorTemplate(): import("lit-html").TemplateResult<1>;
5
+ editorTemplate(value: any, spec: PropertySpec): import("lit-html").TemplateResult<1>;
5
6
  }
@@ -1,17 +1,12 @@
1
1
  import { __decorate } from "tslib";
2
2
  import '@operato/input/ox-input-color.js';
3
- import { OxPropertyEditor } from './ox-property-editor.js';
4
- import { customElement } from 'lit/decorators.js';
5
3
  import { html } from 'lit';
4
+ import { customElement } from 'lit/decorators.js';
5
+ import { OxPropertyEditor } from './ox-property-editor.js';
6
6
  let OxPropertyEditorColor = class OxPropertyEditorColor extends OxPropertyEditor {
7
- editorTemplate() {
7
+ editorTemplate(value, spec) {
8
8
  return html `
9
- <ox-input-color
10
- id="editor"
11
- .value=${this.value}
12
- placeholder=${this.placeholder || ''}
13
- .properties=${this.property}
14
- >
9
+ <ox-input-color id="editor" .value=${value} placeholder=${spec.placeholder || ''} .properties=${spec.property}>
15
10
  </ox-input-color>
16
11
  `;
17
12
  }
@@ -1 +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"]}
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,IAAI,EAAE,MAAM,KAAK,CAAA;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAI1D,IAAa,qBAAqB,GAAlC,MAAa,qBAAsB,SAAQ,gBAAgB;IACzD,cAAc,CAAC,KAAU,EAAE,IAAkB;QAC3C,OAAO,IAAI,CAAA;2CAC4B,KAAK,gBAAgB,IAAI,CAAC,WAAW,IAAI,EAAE,gBAAgB,IAAI,CAAC,QAAQ;;KAE9G,CAAA;IACH,CAAC;CACF,CAAA;AAPY,qBAAqB;IADjC,aAAa,CAAC,0BAA0B,CAAC;GAC7B,qBAAqB,CAOjC;SAPY,qBAAqB","sourcesContent":["import '@operato/input/ox-input-color.js'\n\nimport { html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\nimport { OxPropertyEditor } from './ox-property-editor.js'\nimport { PropertySpec } from './types.js'\n\n@customElement('ox-property-editor-color')\nexport class OxPropertyEditorColor extends OxPropertyEditor {\n editorTemplate(value: any, spec: PropertySpec) {\n return html`\n <ox-input-color id=\"editor\" .value=${value} placeholder=${spec.placeholder || ''} .properties=${spec.property}>\n </ox-input-color>\n `\n }\n}\n"]}