@operato/board 1.0.0-beta.9 → 1.0.0

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 (61) hide show
  1. package/CHANGELOG.md +372 -0
  2. package/demo/index-modeller.html +1 -1
  3. package/demo/index-player.html +1 -1
  4. package/demo/index-viewer.html +1 -1
  5. package/demo/index.html +1 -1
  6. package/dist/src/data-storage/data-storage.d.ts +8 -0
  7. package/dist/src/data-storage/data-storage.js +28 -0
  8. package/dist/src/data-storage/data-storage.js.map +1 -0
  9. package/dist/src/graphql/data-subscription.d.ts +1 -3
  10. package/dist/src/index.d.ts +7 -6
  11. package/dist/src/index.js +7 -6
  12. package/dist/src/index.js.map +1 -1
  13. package/dist/src/modeller/property-sidebar/data-binding/data-binding-mapper.d.ts +1 -0
  14. package/dist/src/modeller/property-sidebar/data-binding/data-binding-mapper.js +40 -7
  15. package/dist/src/modeller/property-sidebar/data-binding/data-binding-mapper.js.map +1 -1
  16. package/dist/src/modeller/property-sidebar/data-binding/data-binding.js +7 -0
  17. package/dist/src/modeller/property-sidebar/data-binding/data-binding.js.map +1 -1
  18. package/dist/src/modeller/property-sidebar/effects/effects-shared-style.js +4 -0
  19. package/dist/src/modeller/property-sidebar/effects/effects-shared-style.js.map +1 -1
  20. package/dist/src/modeller/property-sidebar/inspector/inspector.d.ts +1 -1
  21. package/dist/src/modeller/property-sidebar/inspector/inspector.js +6 -4
  22. package/dist/src/modeller/property-sidebar/inspector/inspector.js.map +1 -1
  23. package/dist/src/modeller/property-sidebar/property-shared-style.js +4 -0
  24. package/dist/src/modeller/property-sidebar/property-shared-style.js.map +1 -1
  25. package/dist/src/modeller/property-sidebar/property-sidebar.js +2 -0
  26. package/dist/src/modeller/property-sidebar/property-sidebar.js.map +1 -1
  27. package/dist/src/modeller/property-sidebar/specifics/specific-properties-builder.js +15 -11
  28. package/dist/src/modeller/property-sidebar/specifics/specific-properties-builder.js.map +1 -1
  29. package/dist/src/modeller/property-sidebar/styles/styles.d.ts +1 -0
  30. package/dist/src/modeller/property-sidebar/styles/styles.js +4 -3
  31. package/dist/src/modeller/property-sidebar/styles/styles.js.map +1 -1
  32. package/dist/src/modeller/scene-viewer/ox-scene-player.js +2 -2
  33. package/dist/src/modeller/scene-viewer/ox-scene-player.js.map +1 -1
  34. package/dist/src/modeller/scene-viewer/ox-scene-viewer.d.ts +1 -1
  35. package/dist/src/modeller/scene-viewer/ox-scene-viewer.js +3 -3
  36. package/dist/src/modeller/scene-viewer/ox-scene-viewer.js.map +1 -1
  37. package/dist/src/ox-board-list.js +1 -1
  38. package/dist/src/ox-board-list.js.map +1 -1
  39. package/dist/src/ox-board-viewer.d.ts +1 -0
  40. package/dist/src/ox-board-viewer.js +13 -7
  41. package/dist/src/ox-board-viewer.js.map +1 -1
  42. package/dist/src/player/ox-board-wrapper.js +2 -2
  43. package/dist/src/player/ox-board-wrapper.js.map +1 -1
  44. package/dist/tsconfig.tsbuildinfo +1 -1
  45. package/package.json +20 -19
  46. package/src/data-storage/data-storage.ts +47 -0
  47. package/src/index.ts +7 -6
  48. package/src/modeller/property-sidebar/data-binding/data-binding-mapper.ts +44 -10
  49. package/src/modeller/property-sidebar/data-binding/data-binding.ts +10 -2
  50. package/src/modeller/property-sidebar/effects/effects-shared-style.ts +4 -0
  51. package/src/modeller/property-sidebar/inspector/inspector.ts +7 -4
  52. package/src/modeller/property-sidebar/property-shared-style.ts +4 -0
  53. package/src/modeller/property-sidebar/property-sidebar.ts +2 -0
  54. package/src/modeller/property-sidebar/specifics/specific-properties-builder.ts +17 -12
  55. package/src/modeller/property-sidebar/styles/styles.ts +5 -4
  56. package/src/modeller/scene-viewer/ox-scene-player.ts +2 -2
  57. package/src/modeller/scene-viewer/ox-scene-viewer.ts +4 -3
  58. package/src/ox-board-list.ts +1 -1
  59. package/src/ox-board-viewer.ts +13 -7
  60. package/src/player/ox-board-wrapper.ts +2 -2
  61. package/yarn-error.log +0 -18355
package/CHANGELOG.md CHANGED
@@ -3,6 +3,378 @@
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](https://github.com/hatiolab/operato/compare/v1.0.0-beta.51...v1.0.0) (2022-07-24)
7
+
8
+
9
+ ### :bug: Bug Fix
10
+
11
+ * upgrade dependencies ([4334162](https://github.com/hatiolab/operato/commit/4334162315a58b3f583069003b3cde6ac30dcff7))
12
+
13
+
14
+
15
+ ## [1.0.0-beta.51](https://github.com/hatiolab/operato/compare/v1.0.0-beta.50...v1.0.0-beta.51) (2022-07-22)
16
+
17
+ **Note:** Version bump only for package @operato/board
18
+
19
+
20
+
21
+
22
+
23
+ ## [1.0.0-beta.50](https://github.com/hatiolab/operato/compare/v1.0.0-beta.49...v1.0.0-beta.50) (2022-07-18)
24
+
25
+ **Note:** Version bump only for package @operato/board
26
+
27
+
28
+
29
+
30
+
31
+ ## [1.0.0-beta.49](https://github.com/hatiolab/operato/compare/v1.0.0-beta.48...v1.0.0-beta.49) (2022-07-17)
32
+
33
+ **Note:** Version bump only for package @operato/board
34
+
35
+
36
+
37
+
38
+
39
+ ## [1.0.0-beta.48](https://github.com/hatiolab/operato/compare/v1.0.0-beta.47...v1.0.0-beta.48) (2022-07-17)
40
+
41
+ **Note:** Version bump only for package @operato/board
42
+
43
+
44
+
45
+
46
+
47
+ ## [1.0.0-beta.47](https://github.com/hatiolab/operato/compare/v1.0.0-beta.46...v1.0.0-beta.47) (2022-07-15)
48
+
49
+ **Note:** Version bump only for package @operato/board
50
+
51
+
52
+
53
+
54
+
55
+ ## [1.0.0-beta.46](https://github.com/hatiolab/operato/compare/v1.0.0-beta.45...v1.0.0-beta.46) (2022-07-11)
56
+
57
+
58
+ ### :bug: Bug Fix
59
+
60
+ * property-editor spec. changed ([b10e4ef](https://github.com/hatiolab/operato/commit/b10e4ef151450a0ca19cbf00c9c96da80ddaaed8))
61
+
62
+
63
+
64
+ ## [1.0.0-beta.45](https://github.com/hatiolab/operato/compare/v1.0.0-beta.44...v1.0.0-beta.45) (2022-07-09)
65
+
66
+
67
+ ### :bug: Bug Fix
68
+
69
+ * upgrade dependencies ([4986392](https://github.com/hatiolab/operato/commit/4986392e64524b5602cc9a144def239e85524bee))
70
+
71
+
72
+
73
+ ## [1.0.0-beta.44](https://github.com/hatiolab/operato/compare/v1.0.0-beta.43...v1.0.0-beta.44) (2022-07-07)
74
+
75
+
76
+ ### :bug: Bug Fix
77
+
78
+ * board property-editor style, option-able fullwidth, ox-input-select event ([6d181de](https://github.com/hatiolab/operato/commit/6d181de26467ee0f1733f6367049517c69383f31))
79
+
80
+
81
+
82
+ ## [1.0.0-beta.43](https://github.com/hatiolab/operato/compare/v1.0.0-beta.42...v1.0.0-beta.43) (2022-07-03)
83
+
84
+ **Note:** Version bump only for package @operato/board
85
+
86
+
87
+
88
+
89
+
90
+ ## [1.0.0-beta.42](https://github.com/hatiolab/operato/compare/v1.0.0-beta.41...v1.0.0-beta.42) (2022-07-03)
91
+
92
+
93
+ ### :bug: Bug Fix
94
+
95
+ * latest things-scene ([5eddda1](https://github.com/hatiolab/operato/commit/5eddda1850196c793a8aa0ca66e445000f8d3226))
96
+
97
+
98
+
99
+ ## [1.0.0-beta.41](https://github.com/hatiolab/operato/compare/v1.0.0-beta.40...v1.0.0-beta.41) (2022-06-30)
100
+
101
+ **Note:** Version bump only for package @operato/board
102
+
103
+
104
+
105
+
106
+
107
+ ## [1.0.0-beta.40](https://github.com/hatiolab/operato/compare/v1.0.0-beta.39...v1.0.0-beta.40) (2022-06-29)
108
+
109
+
110
+ ### :bug: Bug Fix
111
+
112
+ * latest @hatiolab/things-scene ([da99f9f](https://github.com/hatiolab/operato/commit/da99f9f6ac413f68b6f3bee9edd3162562c0a7f9))
113
+
114
+
115
+
116
+ ## [1.0.0-beta.39](https://github.com/hatiolab/operato/compare/v1.0.0-beta.38...v1.0.0-beta.39) (2022-06-22)
117
+
118
+
119
+ ### :bug: Bug Fix
120
+
121
+ * latest @hatiolab/things-scene ([da3bf6e](https://github.com/hatiolab/operato/commit/da3bf6e5194a99f5306e4d9e05fc47ea042ce8d3))
122
+
123
+
124
+ ### :rocket: New Features
125
+
126
+ * [#42](https://github.com/hatiolab/operato/issues/42) enhance properties for board pattern ([a2b8346](https://github.com/hatiolab/operato/commit/a2b8346d05ffebd82c22e067aaac8047741f73d0))
127
+
128
+
129
+
130
+ ## [1.0.0-beta.38](https://github.com/hatiolab/operato/compare/v1.0.0-beta.37...v1.0.0-beta.38) (2022-06-20)
131
+
132
+ **Note:** Version bump only for package @operato/board
133
+
134
+
135
+
136
+
137
+
138
+ ## [1.0.0-beta.37](https://github.com/hatiolab/operato/compare/v1.0.0-beta.36...v1.0.0-beta.37) (2022-06-20)
139
+
140
+ **Note:** Version bump only for package @operato/board
141
+
142
+
143
+
144
+
145
+
146
+ ## [1.0.0-beta.36](https://github.com/hatiolab/operato/compare/v1.0.0-beta.35...v1.0.0-beta.36) (2022-06-16)
147
+
148
+ **Note:** Version bump only for package @operato/board
149
+
150
+
151
+
152
+
153
+
154
+ ## [1.0.0-beta.35](https://github.com/hatiolab/operato/compare/v1.0.0-beta.34...v1.0.0-beta.35) (2022-06-16)
155
+
156
+ **Note:** Version bump only for package @operato/board
157
+
158
+
159
+
160
+
161
+
162
+ ## [1.0.0-beta.34](https://github.com/hatiolab/operato/compare/v1.0.0-beta.33...v1.0.0-beta.34) (2022-06-16)
163
+
164
+
165
+ ### :bug: Bug Fix
166
+
167
+ * update @hatiolab/things-scene ([3e4e96a](https://github.com/hatiolab/operato/commit/3e4e96ae75079fd91a67252243ef2679e45ef810))
168
+
169
+
170
+
171
+ ## [1.0.0-beta.33](https://github.com/hatiolab/operato/compare/v1.0.0-beta.32...v1.0.0-beta.33) (2022-06-16)
172
+
173
+
174
+ ### :bug: Bug Fix
175
+
176
+ * scene release ([d1ce53c](https://github.com/hatiolab/operato/commit/d1ce53cbf32cb1425812d007f3ecae4089ff8e3d))
177
+
178
+
179
+
180
+ ## [1.0.0-beta.32](https://github.com/hatiolab/operato/compare/v1.0.0-beta.31...v1.0.0-beta.32) (2022-06-15)
181
+
182
+ **Note:** Version bump only for package @operato/board
183
+
184
+
185
+
186
+
187
+
188
+ ## [1.0.0-beta.31](https://github.com/hatiolab/operato/compare/v1.0.0-beta.30...v1.0.0-beta.31) (2022-06-15)
189
+
190
+ **Note:** Version bump only for package @operato/board
191
+
192
+
193
+
194
+
195
+
196
+ ## [1.0.0-beta.30](https://github.com/hatiolab/operato/compare/v1.0.0-beta.29...v1.0.0-beta.30) (2022-06-13)
197
+
198
+ **Note:** Version bump only for package @operato/board
199
+
200
+
201
+
202
+
203
+
204
+ ## [1.0.0-beta.29](https://github.com/hatiolab/operato/compare/v1.0.0-beta.28...v1.0.0-beta.29) (2022-06-10)
205
+
206
+ **Note:** Version bump only for package @operato/board
207
+
208
+
209
+
210
+
211
+
212
+ ## [1.0.0-beta.28](https://github.com/hatiolab/operato/compare/v1.0.0-beta.27...v1.0.0-beta.28) (2022-06-10)
213
+
214
+ **Note:** Version bump only for package @operato/board
215
+
216
+
217
+
218
+
219
+
220
+ ## [1.0.0-beta.27](https://github.com/hatiolab/operato/compare/v1.0.0-beta.26...v1.0.0-beta.27) (2022-06-09)
221
+
222
+
223
+ ### :bug: Bug Fix
224
+
225
+ * input style ([a5d9c0e](https://github.com/hatiolab/operato/commit/a5d9c0eacc89522e26fe5e982b3a5ece9666b85f))
226
+ * ox-board-list ([ddf9e85](https://github.com/hatiolab/operato/commit/ddf9e85a7ae83dee28e7b2b1a60f24b88414fc83))
227
+
228
+
229
+
230
+ ## [1.0.0-beta.26](https://github.com/hatiolab/operato/compare/v1.0.0-beta.25...v1.0.0-beta.26) (2022-06-04)
231
+
232
+ **Note:** Version bump only for package @operato/board
233
+
234
+
235
+
236
+
237
+
238
+ ## [1.0.0-beta.25](https://github.com/hatiolab/operato/compare/v1.0.0-beta.24...v1.0.0-beta.25) (2022-06-02)
239
+
240
+ **Note:** Version bump only for package @operato/board
241
+
242
+
243
+
244
+
245
+
246
+ ## [1.0.0-beta.24](https://github.com/hatiolab/operato/compare/v1.0.0-beta.23...v1.0.0-beta.24) (2022-06-02)
247
+
248
+ **Note:** Version bump only for package @operato/board
249
+
250
+
251
+
252
+
253
+
254
+ ## [1.0.0-beta.23](https://github.com/hatiolab/operato/compare/v1.0.0-beta.22...v1.0.0-beta.23) (2022-06-02)
255
+
256
+ **Note:** Version bump only for package @operato/board
257
+
258
+
259
+
260
+
261
+
262
+ ## [1.0.0-beta.22](https://github.com/hatiolab/operato/compare/v1.0.0-beta.21...v1.0.0-beta.22) (2022-05-31)
263
+
264
+ **Note:** Version bump only for package @operato/board
265
+
266
+
267
+
268
+
269
+
270
+ ## [1.0.0-beta.21](https://github.com/hatiolab/operato/compare/v1.0.0-beta.20...v1.0.0-beta.21) (2022-05-31)
271
+
272
+
273
+ ### :bug: Bug Fix
274
+
275
+ * inspector ([a787dfa](https://github.com/hatiolab/operato/commit/a787dfa93aa4b851c4ef34ed29240ba07ffefe5d))
276
+
277
+
278
+
279
+ ## [1.0.0-beta.20](https://github.com/hatiolab/operato/compare/v1.0.0-beta.19...v1.0.0-beta.20) (2022-05-30)
280
+
281
+
282
+ ### :rocket: New Features
283
+
284
+ * persistent data for board ([02875a1](https://github.com/hatiolab/operato/commit/02875a1117d490343d742241d71b606d76e10c1b))
285
+
286
+
287
+
288
+ ## [1.0.0-beta.19](https://github.com/hatiolab/operato/compare/v1.0.0-beta.18...v1.0.0-beta.19) (2022-05-29)
289
+
290
+
291
+ ### :bug: Bug Fix
292
+
293
+ * no data no spreading for operato/board ([c608dd6](https://github.com/hatiolab/operato/commit/c608dd644e964df55cdd697e3a5059a59efd17f3))
294
+
295
+
296
+
297
+ ## [1.0.0-beta.18](https://github.com/hatiolab/operato/compare/v1.0.0-beta.17...v1.0.0-beta.18) (2022-05-27)
298
+
299
+ **Note:** Version bump only for package @operato/board
300
+
301
+
302
+
303
+
304
+
305
+ ## [1.0.0-beta.17](https://github.com/hatiolab/operato/compare/v1.0.0-beta.16...v1.0.0-beta.17) (2022-05-25)
306
+
307
+ **Note:** Version bump only for package @operato/board
308
+
309
+
310
+
311
+
312
+
313
+ ## [1.0.0-beta.16](https://github.com/hatiolab/operato/compare/v1.0.0-beta.15...v1.0.0-beta.16) (2022-05-23)
314
+
315
+ **Note:** Version bump only for package @operato/board
316
+
317
+
318
+
319
+
320
+
321
+ ## [1.0.0-beta.15](https://github.com/hatiolab/operato/compare/v1.0.0-beta.14...v1.0.0-beta.15) (2022-05-20)
322
+
323
+ **Note:** Version bump only for package @operato/board
324
+
325
+
326
+
327
+
328
+
329
+ ## [1.0.0-beta.14](https://github.com/hatiolab/operato/compare/v1.0.0-beta.13...v1.0.0-beta.14) (2022-05-19)
330
+
331
+ **Note:** Version bump only for package @operato/board
332
+
333
+
334
+
335
+
336
+
337
+ ## [1.0.0-beta.13](https://github.com/hatiolab/operato/compare/v1.0.0-beta.12...v1.0.0-beta.13) (2022-05-19)
338
+
339
+
340
+ ### :bug: Bug Fix
341
+
342
+ * incorrect package.json scripts for storybooks ([8c8c405](https://github.com/hatiolab/operato/commit/8c8c405443247108b9c411b8161c008d9b6a2261))
343
+
344
+
345
+
346
+ ## [1.0.0-beta.12](https://github.com/hatiolab/operato/compare/v1.0.0-beta.11...v1.0.0-beta.12) (2022-05-13)
347
+
348
+
349
+ ### :rocket: New Features
350
+
351
+ * storybook started ([90c08c9](https://github.com/hatiolab/operato/commit/90c08c9a15e5fe554baaa1becca07793e8434799))
352
+
353
+
354
+
355
+ ## [1.0.0-beta.11](https://github.com/hatiolab/operato/compare/v1.0.0-beta.10...v1.0.0-beta.11) (2022-05-01)
356
+
357
+
358
+ ### :rocket: New Features
359
+
360
+ * separated filter-form from data-grist ([21e27f7](https://github.com/hatiolab/operato/commit/21e27f74d3e66d782da4aa75801c39a037627f62))
361
+
362
+
363
+ ### :bug: Bug Fix
364
+
365
+ * board modeller error log on close board ([7326705](https://github.com/hatiolab/operato/commit/73267052c75ab8f386db22bba9816e2012437fbd))
366
+ * input-data, input-script height ([a151994](https://github.com/hatiolab/operato/commit/a151994f06285799d8e05fb6842f8a7f8b13660d))
367
+
368
+
369
+
370
+ ## [1.0.0-beta.10](https://github.com/hatiolab/operato/compare/v1.0.0-beta.9...v1.0.0-beta.10) (2022-04-28)
371
+
372
+ **Note:** Version bump only for package @operato/board
373
+
374
+
375
+
376
+
377
+
6
378
  ## [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
379
 
8
380
  **Note:** Version bump only for package @operato/board
@@ -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;
@@ -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;
@@ -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;
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;
@@ -0,0 +1,8 @@
1
+ import { Component, PersistentDataStorage } from '@hatiolab/things-scene';
2
+ export declare class DataStorage implements PersistentDataStorage {
3
+ private id;
4
+ constructor(id: string);
5
+ load(key: Component): Promise<any>;
6
+ save(key: Component, value: any): Promise<void>;
7
+ clear(key: Component): Promise<void>;
8
+ }
@@ -0,0 +1,28 @@
1
+ import Dexie from 'dexie';
2
+ class BoardDatabase extends Dexie {
3
+ //...other tables goes here...
4
+ constructor() {
5
+ super('operato-board-database');
6
+ this.version(1).stores({
7
+ board_data: '[board+refid]'
8
+ //...other tables goes here...
9
+ });
10
+ }
11
+ }
12
+ const db = new BoardDatabase();
13
+ export class DataStorage {
14
+ constructor(id) {
15
+ this.id = id;
16
+ }
17
+ async load(key) {
18
+ const saved = await db.board_data.where({ board: this.id, refid: key.state.refid }).first();
19
+ return saved === null || saved === void 0 ? void 0 : saved.data;
20
+ }
21
+ async save(key, value) {
22
+ await db.board_data.put({ board: this.id, refid: key.state.refid, data: value, timestamp: Date.now() });
23
+ }
24
+ async clear(key) {
25
+ await db.board_data.where({ board: this.id, refid: key.state.refid }).delete();
26
+ }
27
+ }
28
+ //# sourceMappingURL=data-storage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data-storage.js","sourceRoot":"","sources":["../../../src/data-storage/data-storage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,MAAM,aAAc,SAAQ,KAAK;IAE/B,8BAA8B;IAE9B;QACE,KAAK,CAAC,wBAAwB,CAAC,CAAA;QAC/B,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;YACrB,UAAU,EAAE,eAAe;YAC3B,8BAA8B;SAC/B,CAAC,CAAA;IACJ,CAAC;CACF;AAUD,MAAM,EAAE,GAAG,IAAI,aAAa,EAAE,CAAA;AAE9B,MAAM,OAAO,WAAW;IAGtB,YAAY,EAAU;QACpB,IAAI,CAAC,EAAE,GAAG,EAAE,CAAA;IACd,CAAC;IAEM,KAAK,CAAC,IAAI,CAAC,GAAc;QAC9B,MAAM,KAAK,GAAG,MAAM,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,EAAE,KAAK,EAAE,GAAG,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,CAAA;QAC3F,OAAO,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,CAAA;IACpB,CAAC;IAEM,KAAK,CAAC,IAAI,CAAC,GAAc,EAAE,KAAU;QAC1C,MAAM,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,EAAE,KAAK,EAAE,GAAG,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE,EAAE,CAAC,CAAA;IACzG,CAAC;IAEM,KAAK,CAAC,KAAK,CAAC,GAAc;QAC/B,MAAM,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,EAAE,KAAK,EAAE,GAAG,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAA;IAChF,CAAC;CACF","sourcesContent":["import Dexie from 'dexie'\n\nimport { Component, PersistentDataStorage } from '@hatiolab/things-scene'\n\nclass BoardDatabase extends Dexie {\n board_data!: Dexie.Table<IBoardData, number> // number = type of the primkey\n //...other tables goes here...\n\n constructor() {\n super('operato-board-database')\n this.version(1).stores({\n board_data: '[board+refid]'\n //...other tables goes here...\n })\n }\n}\n\ninterface IBoardData {\n id?: number\n board: string\n refid: string | number\n data: any\n timestamp: number\n}\n\nconst db = new BoardDatabase()\n\nexport class DataStorage implements PersistentDataStorage {\n private id: string\n\n constructor(id: string) {\n this.id = id\n }\n\n public async load(key: Component): Promise<any> {\n const saved = await db.board_data.where({ board: this.id, refid: key.state.refid }).first()\n return saved?.data\n }\n\n public async save(key: Component, value: any): Promise<void> {\n await db.board_data.put({ board: this.id, refid: key.state.refid, data: value, timestamp: Date.now() })\n }\n\n public async clear(key: Component): Promise<void> {\n await db.board_data.where({ board: this.id, refid: key.state.refid }).delete()\n }\n}\n"]}
@@ -1,7 +1,5 @@
1
1
  import { Component, DataSubscriptionProvider } from '@hatiolab/things-scene';
2
2
  export declare class DataSubscriptionProviderImpl implements DataSubscriptionProvider {
3
- subscribe(tag: string, component: Component): Promise<{
4
- unsubscribe(): void;
5
- }>;
3
+ subscribe(tag: string, component: Component): Promise<import("zen-observable-ts").Subscription>;
6
4
  dispose(): void;
7
5
  }
@@ -1,6 +1,7 @@
1
- export * from './types';
2
- export { registerDefaultGroups } from './component/register-default-groups';
3
- export * from './ox-board-viewer';
4
- export * from './ox-board-player';
5
- export * from './ox-board-modeller';
6
- export * from './ox-board-list';
1
+ export * from './types.js';
2
+ export { registerDefaultGroups } from './component/register-default-groups.js';
3
+ export { DataStorage } from './data-storage/data-storage.js';
4
+ export * from './ox-board-viewer.js';
5
+ export * from './ox-board-player.js';
6
+ export * from './ox-board-modeller.js';
7
+ export * from './ox-board-list.js';
package/dist/src/index.js CHANGED
@@ -1,7 +1,8 @@
1
- export * from './types';
2
- export { registerDefaultGroups } from './component/register-default-groups';
3
- export * from './ox-board-viewer';
4
- export * from './ox-board-player';
5
- export * from './ox-board-modeller';
6
- export * from './ox-board-list';
1
+ export * from './types.js';
2
+ export { registerDefaultGroups } from './component/register-default-groups.js';
3
+ export { DataStorage } from './data-storage/data-storage.js';
4
+ export * from './ox-board-viewer.js';
5
+ export * from './ox-board-player.js';
6
+ export * from './ox-board-modeller.js';
7
+ export * from './ox-board-list.js';
7
8
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AAEvB,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAA;AAE3E,cAAc,mBAAmB,CAAA;AACjC,cAAc,mBAAmB,CAAA;AACjC,cAAc,qBAAqB,CAAA;AACnC,cAAc,iBAAiB,CAAA","sourcesContent":["export * from './types'\n\nexport { registerDefaultGroups } from './component/register-default-groups'\n\nexport * from './ox-board-viewer'\nexport * from './ox-board-player'\nexport * from './ox-board-modeller'\nexport * from './ox-board-list'\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAE1B,OAAO,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAA;AAC9E,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAA;AAE5D,cAAc,sBAAsB,CAAA;AACpC,cAAc,sBAAsB,CAAA;AACpC,cAAc,wBAAwB,CAAA;AACtC,cAAc,oBAAoB,CAAA","sourcesContent":["export * from './types.js'\n\nexport { registerDefaultGroups } from './component/register-default-groups.js'\nexport { DataStorage } from './data-storage/data-storage.js'\n\nexport * from './ox-board-viewer.js'\nexport * from './ox-board-player.js'\nexport * from './ox-board-modeller.js'\nexport * from './ox-board-list.js'\n"]}
@@ -19,6 +19,7 @@ export declare type Mapping = {
19
19
  target?: string;
20
20
  property?: string;
21
21
  param?: Rule;
22
+ ndnsp?: boolean;
22
23
  };
23
24
  /**
24
25
  element for mapping data value editing
@@ -7,7 +7,7 @@ import '@operato/input/ox-input-value-ranges.js';
7
7
  import '@operato/input/ox-buttons-radio.js';
8
8
  import '@operato/input/ox-input-code.js';
9
9
  import '@operato/i18n/ox-i18n.js';
10
- import { css, html, LitElement } from 'lit';
10
+ import { LitElement, css, html } from 'lit';
11
11
  import { customElement, property, query, state } from 'lit/decorators.js';
12
12
  /**
13
13
  element for mapping data value editing
@@ -105,7 +105,7 @@ let DataBindingMapper = class DataBindingMapper extends LitElement {
105
105
  <div data-value="eval"><ox-i18n msgid="label.eval"></ox-i18n></div>
106
106
  </ox-buttons-radio>
107
107
 
108
- <div rule-editors class="content" ?hidden=${mapping.rule == 'value'}>
108
+ <div rule-editors ?hidden=${mapping.rule == 'value'}>
109
109
  <ox-input-value-map
110
110
  value-key="map"
111
111
  .value=${this.rule.map || {}}
@@ -130,6 +130,11 @@ let DataBindingMapper = class DataBindingMapper extends LitElement {
130
130
  >
131
131
  </ox-input-code>
132
132
  </div>
133
+
134
+ <div class="checkbox-row">
135
+ <input id="checkbox-ndnsp" type="checkbox" value-key="ndnsp" .checked=${mapping.ndnsp === true} />
136
+ <label for="checkbox-ndnsp"> <ox-i18n msgid="label.ndnsp">No Data No Spreading</ox-i18n> </label>
137
+ </div>
133
138
  `;
134
139
  }
135
140
  _valuetype(property) {
@@ -196,7 +201,7 @@ let DataBindingMapper = class DataBindingMapper extends LitElement {
196
201
  if (!key)
197
202
  return;
198
203
  var value = element.value;
199
- if (key == 'target') {
204
+ if (key === 'target') {
200
205
  if (value.length > 0 && !/^[.#(\[]/.test(value)) {
201
206
  value = '#' + value.trim();
202
207
  this.target.value = value;
@@ -206,27 +211,35 @@ let DataBindingMapper = class DataBindingMapper extends LitElement {
206
211
  target: value
207
212
  };
208
213
  }
209
- else if (key == 'accessor') {
214
+ else if (key === 'accessor') {
210
215
  this.mapping = {
211
216
  ...this.mapping,
212
217
  accessor: (value || '').trim()
213
218
  };
214
219
  }
215
- else if (key == 'property') {
220
+ else if (key === 'property') {
216
221
  this.mapping = {
217
222
  ...this.mapping,
218
223
  property: (value || '').trim()
219
224
  };
220
225
  }
221
- else if (key == 'map' || key == 'range' || key == 'eval') {
226
+ else if (key === 'map' || key === 'range' || key === 'eval') {
222
227
  this.rule[key] = value;
223
228
  this.mapping = {
224
229
  ...this.mapping,
225
230
  param: value
226
231
  };
227
232
  }
228
- if (!this.mapping.rule)
233
+ else if (key === 'ndnsp' /* no data no spreading */) {
234
+ value = element.checked;
235
+ this.mapping = {
236
+ ...this.mapping,
237
+ ndnsp: value
238
+ };
239
+ }
240
+ if (!this.mapping.rule) {
229
241
  this.mapping.rule = 'value';
242
+ }
230
243
  this._keep_saved_rule_params = true;
231
244
  this.dispatchEvent(new CustomEvent('value-change', {
232
245
  bubbles: true,
@@ -325,6 +338,26 @@ DataBindingMapper.styles = [
325
338
  height: 300px;
326
339
  overflow: auto;
327
340
  }
341
+
342
+ /* checkbox-row */
343
+ .checkbox-row {
344
+ grid-column: span 10;
345
+
346
+ display: grid;
347
+ grid-template-columns: repeat(10, 1fr);
348
+ grid-gap: 5px;
349
+ grid-auto-rows: minmax(24px, auto);
350
+ align-items: center;
351
+ }
352
+
353
+ .checkbox-row > input {
354
+ grid-column: 4 / 5;
355
+ }
356
+
357
+ .checkbox-row > label {
358
+ grid-column: span 6;
359
+ text-align: left;
360
+ }
328
361
  `
329
362
  ];
330
363
  __decorate([