@operato/grist-editor 2.0.0-alpha.10 → 2.0.0-alpha.102

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 (70) hide show
  1. package/CHANGELOG.md +495 -0
  2. package/dist/src/index.js +4 -0
  3. package/dist/src/index.js.map +1 -1
  4. package/dist/src/ox-grist-editor-crontab.d.ts +1 -1
  5. package/dist/src/ox-grist-editor-duration.d.ts +1 -1
  6. package/dist/src/ox-grist-editor-hashtags.d.ts +1 -1
  7. package/dist/src/ox-grist-editor-i18n-label.d.ts +13 -0
  8. package/dist/src/ox-grist-editor-i18n-label.js +85 -0
  9. package/dist/src/ox-grist-editor-i18n-label.js.map +1 -0
  10. package/dist/src/ox-grist-editor-parameters.d.ts +1 -1
  11. package/dist/src/ox-grist-editor-partition-keys.d.ts +1 -1
  12. package/dist/src/ox-grist-editor-partition-keys.js +1 -1
  13. package/dist/src/ox-grist-editor-partition-keys.js.map +1 -1
  14. package/dist/src/ox-grist-editor-quantifier.d.ts +1 -1
  15. package/dist/src/ox-grist-editor-value-map.d.ts +1 -1
  16. package/dist/src/ox-grist-editor-value-ranges.d.ts +1 -1
  17. package/dist/src/ox-grist-renderer-i18n-label.d.ts +2 -0
  18. package/dist/src/ox-grist-renderer-i18n-label.js +9 -0
  19. package/dist/src/ox-grist-renderer-i18n-label.js.map +1 -0
  20. package/dist/src/ox-grist-renderer-partition-keys.d.ts +1 -1
  21. package/dist/src/ox-grist-renderer-partition-keys.js +4 -4
  22. package/dist/src/ox-grist-renderer-partition-keys.js.map +1 -1
  23. package/dist/src/ox-parameters-builder.d.ts +15 -1
  24. package/dist/src/ox-parameters-builder.js +6 -0
  25. package/dist/src/ox-parameters-builder.js.map +1 -1
  26. package/dist/src/ox-popup-crontab-input.d.ts +2 -1
  27. package/dist/src/ox-popup-crontab-input.js +7 -8
  28. package/dist/src/ox-popup-crontab-input.js.map +1 -1
  29. package/dist/src/ox-popup-duration-input.d.ts +2 -1
  30. package/dist/src/ox-popup-duration-input.js +7 -8
  31. package/dist/src/ox-popup-duration-input.js.map +1 -1
  32. package/dist/src/ox-popup-hashtags-input.d.ts +2 -1
  33. package/dist/src/ox-popup-hashtags-input.js +8 -9
  34. package/dist/src/ox-popup-hashtags-input.js.map +1 -1
  35. package/dist/src/ox-popup-i18n-label-input.d.ts +16 -0
  36. package/dist/src/ox-popup-i18n-label-input.js +100 -0
  37. package/dist/src/ox-popup-i18n-label-input.js.map +1 -0
  38. package/dist/src/ox-popup-parameters-builder.d.ts +2 -1
  39. package/dist/src/ox-popup-parameters-builder.js +10 -8
  40. package/dist/src/ox-popup-parameters-builder.js.map +1 -1
  41. package/dist/src/ox-popup-partition-keys-input.d.ts +2 -1
  42. package/dist/src/ox-popup-partition-keys-input.js +7 -8
  43. package/dist/src/ox-popup-partition-keys-input.js.map +1 -1
  44. package/dist/src/ox-popup-value-map-input.d.ts +2 -1
  45. package/dist/src/ox-popup-value-map-input.js +7 -8
  46. package/dist/src/ox-popup-value-map-input.js.map +1 -1
  47. package/dist/src/ox-popup-value-ranges-input.d.ts +2 -1
  48. package/dist/src/ox-popup-value-ranges-input.js +7 -8
  49. package/dist/src/ox-popup-value-ranges-input.js.map +1 -1
  50. package/dist/stories/ox-grist-editor-crontab.stories.d.ts +1 -1
  51. package/dist/stories/ox-grist-editor-crontab.stories.js +66 -54
  52. package/dist/stories/ox-grist-editor-crontab.stories.js.map +1 -1
  53. package/dist/tsconfig.tsbuildinfo +1 -1
  54. package/package.json +44 -36
  55. package/src/index.ts +4 -0
  56. package/src/ox-grist-editor-i18n-label.ts +101 -0
  57. package/src/ox-grist-editor-partition-keys.ts +1 -1
  58. package/src/ox-grist-renderer-i18n-label.ts +12 -0
  59. package/src/ox-grist-renderer-partition-keys.ts +4 -4
  60. package/src/ox-parameters-builder.ts +8 -2
  61. package/src/ox-popup-crontab-input.ts +7 -8
  62. package/src/ox-popup-duration-input.ts +7 -8
  63. package/src/ox-popup-hashtags-input.ts +8 -9
  64. package/src/ox-popup-i18n-label-input.ts +97 -0
  65. package/src/ox-popup-parameters-builder.ts +10 -8
  66. package/src/ox-popup-partition-keys-input.ts +7 -8
  67. package/src/ox-popup-value-map-input.ts +8 -8
  68. package/src/ox-popup-value-ranges-input.ts +7 -8
  69. package/stories/ox-grist-editor-crontab.stories.ts +71 -60
  70. package/themes/grist-theme.css +3 -1
package/CHANGELOG.md CHANGED
@@ -3,6 +3,501 @@
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
+ ## [2.0.0-alpha.102](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.101...v2.0.0-alpha.102) (2024-04-22)
7
+
8
+ **Note:** Version bump only for package @operato/grist-editor
9
+
10
+
11
+
12
+
13
+
14
+ ## [2.0.0-alpha.100](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.99...v2.0.0-alpha.100) (2024-04-21)
15
+
16
+ **Note:** Version bump only for package @operato/grist-editor
17
+
18
+
19
+
20
+
21
+
22
+ ## [2.0.0-alpha.99](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.98...v2.0.0-alpha.99) (2024-04-21)
23
+
24
+ **Note:** Version bump only for package @operato/grist-editor
25
+
26
+
27
+
28
+
29
+
30
+ ## [2.0.0-alpha.98](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.97...v2.0.0-alpha.98) (2024-04-21)
31
+
32
+ **Note:** Version bump only for package @operato/grist-editor
33
+
34
+
35
+
36
+
37
+
38
+ ## [2.0.0-alpha.97](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.96...v2.0.0-alpha.97) (2024-04-21)
39
+
40
+ **Note:** Version bump only for package @operato/grist-editor
41
+
42
+
43
+
44
+
45
+
46
+ ## [2.0.0-alpha.96](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.95...v2.0.0-alpha.96) (2024-04-21)
47
+
48
+
49
+ ### :bug: Bug Fix
50
+
51
+ * style for ox-parameters-builder ([6a9a3fb](https://github.com/hatiolab/operato/commit/6a9a3fb74493257790677ecc2664f27beb6b849e))
52
+
53
+
54
+
55
+ ## [2.0.0-alpha.95](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.94...v2.0.0-alpha.95) (2024-04-21)
56
+
57
+
58
+ ### :bug: Bug Fix
59
+
60
+ * add styles for CSStyles property into PropertySpec ([1c18564](https://github.com/hatiolab/operato/commit/1c185645c2f8e8b0c8a654d15e3b7603b80d2864))
61
+
62
+
63
+
64
+ ## [2.0.0-alpha.94](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.93...v2.0.0-alpha.94) (2024-04-20)
65
+
66
+ **Note:** Version bump only for package @operato/grist-editor
67
+
68
+
69
+
70
+
71
+
72
+ ## [2.0.0-alpha.93](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.92...v2.0.0-alpha.93) (2024-04-19)
73
+
74
+
75
+ ### :bug: Bug Fix
76
+
77
+ * grid body border-bottom style ([708a937](https://github.com/hatiolab/operato/commit/708a93789d23417a318e2ac9f499bec85d7e4776))
78
+
79
+
80
+
81
+ ## [2.0.0-alpha.92](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.91...v2.0.0-alpha.92) (2024-04-19)
82
+
83
+ **Note:** Version bump only for package @operato/grist-editor
84
+
85
+
86
+
87
+
88
+
89
+ ## [2.0.0-alpha.90](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.89...v2.0.0-alpha.90) (2024-04-18)
90
+
91
+ **Note:** Version bump only for package @operato/grist-editor
92
+
93
+
94
+
95
+
96
+
97
+ ## [2.0.0-alpha.89](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.88...v2.0.0-alpha.89) (2024-04-18)
98
+
99
+ **Note:** Version bump only for package @operato/grist-editor
100
+
101
+
102
+
103
+
104
+
105
+ ## [2.0.0-alpha.88](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.87...v2.0.0-alpha.88) (2024-04-18)
106
+
107
+ **Note:** Version bump only for package @operato/grist-editor
108
+
109
+
110
+
111
+
112
+
113
+ ## [2.0.0-alpha.87](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.86...v2.0.0-alpha.87) (2024-04-17)
114
+
115
+ **Note:** Version bump only for package @operato/grist-editor
116
+
117
+
118
+
119
+
120
+
121
+ ## [2.0.0-alpha.86](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.85...v2.0.0-alpha.86) (2024-04-16)
122
+
123
+ **Note:** Version bump only for package @operato/grist-editor
124
+
125
+
126
+
127
+
128
+
129
+ ## [2.0.0-alpha.85](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.84...v2.0.0-alpha.85) (2024-04-16)
130
+
131
+ **Note:** Version bump only for package @operato/grist-editor
132
+
133
+
134
+
135
+
136
+
137
+ ## [2.0.0-alpha.82](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.81...v2.0.0-alpha.82) (2024-04-15)
138
+
139
+
140
+ ### :bug: Bug Fix
141
+
142
+ * correct import ([a3587dd](https://github.com/hatiolab/operato/commit/a3587dd65903a0acaa7b25aa4ef15b2d85aaf418))
143
+
144
+
145
+
146
+ ## [2.0.0-alpha.81](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.80...v2.0.0-alpha.81) (2024-04-15)
147
+
148
+
149
+ ### :bug: Bug Fix
150
+
151
+ * use button-container styles ([bd91be3](https://github.com/hatiolab/operato/commit/bd91be3eaf5337a0ffe8cfc3b37191b6427ce5f6))
152
+
153
+
154
+
155
+ ## [2.0.0-alpha.80](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.79...v2.0.0-alpha.80) (2024-04-15)
156
+
157
+ **Note:** Version bump only for package @operato/grist-editor
158
+
159
+
160
+
161
+
162
+
163
+ ## [2.0.0-alpha.77](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.76...v2.0.0-alpha.77) (2024-04-14)
164
+
165
+ **Note:** Version bump only for package @operato/grist-editor
166
+
167
+
168
+
169
+
170
+
171
+ ## [2.0.0-alpha.71](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.70...v2.0.0-alpha.71) (2024-04-13)
172
+
173
+ **Note:** Version bump only for package @operato/grist-editor
174
+
175
+
176
+
177
+
178
+
179
+ ## [2.0.0-alpha.69](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.68...v2.0.0-alpha.69) (2024-04-13)
180
+
181
+
182
+ ### :bug: Bug Fix
183
+
184
+ * mwc=>md for context ([972f5fd](https://github.com/hatiolab/operato/commit/972f5fd8da02820b6d6238cf1dd099591f97d8df))
185
+
186
+
187
+
188
+ ## [2.0.0-alpha.68](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.67...v2.0.0-alpha.68) (2024-04-13)
189
+
190
+
191
+ ### :bug: Bug Fix
192
+
193
+ * mwc=>md for context ([2bc13f2](https://github.com/hatiolab/operato/commit/2bc13f285f257782f73e5d7b5d1ddd197df85393))
194
+
195
+
196
+
197
+ ## [2.0.0-alpha.64](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.63...v2.0.0-alpha.64) (2024-04-13)
198
+
199
+ **Note:** Version bump only for package @operato/grist-editor
200
+
201
+
202
+
203
+
204
+
205
+ ## [2.0.0-alpha.63](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.62...v2.0.0-alpha.63) (2024-04-12)
206
+
207
+ **Note:** Version bump only for package @operato/grist-editor
208
+
209
+
210
+
211
+
212
+
213
+ ## [2.0.0-alpha.62](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.61...v2.0.0-alpha.62) (2024-04-12)
214
+
215
+ **Note:** Version bump only for package @operato/grist-editor
216
+
217
+
218
+
219
+
220
+
221
+ ## [2.0.0-alpha.61](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.60...v2.0.0-alpha.61) (2024-04-11)
222
+
223
+ **Note:** Version bump only for package @operato/grist-editor
224
+
225
+
226
+
227
+
228
+
229
+ ## [2.0.0-alpha.60](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.59...v2.0.0-alpha.60) (2024-04-11)
230
+
231
+ **Note:** Version bump only for package @operato/grist-editor
232
+
233
+
234
+
235
+
236
+
237
+ ## [2.0.0-alpha.59](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.58...v2.0.0-alpha.59) (2024-04-11)
238
+
239
+ **Note:** Version bump only for package @operato/grist-editor
240
+
241
+
242
+
243
+
244
+
245
+ ## [2.0.0-alpha.57](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.56...v2.0.0-alpha.57) (2024-04-07)
246
+
247
+ **Note:** Version bump only for package @operato/grist-editor
248
+
249
+
250
+
251
+
252
+
253
+
254
+
255
+ **Note:** Version bump only for package @operato/grist-editor
256
+
257
+
258
+
259
+
260
+
261
+ ## [2.0.0-alpha.54](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.53...v2.0.0-alpha.54) (2024-04-01)
262
+
263
+ **Note:** Version bump only for package @operato/grist-editor
264
+
265
+
266
+
267
+
268
+
269
+ ## [2.0.0-alpha.52](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.51...v2.0.0-alpha.52) (2024-03-29)
270
+
271
+ **Note:** Version bump only for package @operato/grist-editor
272
+
273
+
274
+
275
+
276
+
277
+ ## [2.0.0-alpha.51](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.50...v2.0.0-alpha.51) (2024-03-29)
278
+
279
+
280
+ ### :bug: Bug Fix
281
+
282
+ * upgrade lit ([e661c33](https://github.com/hatiolab/operato/commit/e661c333d2bb97f784b5ac2c0e365714ee5e80ff))
283
+
284
+
285
+
286
+ ## [2.0.0-alpha.49](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.48...v2.0.0-alpha.49) (2024-03-28)
287
+
288
+
289
+ ### :bug: Bug Fix
290
+
291
+ * i18n label ([fd48ef2](https://github.com/hatiolab/operato/commit/fd48ef2bd9bde7846a032fed5d34283fbb27a065))
292
+
293
+
294
+
295
+ ## [2.0.0-alpha.48](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.47...v2.0.0-alpha.48) (2024-03-28)
296
+
297
+ **Note:** Version bump only for package @operato/grist-editor
298
+
299
+
300
+
301
+
302
+
303
+ ## [2.0.0-alpha.47](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.46...v2.0.0-alpha.47) (2024-03-27)
304
+
305
+ **Note:** Version bump only for package @operato/grist-editor
306
+
307
+
308
+
309
+
310
+
311
+ ## [2.0.0-alpha.46](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.45...v2.0.0-alpha.46) (2024-03-26)
312
+
313
+ **Note:** Version bump only for package @operato/grist-editor
314
+
315
+
316
+
317
+
318
+
319
+ ## [2.0.0-alpha.44](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.43...v2.0.0-alpha.44) (2024-03-24)
320
+
321
+ **Note:** Version bump only for package @operato/grist-editor
322
+
323
+
324
+
325
+
326
+
327
+ ## [2.0.0-alpha.43](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.42...v2.0.0-alpha.43) (2024-03-24)
328
+
329
+ **Note:** Version bump only for package @operato/grist-editor
330
+
331
+
332
+
333
+
334
+
335
+ ## [2.0.0-alpha.37](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.36...v2.0.0-alpha.37) (2024-03-18)
336
+
337
+ **Note:** Version bump only for package @operato/grist-editor
338
+
339
+
340
+
341
+
342
+
343
+ ## [2.0.0-alpha.36](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.35...v2.0.0-alpha.36) (2024-03-14)
344
+
345
+
346
+ ### :bug: Bug Fix
347
+
348
+ * multilingual common-code ([89ee53b](https://github.com/hatiolab/operato/commit/89ee53b448560a148483d11a3d0182410b952609))
349
+
350
+
351
+
352
+ ## [2.0.0-alpha.35](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.34...v2.0.0-alpha.35) (2024-03-13)
353
+
354
+ **Note:** Version bump only for package @operato/grist-editor
355
+
356
+
357
+
358
+
359
+
360
+ ## [2.0.0-alpha.34](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.33...v2.0.0-alpha.34) (2024-03-12)
361
+
362
+
363
+ ### :bug: Bug Fix
364
+
365
+ * multilingual common-code ([80ca17f](https://github.com/hatiolab/operato/commit/80ca17f32f87808d78ac23ff2737584d6ac8098e))
366
+
367
+
368
+
369
+ ## [2.0.0-alpha.33](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.32...v2.0.0-alpha.33) (2024-03-12)
370
+
371
+
372
+ ### :bug: Bug Fix
373
+
374
+ * multilingual common-code ([b1305f1](https://github.com/hatiolab/operato/commit/b1305f11baa70cd437734d46d9dcdfc3c68e1924))
375
+
376
+
377
+
378
+ ## [2.0.0-alpha.32](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.31...v2.0.0-alpha.32) (2024-03-12)
379
+
380
+
381
+ ### :bug: Bug Fix
382
+
383
+ * multilingual common-code ([184bcd9](https://github.com/hatiolab/operato/commit/184bcd9ce23ead50e46d9b6cc7bf6788e63b6e21))
384
+
385
+
386
+
387
+ ## [2.0.0-alpha.31](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.30...v2.0.0-alpha.31) (2024-03-03)
388
+
389
+ **Note:** Version bump only for package @operato/grist-editor
390
+
391
+
392
+
393
+
394
+
395
+ ## [2.0.0-alpha.30](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.29...v2.0.0-alpha.30) (2024-03-03)
396
+
397
+ **Note:** Version bump only for package @operato/grist-editor
398
+
399
+
400
+
401
+
402
+
403
+ ## [2.0.0-alpha.28](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.27...v2.0.0-alpha.28) (2024-02-20)
404
+
405
+
406
+ ### :bug: Bug Fix
407
+
408
+ * upgrade devDependencies for webcomponents ([1489b8b](https://github.com/hatiolab/operato/commit/1489b8b790d9bcee779a070a630697f25c01728f))
409
+
410
+
411
+
412
+ ## [2.0.0-alpha.27](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.26...v2.0.0-alpha.27) (2024-02-17)
413
+
414
+ **Note:** Version bump only for package @operato/grist-editor
415
+
416
+
417
+
418
+
419
+
420
+ ## [2.0.0-alpha.23](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.22...v2.0.0-alpha.23) (2024-02-10)
421
+
422
+ **Note:** Version bump only for package @operato/grist-editor
423
+
424
+
425
+
426
+
427
+
428
+ ## [2.0.0-alpha.22](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.21...v2.0.0-alpha.22) (2024-02-10)
429
+
430
+ **Note:** Version bump only for package @operato/grist-editor
431
+
432
+
433
+
434
+
435
+
436
+ ## [2.0.0-alpha.21](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.20...v2.0.0-alpha.21) (2024-02-09)
437
+
438
+ **Note:** Version bump only for package @operato/grist-editor
439
+
440
+
441
+
442
+
443
+
444
+ ## [2.0.0-alpha.20](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.19...v2.0.0-alpha.20) (2024-02-05)
445
+
446
+ **Note:** Version bump only for package @operato/grist-editor
447
+
448
+
449
+
450
+
451
+
452
+ ## [2.0.0-alpha.19](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.18...v2.0.0-alpha.19) (2024-02-05)
453
+
454
+ **Note:** Version bump only for package @operato/grist-editor
455
+
456
+
457
+
458
+
459
+
460
+ ## [2.0.0-alpha.17](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.16...v2.0.0-alpha.17) (2024-02-04)
461
+
462
+ **Note:** Version bump only for package @operato/grist-editor
463
+
464
+
465
+
466
+
467
+
468
+ ## [2.0.0-alpha.16](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.15...v2.0.0-alpha.16) (2024-02-03)
469
+
470
+ **Note:** Version bump only for package @operato/grist-editor
471
+
472
+
473
+
474
+
475
+
476
+ ## [2.0.0-alpha.13](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.12...v2.0.0-alpha.13) (2024-01-28)
477
+
478
+
479
+ ### :bug: Bug Fix
480
+
481
+ * css-variable --grid-record-padding ([b057312](https://github.com/hatiolab/operato/commit/b0573120fcb46c71b6b283065f08ae926e9f826f))
482
+
483
+
484
+
485
+ ## [2.0.0-alpha.12](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.11...v2.0.0-alpha.12) (2024-01-24)
486
+
487
+ **Note:** Version bump only for package @operato/grist-editor
488
+
489
+
490
+
491
+
492
+
493
+ ## [2.0.0-alpha.11](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.10...v2.0.0-alpha.11) (2024-01-24)
494
+
495
+ **Note:** Version bump only for package @operato/grist-editor
496
+
497
+
498
+
499
+
500
+
6
501
  ## [2.0.0-alpha.10](https://github.com/hatiolab/operato/compare/v2.0.0-alpha.9...v2.0.0-alpha.10) (2024-01-22)
7
502
 
8
503
  **Note:** Version bump only for package @operato/grist-editor
package/dist/src/index.js CHANGED
@@ -11,6 +11,8 @@ import { OxGristRendererQuantifier } from './ox-grist-renderer-quantifier';
11
11
  import { OxGristRendererHashtags } from './ox-grist-renderer-hashtags';
12
12
  import { OxGristRendererPartitionKeys } from './ox-grist-renderer-partition-keys.js';
13
13
  import { OxGristEditorValueRanges } from './ox-grist-editor-value-ranges.js';
14
+ import { OxGristEditorI18nLabel } from './ox-grist-editor-i18n-label.js';
15
+ import { OxGristRendererI18nLabel } from './ox-grist-renderer-i18n-label.js';
14
16
  /* register grist renderer/editor for id */
15
17
  registerEditor('parameters', OxGristEditorParameters);
16
18
  registerEditor('value-map', OxGristEditorValueMap);
@@ -20,6 +22,7 @@ registerEditor('crontab', OxGristEditorCrontab);
20
22
  registerEditor('duration', OxGristEditorDuration);
21
23
  registerEditor('quantifier', OxGristEditorQuantifier);
22
24
  registerEditor('hashtags', OxGristEditorHashtags);
25
+ registerEditor('i18n-label', OxGristEditorI18nLabel);
23
26
  registerRenderer('parameters', OxGristRendererJson5);
24
27
  registerRenderer('value-map', OxGristRendererJson5);
25
28
  registerRenderer('value-ranges', OxGristRendererJson5);
@@ -27,4 +30,5 @@ registerRenderer('partition-keys', OxGristRendererPartitionKeys);
27
30
  registerRenderer('duration', OxGristRendererDuration);
28
31
  registerRenderer('quantifier', OxGristRendererQuantifier);
29
32
  registerRenderer('hashtags', OxGristRendererHashtags);
33
+ registerRenderer('i18n-label', OxGristRendererI18nLabel);
30
34
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAE5F,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAA;AACnE,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAA;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAA;AACrE,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAA;AACzE,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAA;AAChF,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAA;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAA;AACtE,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAA;AACzE,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAA;AAC1E,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAA;AACtE,OAAO,EAAE,4BAA4B,EAAE,MAAM,uCAAuC,CAAA;AACpF,OAAO,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAA;AAE5E,2CAA2C;AAC3C,cAAc,CAAC,YAAY,EAAE,uBAAuB,CAAC,CAAA;AACrD,cAAc,CAAC,WAAW,EAAE,qBAAqB,CAAC,CAAA;AAClD,cAAc,CAAC,cAAc,EAAE,wBAAwB,CAAC,CAAA;AACxD,cAAc,CAAC,gBAAgB,EAAE,0BAA0B,CAAC,CAAA;AAC5D,cAAc,CAAC,SAAS,EAAE,oBAAoB,CAAC,CAAA;AAC/C,cAAc,CAAC,UAAU,EAAE,qBAAqB,CAAC,CAAA;AACjD,cAAc,CAAC,YAAY,EAAE,uBAAuB,CAAC,CAAA;AACrD,cAAc,CAAC,UAAU,EAAE,qBAAqB,CAAC,CAAA;AAEjD,gBAAgB,CAAC,YAAY,EAAE,oBAAoB,CAAC,CAAA;AACpD,gBAAgB,CAAC,WAAW,EAAE,oBAAoB,CAAC,CAAA;AACnD,gBAAgB,CAAC,cAAc,EAAE,oBAAoB,CAAC,CAAA;AACtD,gBAAgB,CAAC,gBAAgB,EAAE,4BAA4B,CAAC,CAAA;AAChE,gBAAgB,CAAC,UAAU,EAAE,uBAAuB,CAAC,CAAA;AACrD,gBAAgB,CAAC,YAAY,EAAE,yBAAyB,CAAC,CAAA;AACzD,gBAAgB,CAAC,UAAU,EAAE,uBAAuB,CAAC,CAAA","sourcesContent":["import { OxGristRendererJson5, registerEditor, registerRenderer } from '@operato/data-grist'\n\nimport { OxGristEditorCrontab } from './ox-grist-editor-crontab.js'\nimport { OxGristEditorDuration } from './ox-grist-editor-duration.js'\nimport { OxGristEditorHashtags } from './ox-grist-editor-hashtags.js'\nimport { OxGristEditorParameters } from './ox-grist-editor-parameters.js'\nimport { OxGristEditorPartitionKeys } from './ox-grist-editor-partition-keys.js'\nimport { OxGristEditorQuantifier } from './ox-grist-editor-quantifier.js'\nimport { OxGristEditorValueMap } from './ox-grist-editor-value-map.js'\nimport { OxGristRendererDuration } from './ox-grist-renderer-duration.js'\nimport { OxGristRendererQuantifier } from './ox-grist-renderer-quantifier'\nimport { OxGristRendererHashtags } from './ox-grist-renderer-hashtags'\nimport { OxGristRendererPartitionKeys } from './ox-grist-renderer-partition-keys.js'\nimport { OxGristEditorValueRanges } from './ox-grist-editor-value-ranges.js'\n\n/* register grist renderer/editor for id */\nregisterEditor('parameters', OxGristEditorParameters)\nregisterEditor('value-map', OxGristEditorValueMap)\nregisterEditor('value-ranges', OxGristEditorValueRanges)\nregisterEditor('partition-keys', OxGristEditorPartitionKeys)\nregisterEditor('crontab', OxGristEditorCrontab)\nregisterEditor('duration', OxGristEditorDuration)\nregisterEditor('quantifier', OxGristEditorQuantifier)\nregisterEditor('hashtags', OxGristEditorHashtags)\n\nregisterRenderer('parameters', OxGristRendererJson5)\nregisterRenderer('value-map', OxGristRendererJson5)\nregisterRenderer('value-ranges', OxGristRendererJson5)\nregisterRenderer('partition-keys', OxGristRendererPartitionKeys)\nregisterRenderer('duration', OxGristRendererDuration)\nregisterRenderer('quantifier', OxGristRendererQuantifier)\nregisterRenderer('hashtags', OxGristRendererHashtags)\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAE5F,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAA;AACnE,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAA;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAA;AACrE,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAA;AACzE,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAA;AAChF,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAA;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAA;AACtE,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAA;AACzE,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAA;AAC1E,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAA;AACtE,OAAO,EAAE,4BAA4B,EAAE,MAAM,uCAAuC,CAAA;AACpF,OAAO,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAA;AAC5E,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAA;AACxE,OAAO,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAA;AAE5E,2CAA2C;AAC3C,cAAc,CAAC,YAAY,EAAE,uBAAuB,CAAC,CAAA;AACrD,cAAc,CAAC,WAAW,EAAE,qBAAqB,CAAC,CAAA;AAClD,cAAc,CAAC,cAAc,EAAE,wBAAwB,CAAC,CAAA;AACxD,cAAc,CAAC,gBAAgB,EAAE,0BAA0B,CAAC,CAAA;AAC5D,cAAc,CAAC,SAAS,EAAE,oBAAoB,CAAC,CAAA;AAC/C,cAAc,CAAC,UAAU,EAAE,qBAAqB,CAAC,CAAA;AACjD,cAAc,CAAC,YAAY,EAAE,uBAAuB,CAAC,CAAA;AACrD,cAAc,CAAC,UAAU,EAAE,qBAAqB,CAAC,CAAA;AACjD,cAAc,CAAC,YAAY,EAAE,sBAAsB,CAAC,CAAA;AAEpD,gBAAgB,CAAC,YAAY,EAAE,oBAAoB,CAAC,CAAA;AACpD,gBAAgB,CAAC,WAAW,EAAE,oBAAoB,CAAC,CAAA;AACnD,gBAAgB,CAAC,cAAc,EAAE,oBAAoB,CAAC,CAAA;AACtD,gBAAgB,CAAC,gBAAgB,EAAE,4BAA4B,CAAC,CAAA;AAChE,gBAAgB,CAAC,UAAU,EAAE,uBAAuB,CAAC,CAAA;AACrD,gBAAgB,CAAC,YAAY,EAAE,yBAAyB,CAAC,CAAA;AACzD,gBAAgB,CAAC,UAAU,EAAE,uBAAuB,CAAC,CAAA;AACrD,gBAAgB,CAAC,YAAY,EAAE,wBAAwB,CAAC,CAAA","sourcesContent":["import { OxGristRendererJson5, registerEditor, registerRenderer } from '@operato/data-grist'\n\nimport { OxGristEditorCrontab } from './ox-grist-editor-crontab.js'\nimport { OxGristEditorDuration } from './ox-grist-editor-duration.js'\nimport { OxGristEditorHashtags } from './ox-grist-editor-hashtags.js'\nimport { OxGristEditorParameters } from './ox-grist-editor-parameters.js'\nimport { OxGristEditorPartitionKeys } from './ox-grist-editor-partition-keys.js'\nimport { OxGristEditorQuantifier } from './ox-grist-editor-quantifier.js'\nimport { OxGristEditorValueMap } from './ox-grist-editor-value-map.js'\nimport { OxGristRendererDuration } from './ox-grist-renderer-duration.js'\nimport { OxGristRendererQuantifier } from './ox-grist-renderer-quantifier'\nimport { OxGristRendererHashtags } from './ox-grist-renderer-hashtags'\nimport { OxGristRendererPartitionKeys } from './ox-grist-renderer-partition-keys.js'\nimport { OxGristEditorValueRanges } from './ox-grist-editor-value-ranges.js'\nimport { OxGristEditorI18nLabel } from './ox-grist-editor-i18n-label.js'\nimport { OxGristRendererI18nLabel } from './ox-grist-renderer-i18n-label.js'\n\n/* register grist renderer/editor for id */\nregisterEditor('parameters', OxGristEditorParameters)\nregisterEditor('value-map', OxGristEditorValueMap)\nregisterEditor('value-ranges', OxGristEditorValueRanges)\nregisterEditor('partition-keys', OxGristEditorPartitionKeys)\nregisterEditor('crontab', OxGristEditorCrontab)\nregisterEditor('duration', OxGristEditorDuration)\nregisterEditor('quantifier', OxGristEditorQuantifier)\nregisterEditor('hashtags', OxGristEditorHashtags)\nregisterEditor('i18n-label', OxGristEditorI18nLabel)\n\nregisterRenderer('parameters', OxGristRendererJson5)\nregisterRenderer('value-map', OxGristRendererJson5)\nregisterRenderer('value-ranges', OxGristRendererJson5)\nregisterRenderer('partition-keys', OxGristRendererPartitionKeys)\nregisterRenderer('duration', OxGristRendererDuration)\nregisterRenderer('quantifier', OxGristRendererQuantifier)\nregisterRenderer('hashtags', OxGristRendererHashtags)\nregisterRenderer('i18n-label', OxGristRendererI18nLabel)\n"]}
@@ -2,7 +2,7 @@ import './ox-popup-crontab-input.js';
2
2
  import { OxGristEditor } from '@operato/data-grist';
3
3
  export declare class OxGristEditorCrontab extends OxGristEditor {
4
4
  private popup?;
5
- get editorTemplate(): import("lit").TemplateResult<1>;
5
+ get editorTemplate(): import("lit-html").TemplateResult<1>;
6
6
  _onclick(e: Event): void;
7
7
  _onkeydown(e: KeyboardEvent): void;
8
8
  showEditorPopup(): void;
@@ -2,7 +2,7 @@ import './ox-popup-duration-input.js';
2
2
  import { OxGristEditor } from '@operato/data-grist';
3
3
  export declare class OxGristEditorDuration extends OxGristEditor {
4
4
  private popup?;
5
- get editorTemplate(): import("lit").TemplateResult<1>;
5
+ get editorTemplate(): import("lit-html").TemplateResult<1>;
6
6
  _onclick(e: Event): void;
7
7
  _onkeydown(e: KeyboardEvent): void;
8
8
  showEditorPopup(): void;
@@ -2,7 +2,7 @@ import './ox-popup-hashtags-input.js';
2
2
  import { OxGristEditor } from '@operato/data-grist';
3
3
  export declare class OxGristEditorHashtags extends OxGristEditor {
4
4
  private popup?;
5
- get editorTemplate(): import("lit").TemplateResult<1>;
5
+ get editorTemplate(): import("lit-html").TemplateResult<1>;
6
6
  _onclick(e: Event): void;
7
7
  _onkeydown(e: KeyboardEvent): void;
8
8
  showEditorPopup(): void;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @license Copyright © HatioLab Inc. All rights reserved.
3
+ */
4
+ import './ox-popup-i18n-label-input.js';
5
+ import { OxGristEditor } from '@operato/data-grist';
6
+ export declare class OxGristEditorI18nLabel extends OxGristEditor {
7
+ private popup?;
8
+ get options(): any;
9
+ get editorTemplate(): import("lit-html").TemplateResult<1>;
10
+ _onclick(e: Event): void;
11
+ _onkeydown(e: KeyboardEvent): void;
12
+ openSelector(): Promise<void>;
13
+ }
@@ -0,0 +1,85 @@
1
+ /**
2
+ * @license Copyright © HatioLab Inc. All rights reserved.
3
+ */
4
+ import { __decorate } from "tslib";
5
+ import './ox-popup-i18n-label-input.js';
6
+ import { html } from 'lit';
7
+ import { customElement } from 'lit/decorators.js';
8
+ import { cloneDeep } from 'lodash-es';
9
+ import { OxGristEditor } from '@operato/data-grist';
10
+ import { i18next } from '@operato/i18n';
11
+ import { openPopup } from '@operato/popup';
12
+ let OxGristEditorI18nLabel = class OxGristEditorI18nLabel extends OxGristEditor {
13
+ get options() {
14
+ var _a;
15
+ return ((_a = this.column.record) === null || _a === void 0 ? void 0 : _a.options) || {};
16
+ }
17
+ get editorTemplate() {
18
+ const { displayColumn } = this.column.record.options || {};
19
+ const value = this.value && typeof this.value === 'object'
20
+ ? this.value[i18next.language || 'en-US']
21
+ : displayColumn
22
+ ? this.record[displayColumn]
23
+ : '';
24
+ return html `<div tabindex="0">${value || ''}</div>`;
25
+ }
26
+ _onclick(e) {
27
+ e.stopPropagation();
28
+ this.openSelector();
29
+ }
30
+ _onkeydown(e) {
31
+ const key = e.key;
32
+ if (key == 'Enter') {
33
+ e.stopPropagation();
34
+ this.openSelector();
35
+ }
36
+ }
37
+ async openSelector() {
38
+ if (this.popup) {
39
+ delete this.popup;
40
+ }
41
+ const { name, help, languages, objectified = false } = this.options || {};
42
+ const confirmCallback = (newval) => {
43
+ this.dispatchEvent(new CustomEvent('field-change', {
44
+ bubbles: true,
45
+ composed: true,
46
+ detail: {
47
+ before: this.value,
48
+ after: !objectified ? JSON.stringify(newval) : newval,
49
+ record: this.record,
50
+ column: this.column,
51
+ row: this.row
52
+ }
53
+ }));
54
+ };
55
+ try {
56
+ var value = !objectified && typeof this.value === 'string' ? JSON.parse(this.value) : cloneDeep(this.value || {});
57
+ }
58
+ catch (e) {
59
+ var value = {};
60
+ }
61
+ /*
62
+ 주의 : 이 팝업 템플릿은 layout 모듈에 의해서 render 되므로,
63
+ layout의 구성에 변화가 발생하면, 다시 render된다.
64
+ 이 팝업이 떠 있는 상태에서, 또 다른 팝업이 뜨는 경우도 layout 구성의 변화를 야기한다. (overlay의 갯수의 증가)
65
+ 이 경우 value, options, confirmCallback 등 클로져를 사용한 것들이 초기 바인딩된 값으로 다시 바인딩되게 되는데,
66
+ 만약, 템플릿 내부에서 이들 속성의 레퍼런스가 변화했다면, 원래 상태로 되돌아가는 현상이 발생하게 된다.
67
+ 따라서, 가급적 이들 속성의 레퍼런스를 변화시키지 않는 것이 좋다.
68
+ */
69
+ var template = html `
70
+ <ox-popup-i18n-label-input .value=${value} .languages=${languages} .confirmCallback=${confirmCallback}>
71
+ </ox-popup-i18n-label-input>
72
+ `;
73
+ this.popup = openPopup(template, {
74
+ backdrop: true,
75
+ size: 'large',
76
+ title: `${(name === null || name === void 0 ? void 0 : name.toUpperCase()) || i18next.t('title.i18n-label')} `,
77
+ help
78
+ });
79
+ }
80
+ };
81
+ OxGristEditorI18nLabel = __decorate([
82
+ customElement('ox-grist-editor-i18n-label')
83
+ ], OxGristEditorI18nLabel);
84
+ export { OxGristEditorI18nLabel };
85
+ //# sourceMappingURL=ox-grist-editor-i18n-label.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ox-grist-editor-i18n-label.js","sourceRoot":"","sources":["../../src/ox-grist-editor-i18n-label.ts"],"names":[],"mappings":"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","sourcesContent":["/**\n * @license Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport './ox-popup-i18n-label-input.js'\n\nimport { html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\nimport json5 from 'json5'\n\nimport { cloneDeep } from 'lodash-es'\n\nimport { OxGristEditor } from '@operato/data-grist'\nimport { i18next } from '@operato/i18n'\nimport { openPopup, PopupHandle } from '@operato/popup'\n\n@customElement('ox-grist-editor-i18n-label')\nexport class OxGristEditorI18nLabel extends OxGristEditor {\n private popup?: PopupHandle\n\n get options() {\n return this.column.record?.options || {}\n }\n\n get editorTemplate() {\n const { displayColumn } = this.column.record.options || {}\n\n const value =\n this.value && typeof this.value === 'object'\n ? this.value[i18next.language || 'en-US']\n : displayColumn\n ? this.record[displayColumn]\n : ''\n\n return html`<div tabindex=\"0\">${value || ''}</div>`\n }\n\n _onclick(e: Event): void {\n e.stopPropagation()\n this.openSelector()\n }\n\n _onkeydown(e: KeyboardEvent): void {\n const key = e.key\n if (key == 'Enter') {\n e.stopPropagation()\n this.openSelector()\n }\n }\n\n async openSelector() {\n if (this.popup) {\n delete this.popup\n }\n\n const { name, help, languages, objectified = false } = this.options || {}\n\n const confirmCallback = (newval: any) => {\n this.dispatchEvent(\n new CustomEvent('field-change', {\n bubbles: true,\n composed: true,\n detail: {\n before: this.value,\n after: !objectified ? JSON.stringify(newval) : newval,\n record: this.record,\n column: this.column,\n row: this.row\n }\n })\n )\n }\n\n try {\n var value: any =\n !objectified && typeof this.value === 'string' ? JSON.parse(this.value) : cloneDeep(this.value || {})\n } catch (e) {\n var value: any = {}\n }\n\n /* \n 주의 : 이 팝업 템플릿은 layout 모듈에 의해서 render 되므로, \n layout의 구성에 변화가 발생하면, 다시 render된다.\n 이 팝업이 떠 있는 상태에서, 또 다른 팝업이 뜨는 경우도 layout 구성의 변화를 야기한다. (overlay의 갯수의 증가)\n 이 경우 value, options, confirmCallback 등 클로져를 사용한 것들이 초기 바인딩된 값으로 다시 바인딩되게 되는데,\n 만약, 템플릿 내부에서 이들 속성의 레퍼런스가 변화했다면, 원래 상태로 되돌아가는 현상이 발생하게 된다.\n 따라서, 가급적 이들 속성의 레퍼런스를 변화시키지 않는 것이 좋다.\n */\n var template = html`\n <ox-popup-i18n-label-input .value=${value} .languages=${languages} .confirmCallback=${confirmCallback}>\n </ox-popup-i18n-label-input>\n `\n\n this.popup = openPopup(template, {\n backdrop: true,\n size: 'large',\n title: `${name?.toUpperCase() || i18next.t('title.i18n-label')} `,\n help\n })\n }\n}\n"]}