@operato/dataset 1.0.0-beta.0 → 1.0.0-beta.11

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/CHANGELOG.md CHANGED
@@ -3,6 +3,346 @@
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-beta.11](https://github.com/hatiolab/operato/compare/v1.0.0-beta.10...v1.0.0-beta.11) (2022-05-01)
7
+
8
+
9
+ ### :rocket: New Features
10
+
11
+ * separated filter-form from data-grist ([21e27f7](https://github.com/hatiolab/operato/commit/21e27f74d3e66d782da4aa75801c39a037627f62))
12
+
13
+
14
+
15
+ ## [1.0.0-beta.10](https://github.com/hatiolab/operato/compare/v1.0.0-beta.9...v1.0.0-beta.10) (2022-04-28)
16
+
17
+ **Note:** Version bump only for package @operato/dataset
18
+
19
+
20
+
21
+
22
+
23
+ ## [1.0.0-beta.9](https://github.com/hatiolab/operato/compare/v1.0.0-beta.8...v1.0.0-beta.9) (2022-04-28)
24
+
25
+ **Note:** Version bump only for package @operato/dataset
26
+
27
+
28
+
29
+
30
+
31
+ ## [1.0.0-beta.8](https://github.com/hatiolab/operato/compare/v1.0.0-beta.7...v1.0.0-beta.8) (2022-04-27)
32
+
33
+
34
+ ### :bug: Bug Fix
35
+
36
+ * ox-popup-data-item-spec style ([f1fd6d0](https://github.com/hatiolab/operato/commit/f1fd6d06cce99ac0fa1d2b4ced55878bb89d1143))
37
+
38
+
39
+
40
+ ## [1.0.0-beta.7](https://github.com/hatiolab/operato/compare/v1.0.0-beta.6...v1.0.0-beta.7) (2022-04-24)
41
+
42
+ **Note:** Version bump only for package @operato/dataset
43
+
44
+
45
+
46
+
47
+
48
+ ## [1.0.0-beta.6](https://github.com/hatiolab/operato/compare/v0.4.5...v1.0.0-beta.6) (2022-04-22)
49
+
50
+ ## [1.0.0-beta.5](https://github.com/hatiolab/operato/compare/v1.0.0-beta.4...v1.0.0-beta.5) (2022-04-18)
51
+
52
+ ## [1.0.0-beta.4](https://github.com/hatiolab/operato/compare/v1.0.0-beta.3...v1.0.0-beta.4) (2022-04-14)
53
+
54
+ ## [1.0.0-beta.3](https://github.com/hatiolab/operato/compare/v1.0.0-beta.2...v1.0.0-beta.3) (2022-04-12)
55
+
56
+
57
+ ### :bug: Bug Fix
58
+
59
+ * translation and ox-data-entry-form ([424014e](https://github.com/hatiolab/operato/commit/424014edc61181f373db2aa107d60e258a8776af))
60
+
61
+ ## [1.0.0-beta.2](https://github.com/hatiolab/operato/compare/v1.0.0-beta.1...v1.0.0-beta.2) (2022-04-12)
62
+
63
+ ## [1.0.0-beta.1](https://github.com/hatiolab/operato/compare/v1.0.0-beta.0...v1.0.0-beta.1) (2022-04-11)
64
+
65
+ ## [1.0.0-beta.0](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.53...v1.0.0-beta.0) (2022-04-10)
66
+
67
+ ## [1.0.0-alpha.53](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.52...v1.0.0-alpha.53) (2022-04-08)
68
+
69
+ ## [1.0.0-alpha.52](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.51...v1.0.0-alpha.52) (2022-04-08)
70
+
71
+ ## [1.0.0-alpha.51](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.50...v1.0.0-alpha.51) (2022-04-05)
72
+
73
+
74
+ ### :bug: Bug Fix
75
+
76
+ * export ox-grist-renderer-crontab.js ([3615720](https://github.com/hatiolab/operato/commit/3615720d119526a17272db2369bd80340b6cbc31))
77
+
78
+ ## [1.0.0-alpha.50](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.49...v1.0.0-alpha.50) (2022-04-04)
79
+
80
+ ## [1.0.0-alpha.49](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.48...v1.0.0-alpha.49) (2022-04-04)
81
+
82
+
83
+ ### :bug: Bug Fix
84
+
85
+ * lit@2.2.1 ([6707752](https://github.com/hatiolab/operato/commit/6707752907d24f7ecbe248cba18a4b18cfda282f))
86
+
87
+ ## [1.0.0-alpha.48](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.47...v1.0.0-alpha.48) (2022-04-03)
88
+
89
+ ## [1.0.0-alpha.47](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.46...v1.0.0-alpha.47) (2022-04-02)
90
+
91
+ ## [1.0.0-alpha.46](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.45...v1.0.0-alpha.46) (2022-04-02)
92
+
93
+ ## [1.0.0-alpha.45](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.44...v1.0.0-alpha.45) (2022-03-31)
94
+
95
+
96
+ ### :bug: Bug Fix
97
+
98
+ * shift => workShift ([449b030](https://github.com/hatiolab/operato/commit/449b030b209adb67fdd3635125ac19f280eed861))
99
+
100
+ ## [1.0.0-alpha.44](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.43...v1.0.0-alpha.44) (2022-03-31)
101
+
102
+
103
+ ### :rocket: New Features
104
+
105
+ * add workData and shift into data-sample and data-ooc ([35f8857](https://github.com/hatiolab/operato/commit/35f885742a59553c57891f1b6f2297afcf0b8fda))
106
+
107
+ ## [1.0.0-alpha.43](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.42...v1.0.0-alpha.43) (2022-03-30)
108
+
109
+ ## [1.0.0-alpha.42](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.41...v1.0.0-alpha.42) (2022-03-29)
110
+
111
+ ## [1.0.0-alpha.41](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.40...v1.0.0-alpha.41) (2022-03-27)
112
+
113
+ ## [1.0.0-alpha.40](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.39...v1.0.0-alpha.40) (2022-03-26)
114
+
115
+
116
+ ### :bug: Bug Fix
117
+
118
+ * ox-data-ooc ([77ce499](https://github.com/hatiolab/operato/commit/77ce49978d60cb964ce736f9289655103740f04c))
119
+
120
+ ## [1.0.0-alpha.39](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.38...v1.0.0-alpha.39) (2022-03-25)
121
+
122
+
123
+ ### :bug: Bug Fix
124
+
125
+ * added ox-data-ooc-view ([6693d0c](https://github.com/hatiolab/operato/commit/6693d0cdea7481c877ded73ab1ca1746f49b5ead))
126
+ * ox-data-sample-view ooc oos style ([7e8bebe](https://github.com/hatiolab/operato/commit/7e8bebe1d08eb60a42823bb1850a8d8738b1bb75))
127
+ * ox-data-sample-view ooc,oos icon checked => done ([3e3e345](https://github.com/hatiolab/operato/commit/3e3e3459104eac47a60fac60ab3c6ceeb933df14))
128
+ * ox-data-sample-view style ([ff0513d](https://github.com/hatiolab/operato/commit/ff0513dbd5f8cc6a72c336c2336f544e463ab78a))
129
+
130
+ ## [1.0.0-alpha.38](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.37...v1.0.0-alpha.38) (2022-03-25)
131
+
132
+
133
+ ### :bug: Bug Fix
134
+
135
+ * ox-data-sample-view ([6c998f1](https://github.com/hatiolab/operato/commit/6c998f10dcae30fcf228bfe6f547930d0bfc777c))
136
+ * ox-data-sample-view datetime format ([ca8f7ca](https://github.com/hatiolab/operato/commit/ca8f7ca8c29037d5a5bef518f6dfad2df9363097))
137
+ * ox-data-sample-view style ([ec02b2f](https://github.com/hatiolab/operato/commit/ec02b2fae0084f81229a335216672e1231dede7d))
138
+ * ox-data-sample-view style ([7b7c5ee](https://github.com/hatiolab/operato/commit/7b7c5eed16672a4b97c332b5933cc305208d8553))
139
+
140
+ ## [1.0.0-alpha.37](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.36...v1.0.0-alpha.37) (2022-03-25)
141
+
142
+
143
+ ### :bug: Bug Fix
144
+
145
+ * data-item-spec => data-use-case ([3b5e684](https://github.com/hatiolab/operato/commit/3b5e684362621b89883ea6ed22acb7084678d3a5))
146
+ * data-use-case-xx ([7564cd3](https://github.com/hatiolab/operato/commit/7564cd3bdc9d4f61ac4eba6d382e9066a6d36a90))
147
+ * dataset ox-data-sample-view started ([42ceefe](https://github.com/hatiolab/operato/commit/42ceefe919739bbc9e30e468b3f526831e0a56c8))
148
+ * export some components and remove unused components ([3b9788d](https://github.com/hatiolab/operato/commit/3b9788d9d2a73235a2f96d586dcb02643768f0d6))
149
+ * handling data-use-case acceptables ([9ac1239](https://github.com/hatiolab/operato/commit/9ac12396fe15aebddef52bb0ed7fe1f445a6dbfd))
150
+
151
+ ## [1.0.0-alpha.36](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.35...v1.0.0-alpha.36) (2022-03-21)
152
+
153
+ ## [1.0.0-alpha.35](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.34...v1.0.0-alpha.35) (2022-03-21)
154
+
155
+ ## [1.0.0-alpha.34](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.33...v1.0.0-alpha.34) (2022-03-20)
156
+
157
+
158
+ ### :bug: Bug Fix
159
+
160
+ * data-grist field styles for tooltip ([5f90650](https://github.com/hatiolab/operato/commit/5f90650ef36023834af3d3bf027cd300cc6bffc1))
161
+ * tooltip style ([4cd1b9d](https://github.com/hatiolab/operato/commit/4cd1b9d05c46c6a607865a0ff71a50f6e0df8797))
162
+
163
+ ## [1.0.0-alpha.33](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.32...v1.0.0-alpha.33) (2022-03-19)
164
+
165
+ ## [1.0.0-alpha.32](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.31...v1.0.0-alpha.32) (2022-03-19)
166
+
167
+ ## [1.0.0-alpha.31](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.30...v1.0.0-alpha.31) (2022-03-19)
168
+
169
+
170
+ ### :bug: Bug Fix
171
+
172
+ * added unit for ox-data-entry-form demo page, add active filter for ox-data-entry-form ([e981771](https://github.com/hatiolab/operato/commit/e9817714b86ffa6be742f1c5f4c72df7ad09a863))
173
+ * ox-grist-renderer support class type renderer (refer ox-grist-renderer-progress) ([ad7c8e1](https://github.com/hatiolab/operato/commit/ad7c8e1b453d19af9daa13ae4eb7c2059d85dfbb))
174
+
175
+ ## [1.0.0-alpha.30](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.29...v1.0.0-alpha.30) (2022-03-18)
176
+
177
+ ## [1.0.0-alpha.29](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.28...v1.0.0-alpha.29) (2022-03-17)
178
+
179
+ ## [1.0.0-alpha.28](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.26...v1.0.0-alpha.28) (2022-03-17)
180
+
181
+
182
+ ### :rocket: New Features
183
+
184
+ * add ox-grist-editor for partition-keys ([7672a27](https://github.com/hatiolab/operato/commit/7672a2729f78475602733a83779f6a7a96e128fd))
185
+
186
+ ## [1.0.0-alpha.26](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.25...v1.0.0-alpha.26) (2022-03-17)
187
+
188
+ ## [1.0.0-alpha.25](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.24...v1.0.0-alpha.25) (2022-03-17)
189
+
190
+ ## [1.0.0-alpha.24](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.23...v1.0.0-alpha.24) (2022-03-17)
191
+
192
+
193
+ ### :bug: Bug Fix
194
+
195
+ * ccp, dataset, property-editor style ([92b2448](https://github.com/hatiolab/operato/commit/92b2448756604ee0b885949dd193241f319cf147))
196
+ * ox-data-item-spec style ([f963757](https://github.com/hatiolab/operato/commit/f963757ccef0144687ce49493281c25a82a259d3))
197
+ * refactoring grist-editor, property-editor and input ([bdc3197](https://github.com/hatiolab/operato/commit/bdc31977d148c80a3ac0bea4b33160bac277df1e))
198
+ * refactoring grist-editor, property-editor and input ([ea7431a](https://github.com/hatiolab/operato/commit/ea7431a5e2dfd96ef392c1905e9622df7c2ef88c))
199
+
200
+ ## [1.0.0-alpha.23](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.22...v1.0.0-alpha.23) (2022-03-17)
201
+
202
+
203
+ ### :rocket: New Features
204
+
205
+ * added qc module ([263b679](https://github.com/hatiolab/operato/commit/263b6794b97a635df1a50d013adaef2e83635908))
206
+
207
+ ## [1.0.0-alpha.22](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.21...v1.0.0-alpha.22) (2022-03-17)
208
+
209
+
210
+ ### :bug: Bug Fix
211
+
212
+ * ccp demo ([67b7d65](https://github.com/hatiolab/operato/commit/67b7d65b48d0ca7b3350684a45a396c0538c4902))
213
+
214
+
215
+ ### :rocket: New Features
216
+
217
+ * added data-item-spec-editor for grist ([8376e14](https://github.com/hatiolab/operato/commit/8376e142d894a709e60ed676e917d5a26e01e374))
218
+
219
+ ## [1.0.0-alpha.21](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.20...v1.0.0-alpha.21) (2022-03-16)
220
+
221
+
222
+ ### :rocket: New Features
223
+
224
+ * @operato/ccp module added ([f08ba5a](https://github.com/hatiolab/operato/commit/f08ba5a464c04b7fb132c6f18de975997087846a))
225
+ * ccp spec provider ([d72fe7c](https://github.com/hatiolab/operato/commit/d72fe7c497685e7f033ef04e6a866bd86613f397))
226
+
227
+
228
+ ### :bug: Bug Fix
229
+
230
+ * demo ([6fa3eac](https://github.com/hatiolab/operato/commit/6fa3eac612bd98ce25e3ef6d8ce89527d7152fb4))
231
+ * description on ox-data-item-spec view ([47da306](https://github.com/hatiolab/operato/commit/47da306a253a96e0c24c986e4608bfe0713a111a))
232
+
233
+ ## [1.0.0-alpha.20](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.19...v1.0.0-alpha.20) (2022-03-15)
234
+
235
+
236
+ ### :bug: Bug Fix
237
+
238
+ * ox-data-entry-form in dataset module ([736fe96](https://github.com/hatiolab/operato/commit/736fe968e292059055d18a4c18a5da979bbb4722))
239
+
240
+ ## [1.0.0-alpha.19](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.18...v1.0.0-alpha.19) (2022-03-14)
241
+
242
+ ## [1.0.0-alpha.18](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.17...v1.0.0-alpha.18) (2022-03-14)
243
+
244
+ ## [1.0.0-alpha.17](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.16...v1.0.0-alpha.17) (2022-03-13)
245
+
246
+ ## [1.0.0-alpha.16](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.15...v1.0.0-alpha.16) (2022-03-13)
247
+
248
+ ## [1.0.0-alpha.15](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.14...v1.0.0-alpha.15) (2022-03-13)
249
+
250
+ ## [1.0.0-alpha.14](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.13...v1.0.0-alpha.14) (2022-03-13)
251
+
252
+ ## [1.0.0-alpha.13](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.12...v1.0.0-alpha.13) (2022-03-13)
253
+
254
+ ## [1.0.0-alpha.12](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.11...v1.0.0-alpha.12) (2022-03-13)
255
+
256
+ ## [1.0.0-alpha.11](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.10...v1.0.0-alpha.11) (2022-03-12)
257
+
258
+ ## [1.0.0-alpha.10](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.9...v1.0.0-alpha.10) (2022-03-12)
259
+
260
+ ## [1.0.0-alpha.9](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.8...v1.0.0-alpha.9) (2022-03-12)
261
+
262
+ ## [1.0.0-alpha.8](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.7...v1.0.0-alpha.8) (2022-03-11)
263
+
264
+ ## [1.0.0-alpha.7](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.6...v1.0.0-alpha.7) (2022-03-11)
265
+
266
+ ## [1.0.0-alpha.6](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.5...v1.0.0-alpha.6) (2022-03-11)
267
+
268
+
269
+ ### :bug: Bug Fix
270
+
271
+ * ox-data-entry-form style ([c94c833](https://github.com/hatiolab/operato/commit/c94c8338aee8cf3e69c286e6af7cb2b5f081bbc7))
272
+
273
+ ## [1.0.0-alpha.5](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.4...v1.0.0-alpha.5) (2022-03-11)
274
+
275
+
276
+ ### :bug: Bug Fix
277
+
278
+ * data entry style ([d3dc3a6](https://github.com/hatiolab/operato/commit/d3dc3a6612c75597162621bd22421fa8d808cb13))
279
+
280
+ ## [1.0.0-alpha.4](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.3...v1.0.0-alpha.4) (2022-03-11)
281
+
282
+
283
+ ### :bug: Bug Fix
284
+
285
+ * ox-data-entry-form options and inputs layout ([56987c6](https://github.com/hatiolab/operato/commit/56987c664000d558427ba8dbf77730130061cb1a))
286
+
287
+ ## [1.0.0-alpha.3](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.2...v1.0.0-alpha.3) (2022-03-10)
288
+
289
+
290
+ ### :bug: Bug Fix
291
+
292
+ * add file type for data-item ([0177c84](https://github.com/hatiolab/operato/commit/0177c84ef3a91bfe85e6aec796b33b29a0e0f45e))
293
+
294
+ ## [1.0.0-alpha.2](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.1...v1.0.0-alpha.2) (2022-03-10)
295
+
296
+
297
+ ### :bug: Bug Fix
298
+
299
+ * data-entry-form select options ([5a008c6](https://github.com/hatiolab/operato/commit/5a008c64ee07ff6763a4b1a50ef88dc976643275))
300
+
301
+ ## [1.0.0-alpha.1](https://github.com/hatiolab/operato/compare/v0.4.3...v1.0.0-alpha.1) (2022-03-09)
302
+
303
+
304
+
305
+ ## [1.0.0-beta.5](https://github.com/hatiolab/operato/compare/v1.0.0-beta.4...v1.0.0-beta.5) (2022-04-18)
306
+
307
+ **Note:** Version bump only for package @operato/dataset
308
+
309
+
310
+
311
+
312
+
313
+ ## [1.0.0-beta.4](https://github.com/hatiolab/operato/compare/v1.0.0-beta.3...v1.0.0-beta.4) (2022-04-14)
314
+
315
+ **Note:** Version bump only for package @operato/dataset
316
+
317
+
318
+
319
+
320
+
321
+ ## [1.0.0-beta.3](https://github.com/hatiolab/operato/compare/v1.0.0-beta.2...v1.0.0-beta.3) (2022-04-12)
322
+
323
+
324
+ ### :bug: Bug Fix
325
+
326
+ * translation and ox-data-entry-form ([424014e](https://github.com/hatiolab/operato/commit/424014edc61181f373db2aa107d60e258a8776af))
327
+
328
+
329
+
330
+ ## [1.0.0-beta.2](https://github.com/hatiolab/operato/compare/v1.0.0-beta.1...v1.0.0-beta.2) (2022-04-12)
331
+
332
+ **Note:** Version bump only for package @operato/dataset
333
+
334
+
335
+
336
+
337
+
338
+ ## [1.0.0-beta.1](https://github.com/hatiolab/operato/compare/v1.0.0-beta.0...v1.0.0-beta.1) (2022-04-11)
339
+
340
+ **Note:** Version bump only for package @operato/dataset
341
+
342
+
343
+
344
+
345
+
6
346
  ## [1.0.0-beta.0](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.53...v1.0.0-beta.0) (2022-04-10)
7
347
 
8
348
  **Note:** Version bump only for package @operato/dataset
@@ -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
  /* box-sizing: border-box; */
@@ -1,9 +1,9 @@
1
1
  import { __decorate } from "tslib";
2
2
  import '../ox-data-item-spec.js';
3
- import { LitElement, css, html } from 'lit';
3
+ import { css, html, LitElement } from 'lit';
4
4
  import { customElement, property } from 'lit/decorators.js';
5
- import { ScrollbarStyles } from '@operato/styles';
6
5
  import { i18next } from '@operato/i18n';
6
+ import { ScrollbarStyles } from '@operato/styles';
7
7
  let OxPopupDataItemSpec = class OxPopupDataItemSpec extends LitElement {
8
8
  render() {
9
9
  var dataItem = this.dataItem || {};
@@ -56,6 +56,7 @@ OxPopupDataItemSpec.styles = [
56
56
  ox-data-item-spec {
57
57
  flex: 1;
58
58
  overflow-y: auto;
59
+ padding: var(--padding-wide);
59
60
  }
60
61
 
61
62
  span {
@@ -1 +1 @@
1
- {"version":3,"file":"ox-popup-data-item-spec.js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Ae;IACf,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA8BF;CACF,CAAA;AAE2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;kDAAW;AACV;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;qDAAoB;AACnB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4DAAwC;AAtCxD,mBAAmB;IAD/B,aAAa,CAAC,yBAAyB,CAAC;GAC5B,mBAAmB,CA+E/B;SA/EY,mBAAmB","sourcesContent":["import '../ox-data-item-spec.js'\n\nimport { LitElement, css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\nimport { DataItem } from '../types.js'\nimport { ScrollbarStyles } from '@operato/styles'\nimport { i18next } from '@operato/i18n'\n\n@customElement('ox-popup-data-item-spec')\nexport class OxPopupDataItemSpec extends LitElement {\n static styles = [\n ScrollbarStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n background-color: #fff;\n\n width: var(--overlay-center-normal-width, 50%);\n height: var(--overlay-center-normal-height, 50%);\n }\n\n ox-data-item-spec {\n flex: 1;\n overflow-y: auto;\n }\n\n span {\n flex: 1;\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n color: var(--primary-color);\n }\n\n .button-container {\n display: flex;\n margin-left: auto;\n }\n `\n ]\n\n @property({ type: Object }) value: any\n @property({ type: Object }) dataItem?: DataItem\n @property({ type: Object }) confirmCallback!: (newval: any) => void\n\n render() {\n var dataItem = this.dataItem || {}\n\n return html`\n <ox-data-item-spec .value=${this.value} .dataItem=${dataItem} @change=${this.onChange.bind(this)}>\n </ox-data-item-spec>\n\n <div class=\"button-container\">\n <mwc-button @click=${this.onCancel.bind(this)}>${i18next.t('button.cancel')}</mwc-button>\n <mwc-button @click=${this.onConfirm.bind(this)}>${i18next.t('button.confirm')}</mwc-button>\n </div>\n `\n }\n\n private onChange(e: CustomEvent) {\n e.stopPropagation()\n\n /* \n 주의 : 이 팝업 템플릿은 layout 모듈에 의해서 render 되므로, \n layout의 구성에 변화가 발생하면, 다시 render된다.\n 이 팝업이 떠 있는 상태에서, 또 다른 팝업이 뜨는 경우도 layout 구성의 변화를 야기한다. (overlay의 갯수의 증가)\n 이 경우 value, options, confirmCallback 등 클로져를 사용한 것들이 초기 바인딩된 값으로 다시 바인딩되게 되는데,\n 만약, 템플릿 내부에서 이들 속성의 레퍼런스가 변화했다면, 원래 상태로 되돌아가는 현상이 발생하게 된다.\n 따라서, 가급적 이들 속성의 레퍼런스를 변화시키지 않는 것이 좋다.\n (이 팝업 클래스를 템플릿으로 사용한 곳의 코드를 참조하세요.)\n => \n 이런 이유로, Object.assign(...)을 사용하였다.\n */\n this.value = e.detail\n }\n\n private onCancel(e: Event) {\n history.back()\n }\n\n private onConfirm(e: Event) {\n this.confirmCallback && this.confirmCallback(this.value)\n history.back()\n }\n}\n"]}
1
+ {"version":3,"file":"ox-popup-data-item-spec.js","sourceRoot":"","sources":["../../../src/grist-editor/ox-popup-data-item-spec.ts"],"names":[],"mappings":";AAAA,OAAO,yBAAyB,CAAA;AAEhC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAKjD,IAAa,mBAAmB,GAAhC,MAAa,mBAAoB,SAAQ,UAAU;IAyCjD,MAAM;QACJ,IAAI,QAAQ,GAAG,IAAI,CAAC,QAAQ,IAAI,EAAE,CAAA;QAElC,OAAO,IAAI,CAAA;kCACmB,IAAI,CAAC,KAAK,cAAc,QAAQ,YAAY,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;;;;6BAIzE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC;6BACtD,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,gBAAgB,CAAC;;KAEhF,CAAA;IACH,CAAC;IAEO,QAAQ,CAAC,CAAc;QAC7B,CAAC,CAAC,eAAe,EAAE,CAAA;QAEnB;;;;;;;;;;UAUE;QACF,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,MAAM,CAAA;IACvB,CAAC;IAEO,QAAQ,CAAC,CAAQ;QACvB,OAAO,CAAC,IAAI,EAAE,CAAA;IAChB,CAAC;IAEO,SAAS,CAAC,CAAQ;QACxB,IAAI,CAAC,eAAe,IAAI,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;QACxD,OAAO,CAAC,IAAI,EAAE,CAAA;IAChB,CAAC;CACF,CAAA;AA/EQ,0BAAM,GAAG;IACd,eAAe;IACf,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA+BF;CACF,CAAA;AAE2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;kDAAW;AACV;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;qDAAoB;AACnB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4DAAwC;AAvCxD,mBAAmB;IAD/B,aAAa,CAAC,yBAAyB,CAAC;GAC5B,mBAAmB,CAgF/B;SAhFY,mBAAmB","sourcesContent":["import '../ox-data-item-spec.js'\n\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\nimport { i18next } from '@operato/i18n'\nimport { ScrollbarStyles } from '@operato/styles'\n\nimport { DataItem } from '../types.js'\n\n@customElement('ox-popup-data-item-spec')\nexport class OxPopupDataItemSpec extends LitElement {\n static styles = [\n ScrollbarStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n background-color: #fff;\n\n width: var(--overlay-center-normal-width, 50%);\n height: var(--overlay-center-normal-height, 50%);\n }\n\n ox-data-item-spec {\n flex: 1;\n overflow-y: auto;\n padding: var(--padding-wide);\n }\n\n span {\n flex: 1;\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n color: var(--primary-color);\n }\n\n .button-container {\n display: flex;\n margin-left: auto;\n }\n `\n ]\n\n @property({ type: Object }) value: any\n @property({ type: Object }) dataItem?: DataItem\n @property({ type: Object }) confirmCallback!: (newval: any) => void\n\n render() {\n var dataItem = this.dataItem || {}\n\n return html`\n <ox-data-item-spec .value=${this.value} .dataItem=${dataItem} @change=${this.onChange.bind(this)}>\n </ox-data-item-spec>\n\n <div class=\"button-container\">\n <mwc-button @click=${this.onCancel.bind(this)}>${i18next.t('button.cancel')}</mwc-button>\n <mwc-button @click=${this.onConfirm.bind(this)}>${i18next.t('button.confirm')}</mwc-button>\n </div>\n `\n }\n\n private onChange(e: CustomEvent) {\n e.stopPropagation()\n\n /* \n 주의 : 이 팝업 템플릿은 layout 모듈에 의해서 render 되므로, \n layout의 구성에 변화가 발생하면, 다시 render된다.\n 이 팝업이 떠 있는 상태에서, 또 다른 팝업이 뜨는 경우도 layout 구성의 변화를 야기한다. (overlay의 갯수의 증가)\n 이 경우 value, options, confirmCallback 등 클로져를 사용한 것들이 초기 바인딩된 값으로 다시 바인딩되게 되는데,\n 만약, 템플릿 내부에서 이들 속성의 레퍼런스가 변화했다면, 원래 상태로 되돌아가는 현상이 발생하게 된다.\n 따라서, 가급적 이들 속성의 레퍼런스를 변화시키지 않는 것이 좋다.\n (이 팝업 클래스를 템플릿으로 사용한 곳의 코드를 참조하세요.)\n => \n 이런 이유로, Object.assign(...)을 사용하였다.\n */\n this.value = e.detail\n }\n\n private onCancel(e: Event) {\n history.back()\n }\n\n private onConfirm(e: Event) {\n this.confirmCallback && this.confirmCallback(this.value)\n history.back()\n }\n}\n"]}
@@ -4,7 +4,12 @@ import { css, html, LitElement } from 'lit';
4
4
  import { customElement, property } from 'lit/decorators.js';
5
5
  let OxDataEntryForm = class OxDataEntryForm extends LitElement {
6
6
  render() {
7
- return html `<form @change=${(e) => this.onChange(e)}>${this.buildInputs()}</form>`;
7
+ var _a, _b;
8
+ return html ` <form @change=${(e) => this.onChange(e)}>
9
+ <h2>${((_a = this.dataSet) === null || _a === void 0 ? void 0 : _a.name) || ''}</h2>
10
+ <h3>${((_b = this.dataSet) === null || _b === void 0 ? void 0 : _b.description) || ''}</h3>
11
+ ${this.buildInputs()}
12
+ </form>`;
8
13
  }
9
14
  onChange(e) {
10
15
  this.value = this.buildValue();
@@ -50,6 +55,7 @@ let OxDataEntryForm = class OxDataEntryForm extends LitElement {
50
55
  });
51
56
  return html ` <label .title=${description}>
52
57
  <div name>${name}${unit ? `(${unit})` : ''}</div>
58
+ <div description>${description}</div>
53
59
  <div elements>${elements}</div>
54
60
  </label>`;
55
61
  });
@@ -72,6 +78,11 @@ OxDataEntryForm.styles = css `
72
78
  flex-direction: row;
73
79
  }
74
80
 
81
+ h2,
82
+ h3 {
83
+ text-align: center;
84
+ }
85
+
75
86
  form {
76
87
  flex: 1;
77
88
 
@@ -80,24 +91,34 @@ OxDataEntryForm.styles = css `
80
91
  }
81
92
  label {
82
93
  display: grid;
83
- grid-template-columns: repeat(12, 1fr);
84
- gap: 9px;
94
+
95
+ grid-template-rows: auto 1fr;
96
+ grid-template-columns: 1fr 5fr;
97
+ grid-template-areas: 'name description' 'empty inputs';
98
+
99
+ grid-gap: 9px;
85
100
  align-items: center;
86
101
  margin-bottom: var(--margin-default);
87
102
  }
88
- label:nth-child(even) {
103
+ label:nth-child(odd) {
89
104
  background-color: var(--main-section-background-color);
90
105
  padding: var(--padding-default) 0;
91
106
  }
92
107
 
93
108
  div[name] {
94
- grid-column: span 2 / auto;
109
+ grid-area: name;
95
110
  font: var(--label-font);
96
111
  color: var(--label-color);
97
112
  text-align: right;
98
113
  }
114
+ div[description] {
115
+ grid-area: description;
116
+ font: var(--page-description-font);
117
+ color: var(--page-description-color);
118
+ text-align: left;
119
+ }
99
120
  div[elements] {
100
- grid-column: span 10 / auto;
121
+ grid-area: inputs;
101
122
  display: flex;
102
123
  flex-direction: row;
103
124
  flex-wrap: wrap;
@@ -116,11 +137,20 @@ OxDataEntryForm.styles = css `
116
137
  }
117
138
 
118
139
  @media only screen and (max-width: 460px) {
119
- div[name] {
120
- grid-column: span 3 / auto;
140
+ label {
141
+ display: grid;
142
+
143
+ grid-template-rows: auto auto 1fr;
144
+ grid-template-columns: 1fr;
145
+ grid-template-areas: 'name' 'description' 'inputs';
146
+
147
+ grid-gap: 9px;
148
+ align-items: center;
149
+ margin-bottom: var(--margin-default);
121
150
  }
122
- div[elements] {
123
- grid-column: span 9 / auto;
151
+
152
+ div[name] {
153
+ text-align: left;
124
154
  }
125
155
  }
126
156
  `;
@@ -1 +1 @@
1
- {"version":3,"file":"ox-data-entry-form.js","sourceRoot":"","sources":["../../src/ox-data-entry-form.ts"],"names":[],"mappings":";AAAA,OAAO,iCAAiC,CAAA;AAExC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAK3D,IAAa,eAAe,GAA5B,MAAa,eAAgB,SAAQ,UAAU;IA+D7C,MAAM;QACJ,OAAO,IAAI,CAAA,iBAAiB,CAAC,CAAQ,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,WAAW,EAAE,SAAS,CAAA;IAC3F,CAAC;IAEO,QAAQ,CAAC,CAAQ;QACvB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,UAAU,EAAE,CAAA;QAE9B,IAAI,CAAC,aAAa,CAChB,IAAI,WAAW,CAAC,QAAQ,EAAE;YACxB,OAAO,EAAE,IAAI;YACb,QAAQ,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AE,EAA4B,CAAC,CAAA;IAClC,CAAC;CACF,CAAA;AAnJQ,sBAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDlB,CAAA;AAE2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;gDAAkB;AACjB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;8CAA+B;AA7D/C,eAAe;IAD3B,aAAa,CAAC,oBAAoB,CAAC;GACvB,eAAe,CAoJ3B;SApJY,eAAe","sourcesContent":["import '@operato/input/ox-input-file.js'\n\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\nimport { DataSet } from './types.js'\n\n@customElement('ox-data-entry-form')\nexport class OxDataEntryForm extends LitElement {\n static styles = css`\n :host {\n display: flex;\n flex-direction: row;\n }\n\n form {\n flex: 1;\n\n display: flex;\n flex-direction: column;\n }\n label {\n display: grid;\n grid-template-columns: repeat(12, 1fr);\n gap: 9px;\n align-items: center;\n margin-bottom: var(--margin-default);\n }\n label:nth-child(even) {\n background-color: var(--main-section-background-color);\n padding: var(--padding-default) 0;\n }\n\n div[name] {\n grid-column: span 2 / auto;\n font: var(--label-font);\n color: var(--label-color);\n text-align: right;\n }\n div[elements] {\n grid-column: span 10 / auto;\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n gap: 10px;\n padding-right: var(--padding-default);\n }\n div[elements] * {\n flex: 1;\n }\n div[elements] input,\n div[elements] select {\n border: var(--input-field-border);\n border-radius: var(--input-field-border-radius);\n padding: var(--input-field-padding);\n font: var(--input-field-font);\n }\n\n @media only screen and (max-width: 460px) {\n div[name] {\n grid-column: span 3 / auto;\n }\n div[elements] {\n grid-column: span 9 / auto;\n }\n }\n `\n\n @property({ type: Object }) dataSet?: DataSet\n @property({ type: Object }) value?: { [tag: string]: any }\n\n render() {\n return html`<form @change=${(e: Event) => this.onChange(e)}>${this.buildInputs()}</form>`\n }\n\n private onChange(e: Event) {\n this.value = this.buildValue()\n\n this.dispatchEvent(\n new CustomEvent('change', {\n bubbles: true,\n composed: true,\n detail: this.value\n })\n )\n }\n\n private buildInputs() {\n const dataItems = this.dataSet!.dataItems.filter(item => item.active)\n\n return (dataItems || []).map(dataItem => {\n const { name, description, tag, type, quota = 1, options = {}, unit } = dataItem\n\n const samples = new Array(quota).fill(0)\n const value = this.value && this.value[tag]\n\n const elements = samples.map((_, idx) => {\n const v = value instanceof Array ? value[idx] : idx === 0 ? value : undefined\n\n switch (type) {\n case 'select':\n return html` <select .name=${tag}>\n <option value=\"\"></option>\n ${(options.options || []).map(\n option => html`<option value=${option.value} ?selected=${option.value === v}>${option.text}</option>`\n )}\n </select>`\n break\n\n case 'boolean':\n return html` <input type=\"checkbox\" name=${tag} .checked=${v} />`\n break\n\n case 'number':\n return html` <input type=\"number\" name=${tag} value=${v} />`\n break\n\n case 'file':\n return html`<ox-input-file\n name=${tag}\n label=\"Attach Files\"\n accept=\"*/*\"\n multiple=\"true\"\n hide-filelist\n ></ox-input-file>`\n\n case 'string':\n default:\n return html` <input type=\"string\" name=${tag} value=${v} />`\n }\n })\n\n return html` <label .title=${description}>\n <div name>${name}${unit ? `(${unit})` : ''}</div>\n <div elements>${elements}</div>\n </label>`\n })\n }\n\n private buildValue() {\n const dataItems = this.dataSet!.dataItems\n\n return (dataItems || []).reduce((sum, dataItem) => {\n const { tag, type } = dataItem\n\n const editors = Array.prototype.slice.call(\n this.renderRoot.querySelectorAll(`[name=${tag}]`) as NodeListOf<HTMLInputElement>\n ) as HTMLInputElement[]\n\n if (editors.length > 0) {\n sum[tag] = editors.map(editor => (type === 'boolean' ? editor.checked : editor.value))\n }\n\n return sum\n }, {} as { [tag: string]: any })\n }\n}\n"]}
1
+ {"version":3,"file":"ox-data-entry-form.js","sourceRoot":"","sources":["../../src/ox-data-entry-form.ts"],"names":[],"mappings":";AAAA,OAAO,iCAAiC,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,CAAC;IAEO,UAAU;QAChB,MAAM,SAAS,GAAG,IAAI,CAAC,OAAQ,CAAC,SAAS,CAAA;QAEzC,OAAO,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,QAAQ,EAAE,EAAE;YAChD,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,QAAQ,CAAA;YAE9B,MAAM,OAAO,GAAG,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CACxC,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,SAAS,GAAG,GAAG,CAAiC,CAC5D,CAAA;YAEvB,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE;gBACtB,GAAG,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAA;aACvF;YAED,OAAO,GAAG,CAAA;QACZ,CAAC,EAAE,EAA4B,CAAC,CAAA;IAClC,CAAC;CACF,CAAA;AAhLQ,sBAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiFlB,CAAA;AAE2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;gDAAkB;AACjB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;8CAA+B;AArF/C,eAAe;IAD3B,aAAa,CAAC,oBAAoB,CAAC;GACvB,eAAe,CAiL3B;SAjLY,eAAe","sourcesContent":["import '@operato/input/ox-input-file.js'\n\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\nimport { DataSet } from './types.js'\n\n@customElement('ox-data-entry-form')\nexport class OxDataEntryForm extends LitElement {\n static styles = css`\n :host {\n display: flex;\n flex-direction: row;\n }\n\n h2,\n h3 {\n text-align: center;\n }\n\n form {\n flex: 1;\n\n display: flex;\n flex-direction: column;\n }\n label {\n display: grid;\n\n grid-template-rows: auto 1fr;\n grid-template-columns: 1fr 5fr;\n grid-template-areas: 'name description' 'empty inputs';\n\n grid-gap: 9px;\n align-items: center;\n margin-bottom: var(--margin-default);\n }\n label:nth-child(odd) {\n background-color: var(--main-section-background-color);\n padding: var(--padding-default) 0;\n }\n\n div[name] {\n grid-area: name;\n font: var(--label-font);\n color: var(--label-color);\n text-align: right;\n }\n div[description] {\n grid-area: description;\n font: var(--page-description-font);\n color: var(--page-description-color);\n text-align: left;\n }\n div[elements] {\n grid-area: inputs;\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n gap: 10px;\n padding-right: var(--padding-default);\n }\n div[elements] * {\n flex: 1;\n }\n div[elements] input,\n div[elements] select {\n border: var(--input-field-border);\n border-radius: var(--input-field-border-radius);\n padding: var(--input-field-padding);\n font: var(--input-field-font);\n }\n\n @media only screen and (max-width: 460px) {\n label {\n display: grid;\n\n grid-template-rows: auto auto 1fr;\n grid-template-columns: 1fr;\n grid-template-areas: 'name' 'description' 'inputs';\n\n grid-gap: 9px;\n align-items: center;\n margin-bottom: var(--margin-default);\n }\n\n div[name] {\n text-align: left;\n }\n }\n `\n\n @property({ type: Object }) dataSet?: DataSet\n @property({ type: Object }) value?: { [tag: string]: any }\n\n render() {\n return html` <form @change=${(e: Event) => this.onChange(e)}>\n <h2>${this.dataSet?.name || ''}</h2>\n <h3>${this.dataSet?.description || ''}</h3>\n ${this.buildInputs()}\n </form>`\n }\n\n private onChange(e: Event) {\n this.value = this.buildValue()\n\n this.dispatchEvent(\n new CustomEvent('change', {\n bubbles: true,\n composed: true,\n detail: this.value\n })\n )\n }\n\n private buildInputs() {\n const dataItems = this.dataSet!.dataItems.filter(item => item.active)\n\n return (dataItems || []).map(dataItem => {\n const { name, description, tag, type, quota = 1, options = {}, unit } = dataItem\n\n const samples = new Array(quota).fill(0)\n const value = this.value && this.value[tag]\n\n const elements = samples.map((_, idx) => {\n const v = value instanceof Array ? value[idx] : idx === 0 ? value : undefined\n\n switch (type) {\n case 'select':\n return html` <select .name=${tag}>\n <option value=\"\"></option>\n ${(options.options || []).map(\n option => html`<option value=${option.value} ?selected=${option.value === v}>${option.text}</option>`\n )}\n </select>`\n break\n\n case 'boolean':\n return html` <input type=\"checkbox\" name=${tag} .checked=${v} />`\n break\n\n case 'number':\n return html` <input type=\"number\" name=${tag} value=${v} />`\n break\n\n case 'file':\n return html`<ox-input-file\n name=${tag}\n label=\"Attach Files\"\n accept=\"*/*\"\n multiple=\"true\"\n hide-filelist\n ></ox-input-file>`\n\n case 'string':\n default:\n return html` <input type=\"string\" name=${tag} value=${v} />`\n }\n })\n\n return html` <label .title=${description}>\n <div name>${name}${unit ? `(${unit})` : ''}</div>\n <div description>${description}</div>\n <div elements>${elements}</div>\n </label>`\n })\n }\n\n private buildValue() {\n const dataItems = this.dataSet!.dataItems\n\n return (dataItems || []).reduce((sum, dataItem) => {\n const { tag, type } = dataItem\n\n const editors = Array.prototype.slice.call(\n this.renderRoot.querySelectorAll(`[name=${tag}]`) as NodeListOf<HTMLInputElement>\n ) as HTMLInputElement[]\n\n if (editors.length > 0) {\n sum[tag] = editors.map(editor => (type === 'boolean' ? editor.checked : editor.value))\n }\n\n return sum\n }, {} as { [tag: string]: any })\n }\n}\n"]}
@@ -1,7 +1,8 @@
1
1
  import '@operato/input/ox-input-file.js';
2
2
  import './ox-data-sample-view';
3
- import { DataOoc, DataSet } from './types.js';
3
+ import '@material/mwc-icon';
4
4
  import { LitElement } from 'lit';
5
+ import { DataOoc, DataSet } from './types.js';
5
6
  export declare class OxDataOocView extends LitElement {
6
7
  static styles: import("lit").CSSResult;
7
8
  dataSet?: DataSet;
@@ -1,8 +1,10 @@
1
1
  import { __decorate } from "tslib";
2
2
  import '@operato/input/ox-input-file.js';
3
3
  import './ox-data-sample-view';
4
- import { LitElement, css, html } from 'lit';
4
+ import '@material/mwc-icon';
5
+ import { css, html, LitElement } from 'lit';
5
6
  import { customElement, property } from 'lit/decorators.js';
7
+ import { i18next } from '@operato/i18n';
6
8
  let OxDataOocView = class OxDataOocView extends LitElement {
7
9
  render() {
8
10
  var _a, _b;
@@ -13,12 +15,12 @@ let OxDataOocView = class OxDataOocView extends LitElement {
13
15
 
14
16
  <h3 state>${((_b = this.dataOoc) === null || _b === void 0 ? void 0 : _b.state) || ''}</h3>
15
17
 
16
- <h3>history</h3>
18
+ <h3>${i18next.t('title.history')}</h3>
17
19
  ${history.map(({ user, state, comment, timestamp }) => html `
18
20
  <p page-description>
19
21
  ${formatter.format(new Date(timestamp))}
20
22
  <br />
21
- ${state} by ${user.name}
23
+ ${state} <mwc-icon>account_circle</mwc-icon> ${user.name}
22
24
  <br />
23
25
  ${comment}
24
26
  </p>
@@ -50,6 +52,10 @@ OxDataOocView.styles = css `
50
52
  top: 25px;
51
53
  }
52
54
 
55
+ mwc-icon {
56
+ font-size: 16px;
57
+ }
58
+
53
59
  [page-description] {
54
60
  margin: var(--page-description-margin);
55
61
  font: var(--page-description-font);
@@ -1 +1 @@
1
- {"version":3,"file":"ox-data-ooc-view.js","sourceRoot":"","sources":["../../src/ox-data-ooc-view.ts"],"names":[],"mappings":";AAAA,OAAO,iCAAiC,CAAA;AACxC,OAAO,uBAAuB,CAAA;AAG9B,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAG3D,IAAa,aAAa,GAA1B,MAAa,aAAc,SAAQ,UAAU;IAmC3C,MAAM;;QACJ,MAAM,OAAO,GAAG,CAAA,MAAA,IAAI,CAAC,OAAO,0CAAE,OAAO,KAAI,EAAE,CAAA;QAC3C,MAAM,SAAS,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,CAAA;QAExG,OAAO,IAAI,CAAA;yCAC0B,IAAI,CAAC,OAAO,aAAa,IAAI,CAAC,OAAO;;kBAE5D,CAAA,MAAA,IAAI,CAAC,OAAO,0CAAE,KAAK,KAAI,EAAE;;;QAGnC,OAAO,CAAC,GAAG,CACX,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,IAAI,CAAA;;cAEvC,SAAS,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC;;cAErC,KAAK,OAAO,IAAI,CAAC,IAAI;;cAErB,OAAO;;SAEZ,CACF;KACF,CAAA;IACH,CAAC;CACF,CAAA;AAzDQ,oBAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BlB,CAAA;AAE2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;8CAAkB;AACjB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;8CAAkB;AAjClC,aAAa;IADzB,aAAa,CAAC,kBAAkB,CAAC;GACrB,aAAa,CA0DzB;SA1DY,aAAa","sourcesContent":["import '@operato/input/ox-input-file.js'\nimport './ox-data-sample-view'\n\nimport { DataOoc, DataSet } from './types.js'\nimport { LitElement, css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\n@customElement('ox-data-ooc-view')\nexport class OxDataOocView extends LitElement {\n static styles = css`\n :host {\n display: flex;\n flex-direction: column;\n background-color: var(--main-section-background-color);\n padding: var(--padding-wide);\n\n position: relative;\n }\n\n h3 {\n margin: var(--title-margin);\n padding-top: 12px;\n font: var(--title-font);\n color: var(--title-text-color);\n }\n\n h3[state] {\n position: absolute;\n\n right: 20px;\n top: 25px;\n }\n\n [page-description] {\n margin: var(--page-description-margin);\n font: var(--page-description-font);\n color: var(--page-description-color);\n }\n `\n\n @property({ type: Object }) dataSet?: DataSet\n @property({ type: Object }) dataOoc?: DataOoc\n\n render() {\n const history = this.dataOoc?.history || []\n const formatter = new Intl.DateTimeFormat(navigator.language, { dateStyle: 'full', timeStyle: 'short' })\n\n return html`\n <ox-data-sample-view .dataSample=${this.dataOoc} .dataSet=${this.dataSet}></ox-data-sample-view>\n\n <h3 state>${this.dataOoc?.state || ''}</h3>\n\n <h3>history</h3>\n ${history.map(\n ({ user, state, comment, timestamp }) => html`\n <p page-description>\n ${formatter.format(new Date(timestamp))}\n <br />\n ${state} by ${user.name}\n <br />\n ${comment}\n </p>\n `\n )}\n `\n }\n}\n"]}
1
+ {"version":3,"file":"ox-data-ooc-view.js","sourceRoot":"","sources":["../../src/ox-data-ooc-view.ts"],"names":[],"mappings":";AAAA,OAAO,iCAAiC,CAAA;AACxC,OAAO,uBAAuB,CAAA;AAC9B,OAAO,oBAAoB,CAAA;AAE3B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAKvC,IAAa,aAAa,GAA1B,MAAa,aAAc,SAAQ,UAAU;IAuC3C,MAAM;;QACJ,MAAM,OAAO,GAAG,CAAA,MAAA,IAAI,CAAC,OAAO,0CAAE,OAAO,KAAI,EAAE,CAAA;QAC3C,MAAM,SAAS,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,CAAA;QAExG,OAAO,IAAI,CAAA;yCAC0B,IAAI,CAAC,OAAO,aAAa,IAAI,CAAC,OAAO;;kBAE5D,CAAA,MAAA,IAAI,CAAC,OAAO,0CAAE,KAAK,KAAI,EAAE;;YAE/B,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC;QAC9B,OAAO,CAAC,GAAG,CACX,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,IAAI,CAAA;;cAEvC,SAAS,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC;;cAErC,KAAK,wCAAwC,IAAI,CAAC,IAAI;;cAEtD,OAAO;;SAEZ,CACF;KACF,CAAA;IACH,CAAC;CACF,CAAA;AA7DQ,oBAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiClB,CAAA;AAE2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;8CAAkB;AACjB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;8CAAkB;AArClC,aAAa;IADzB,aAAa,CAAC,kBAAkB,CAAC;GACrB,aAAa,CA8DzB;SA9DY,aAAa","sourcesContent":["import '@operato/input/ox-input-file.js'\nimport './ox-data-sample-view'\nimport '@material/mwc-icon'\n\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\nimport { i18next } from '@operato/i18n'\n\nimport { DataOoc, DataSet } from './types.js'\n\n@customElement('ox-data-ooc-view')\nexport class OxDataOocView extends LitElement {\n static styles = css`\n :host {\n display: flex;\n flex-direction: column;\n background-color: var(--main-section-background-color);\n padding: var(--padding-wide);\n\n position: relative;\n }\n\n h3 {\n margin: var(--title-margin);\n padding-top: 12px;\n font: var(--title-font);\n color: var(--title-text-color);\n }\n\n h3[state] {\n position: absolute;\n\n right: 20px;\n top: 25px;\n }\n\n mwc-icon {\n font-size: 16px;\n }\n\n [page-description] {\n margin: var(--page-description-margin);\n font: var(--page-description-font);\n color: var(--page-description-color);\n }\n `\n\n @property({ type: Object }) dataSet?: DataSet\n @property({ type: Object }) dataOoc?: DataOoc\n\n render() {\n const history = this.dataOoc?.history || []\n const formatter = new Intl.DateTimeFormat(navigator.language, { dateStyle: 'full', timeStyle: 'short' })\n\n return html`\n <ox-data-sample-view .dataSample=${this.dataOoc} .dataSet=${this.dataSet}></ox-data-sample-view>\n\n <h3 state>${this.dataOoc?.state || ''}</h3>\n\n <h3>${i18next.t('title.history')}</h3>\n ${history.map(\n ({ user, state, comment, timestamp }) => html`\n <p page-description>\n ${formatter.format(new Date(timestamp))}\n <br />\n ${state} <mwc-icon>account_circle</mwc-icon> ${user.name}\n <br />\n ${comment}\n </p>\n `\n )}\n `\n }\n}\n"]}
@@ -2,6 +2,7 @@ import { __decorate } from "tslib";
2
2
  import '@operato/input/ox-input-file.js';
3
3
  import { css, html, LitElement } from 'lit';
4
4
  import { customElement, property } from 'lit/decorators.js';
5
+ import { i18next } from '@operato/i18n';
5
6
  import { OxDataUseCase } from './ox-data-use-case.js';
6
7
  let OxDataSampleView = class OxDataSampleView extends LitElement {
7
8
  render() {
@@ -10,23 +11,23 @@ let OxDataSampleView = class OxDataSampleView extends LitElement {
10
11
  const data = ((_b = this.dataSample) === null || _b === void 0 ? void 0 : _b.data) || {};
11
12
  const formatter = new Intl.DateTimeFormat(navigator.language, { dateStyle: 'full', timeStyle: 'short' });
12
13
  const { name, description, collectedAt, workDate, workShift } = this.dataSample || {};
13
- return html ` <h2>${name}</h2>
14
+ return html ` <h2>${i18next.t('field.name')}</h2>
14
15
  <p page-description>
15
- ${description}<br /><br />
16
- work date: ${workDate} ${workShift}<br />
17
- collected at: ${formatter.format(new Date(collectedAt))}
16
+ ${i18next.t('field.description')}<br /><br />
17
+ ${i18next.t('field.work-date')}: ${workDate} ${workShift}<br />
18
+ ${i18next.t('field.collected-at')}: ${formatter.format(new Date(collectedAt))}
18
19
  </p>
19
20
 
20
21
  <form @change=${(e) => this.onChange(e)}>
21
22
  <table>
22
23
  <tr>
23
- <th item>item</th>
24
- <th>description</th>
25
- <th>unit</th>
26
- <th value>value</th>
27
- <th>specification</th>
28
- <th>OOC</th>
29
- <th>OOS</th>
24
+ <th item>${i18next.t('field.item')}</th>
25
+ <th>${i18next.t('field.description')}</th>
26
+ <th>${i18next.t('field.unit')}</th>
27
+ <th value>${i18next.t('field.value')}</th>
28
+ <th>${i18next.t('field.spec')}</th>
29
+ <th>${i18next.t('field.ooc')}</th>
30
+ <th>${i18next.t('field.oos')}</th>
30
31
  </tr>
31
32
  ${dataItems.map(dataItem => {
32
33
  const { ooc, oos } = this.evaluateOOC(dataItem, data === null || data === void 0 ? void 0 : data[dataItem.tag]) || {};