@operato/grist-editor 8.0.0 → 9.0.0-beta.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/CHANGELOG.md +206 -25
  2. package/dist/src/index.js +2 -2
  3. package/dist/src/index.js.map +1 -1
  4. package/dist/src/ox-grist-editor-crontab.js +9 -0
  5. package/dist/src/ox-grist-editor-crontab.js.map +1 -1
  6. package/dist/src/ox-grist-editor-duration.js +9 -0
  7. package/dist/src/ox-grist-editor-duration.js.map +1 -1
  8. package/dist/src/ox-grist-editor-hashtags.js +9 -0
  9. package/dist/src/ox-grist-editor-hashtags.js.map +1 -1
  10. package/dist/src/ox-grist-editor-i18n-label.js +9 -0
  11. package/dist/src/ox-grist-editor-i18n-label.js.map +1 -1
  12. package/dist/src/ox-grist-editor-parameters.js +9 -0
  13. package/dist/src/ox-grist-editor-parameters.js.map +1 -1
  14. package/dist/src/ox-grist-editor-partition-keys.js +9 -0
  15. package/dist/src/ox-grist-editor-partition-keys.js.map +1 -1
  16. package/dist/src/ox-grist-editor-value-map.js +9 -0
  17. package/dist/src/ox-grist-editor-value-map.js.map +1 -1
  18. package/dist/src/ox-grist-editor-value-ranges.js +9 -0
  19. package/dist/src/ox-grist-editor-value-ranges.js.map +1 -1
  20. package/dist/src/ox-grist-renderer-crontab.js +1 -1
  21. package/dist/src/ox-grist-renderer-crontab.js.map +1 -1
  22. package/dist/src/ox-parameters-builder.js +27 -0
  23. package/dist/src/ox-parameters-builder.js.map +1 -1
  24. package/dist/src/ox-popup-crontab-input.js +25 -5
  25. package/dist/src/ox-popup-crontab-input.js.map +1 -1
  26. package/dist/src/ox-popup-duration-input.js +25 -5
  27. package/dist/src/ox-popup-duration-input.js.map +1 -1
  28. package/dist/src/ox-popup-hashtags-input.js +22 -6
  29. package/dist/src/ox-popup-hashtags-input.js.map +1 -1
  30. package/dist/src/ox-popup-i18n-label-input.js +28 -6
  31. package/dist/src/ox-popup-i18n-label-input.js.map +1 -1
  32. package/dist/src/ox-popup-parameters-builder.js +43 -5
  33. package/dist/src/ox-popup-parameters-builder.js.map +1 -1
  34. package/dist/src/ox-popup-partition-keys-input.js +28 -6
  35. package/dist/src/ox-popup-partition-keys-input.js.map +1 -1
  36. package/dist/src/ox-popup-value-map-input.js +34 -6
  37. package/dist/src/ox-popup-value-map-input.js.map +1 -1
  38. package/dist/src/ox-popup-value-ranges-input.js +34 -6
  39. package/dist/src/ox-popup-value-ranges-input.js.map +1 -1
  40. package/dist/stories/ox-grist-editor-crontab.stories.js +200 -185
  41. package/dist/stories/ox-grist-editor-crontab.stories.js.map +1 -1
  42. package/dist/tsconfig.tsbuildinfo +1 -1
  43. package/package.json +18 -17
package/CHANGELOG.md CHANGED
@@ -3,7 +3,16 @@
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
- ## [8.0.0](https://github.com/hatiolab/operato/compare/v7.1.33...v8.0.0) (2025-01-14)
6
+ ## [9.0.0-beta.10](https://github.com/hatiolab/operato/compare/v9.0.0-beta.9...v9.0.0-beta.10) (2025-01-25)
7
+
8
+
9
+ ### :bug: Bug Fix
10
+
11
+ * tweak tsconfig.json ([3c424b1](https://github.com/hatiolab/operato/commit/3c424b18d046f95d5619076d113d49a4b4dc9bbb))
12
+
13
+
14
+
15
+ ## [9.0.0-beta.7](https://github.com/hatiolab/operato/compare/v9.0.0-beta.6...v9.0.0-beta.7) (2025-01-20)
7
16
 
8
17
  **Note:** Version bump only for package @operato/grist-editor
9
18
 
@@ -11,7 +20,34 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
11
20
 
12
21
 
13
22
 
14
- ### [7.1.33](https://github.com/hatiolab/operato/compare/v7.1.32...v7.1.33) (2025-01-13)
23
+ ## [9.0.0-beta.6](https://github.com/hatiolab/operato/compare/v9.0.0-beta.5...v9.0.0-beta.6) (2025-01-20)
24
+
25
+
26
+ ### :bug: Bug Fix
27
+
28
+ * esm module ([9642b97](https://github.com/hatiolab/operato/commit/9642b97650623d9ce71f6db0fd1995a2379205b5))
29
+
30
+
31
+
32
+ ## [9.0.0-beta.5](https://github.com/hatiolab/operato/compare/v9.0.0-beta.4...v9.0.0-beta.5) (2025-01-20)
33
+
34
+
35
+ ### :bug: Bug Fix
36
+
37
+ * esm module ([1319b00](https://github.com/hatiolab/operato/commit/1319b00d6955a514f63b3469fb514a28f84168a2))
38
+
39
+
40
+
41
+ ## [9.0.0-beta.4](https://github.com/hatiolab/operato/compare/v9.0.0-beta.3...v9.0.0-beta.4) (2025-01-20)
42
+
43
+
44
+ ### :bug: Bug Fix
45
+
46
+ * esm module ([0402232](https://github.com/hatiolab/operato/commit/04022327fa47eac64eaf3c56eeec55b9ace13e0e))
47
+
48
+
49
+
50
+ ## [9.0.0-beta.0](https://github.com/hatiolab/operato/compare/v8.0.0-beta.11...v9.0.0-beta.0) (2025-01-13)
15
51
 
16
52
  **Note:** Version bump only for package @operato/grist-editor
17
53
 
@@ -19,17 +55,73 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
19
55
 
20
56
 
21
57
 
22
- ### [7.1.32](https://github.com/hatiolab/operato/compare/v7.1.31...v7.1.32) (2025-01-11)
58
+ ## [8.0.0-beta.6](https://github.com/hatiolab/operato/compare/v8.0.0-beta.5...v8.0.0-beta.6) (2025-01-11)
59
+
60
+ **Note:** Version bump only for package @operato/grist-editor
61
+
62
+
63
+
64
+
65
+
66
+ ## [8.0.0-beta.5](https://github.com/hatiolab/operato/compare/v8.0.0-beta.4...v8.0.0-beta.5) (2025-01-10)
67
+
68
+ **Note:** Version bump only for package @operato/grist-editor
69
+
70
+
71
+
72
+
73
+
74
+ ## [8.0.0-beta.4](https://github.com/hatiolab/operato/compare/v8.0.0-beta.3...v8.0.0-beta.4) (2025-01-09)
75
+
76
+ **Note:** Version bump only for package @operato/grist-editor
77
+
78
+
79
+
80
+
81
+
82
+ ## [8.0.0-beta.2](https://github.com/hatiolab/operato/compare/v8.0.0-beta.1...v8.0.0-beta.2) (2025-01-08)
23
83
 
24
84
 
25
85
  ### :bug: Bug Fix
26
86
 
27
- * missing .npmignore ([03db207](https://github.com/hatiolab/operato/commit/03db207498088b294ccfb9645f6839c2f11645d5))
28
- * typo .npmignore ([df91cae](https://github.com/hatiolab/operato/commit/df91caea0f5938a3febd9307184e5b036a65e2bd))
87
+ * typo .npmignore ([d9c0c8c](https://github.com/hatiolab/operato/commit/d9c0c8c79abc688c3c2cfb6c37fcb689483a5977))
88
+
89
+
90
+
91
+ ## [8.0.0-beta.1](https://github.com/hatiolab/operato/compare/v8.0.0-beta.0...v8.0.0-beta.1) (2025-01-08)
92
+
93
+
94
+ ### :bug: Bug Fix
95
+
96
+ * missing .npmignore ([be05985](https://github.com/hatiolab/operato/commit/be05985abfae4af53501f718dd52932099f7fbcb))
97
+
98
+
99
+
100
+ ## [8.0.0-beta.0](https://github.com/hatiolab/operato/compare/v8.0.0-alpha.56...v8.0.0-beta.0) (2025-01-07)
101
+
102
+ **Note:** Version bump only for package @operato/grist-editor
103
+
104
+
105
+
106
+
107
+
108
+ ## [8.0.0-alpha.54](https://github.com/hatiolab/operato/compare/v8.0.0-alpha.53...v8.0.0-alpha.54) (2024-12-09)
109
+
110
+ **Note:** Version bump only for package @operato/grist-editor
111
+
112
+
113
+
114
+
115
+
116
+ ## [8.0.0-alpha.52](https://github.com/hatiolab/operato/compare/v8.0.0-alpha.51...v8.0.0-alpha.52) (2024-12-03)
117
+
118
+ **Note:** Version bump only for package @operato/grist-editor
119
+
120
+
29
121
 
30
122
 
31
123
 
32
- ### [7.1.31](https://github.com/hatiolab/operato/compare/v7.1.30...v7.1.31) (2025-01-10)
124
+ ## [8.0.0-alpha.51](https://github.com/hatiolab/operato/compare/v8.0.0-alpha.50...v8.0.0-alpha.51) (2024-11-29)
33
125
 
34
126
  **Note:** Version bump only for package @operato/grist-editor
35
127
 
@@ -37,7 +129,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
37
129
 
38
130
 
39
131
 
40
- ### [7.1.30](https://github.com/hatiolab/operato/compare/v7.1.29...v7.1.30) (2025-01-10)
132
+ ## [8.0.0-alpha.50](https://github.com/hatiolab/operato/compare/v8.0.0-alpha.49...v8.0.0-alpha.50) (2024-11-16)
41
133
 
42
134
  **Note:** Version bump only for package @operato/grist-editor
43
135
 
@@ -45,7 +137,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
45
137
 
46
138
 
47
139
 
48
- ### [7.1.28](https://github.com/hatiolab/operato/compare/v7.1.27...v7.1.28) (2024-12-09)
140
+ ## [8.0.0-alpha.49](https://github.com/hatiolab/operato/compare/v8.0.0-alpha.48...v8.0.0-alpha.49) (2024-11-13)
49
141
 
50
142
  **Note:** Version bump only for package @operato/grist-editor
51
143
 
@@ -53,7 +145,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
53
145
 
54
146
 
55
147
 
56
- ### [7.1.27](https://github.com/hatiolab/operato/compare/v7.1.26...v7.1.27) (2024-12-09)
148
+ ## [8.0.0-alpha.48](https://github.com/hatiolab/operato/compare/v8.0.0-alpha.47...v8.0.0-alpha.48) (2024-11-13)
57
149
 
58
150
  **Note:** Version bump only for package @operato/grist-editor
59
151
 
@@ -61,7 +153,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
61
153
 
62
154
 
63
155
 
64
- ### [7.1.26](https://github.com/hatiolab/operato/compare/v7.1.25...v7.1.26) (2024-11-28)
156
+ ## [8.0.0-alpha.46](https://github.com/hatiolab/operato/compare/v8.0.0-alpha.45...v8.0.0-alpha.46) (2024-10-23)
65
157
 
66
158
  **Note:** Version bump only for package @operato/grist-editor
67
159
 
@@ -69,7 +161,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
69
161
 
70
162
 
71
163
 
72
- ### [7.1.25](https://github.com/hatiolab/operato/compare/v7.1.24...v7.1.25) (2024-11-23)
164
+ ## [8.0.0-alpha.45](https://github.com/hatiolab/operato/compare/v8.0.0-alpha.44...v8.0.0-alpha.45) (2024-10-23)
73
165
 
74
166
  **Note:** Version bump only for package @operato/grist-editor
75
167
 
@@ -77,7 +169,16 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
77
169
 
78
170
 
79
171
 
80
- ### [7.1.21](https://github.com/hatiolab/operato/compare/v7.1.20...v7.1.21) (2024-11-13)
172
+ ## [8.0.0-alpha.44](https://github.com/hatiolab/operato/compare/v8.0.0-alpha.43...v8.0.0-alpha.44) (2024-10-23)
173
+
174
+
175
+ ### :bug: Bug Fix
176
+
177
+ * remove useless error messages ([496621d](https://github.com/hatiolab/operato/commit/496621dddcf114a35f5d4a543a564bfa8dc0bbbc))
178
+
179
+
180
+
181
+ ## [8.0.0-alpha.41](https://github.com/hatiolab/operato/compare/v8.0.0-alpha.40...v8.0.0-alpha.41) (2024-10-21)
81
182
 
82
183
  **Note:** Version bump only for package @operato/grist-editor
83
184
 
@@ -85,16 +186,24 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
85
186
 
86
187
 
87
188
 
88
- ### [7.1.18](https://github.com/hatiolab/operato/compare/v7.1.17...v7.1.18) (2024-10-31)
189
+ ## [8.0.0-alpha.37](https://github.com/hatiolab/operato/compare/v8.0.0-alpha.36...v8.0.0-alpha.37) (2024-10-20)
89
190
 
90
191
 
91
192
  ### :bug: Bug Fix
92
193
 
93
- * remove useless error messages ([2d3443e](https://github.com/hatiolab/operato/commit/2d3443e4a271863d8793d457beb0fd6a99675f4c))
194
+ * update dev-dependencies version ([d6fe342](https://github.com/hatiolab/operato/commit/d6fe342de738c6bad3528550a862b5a1d2573161))
195
+
196
+
197
+
198
+ ## [8.0.0-alpha.34](https://github.com/hatiolab/operato/compare/v8.0.0-alpha.33...v8.0.0-alpha.34) (2024-10-15)
199
+
200
+ **Note:** Version bump only for package @operato/grist-editor
201
+
94
202
 
95
203
 
96
204
 
97
- ### [7.1.13](https://github.com/hatiolab/operato/compare/v7.1.12...v7.1.13) (2024-09-23)
205
+
206
+ ## [8.0.0-alpha.33](https://github.com/hatiolab/operato/compare/v8.0.0-alpha.32...v8.0.0-alpha.33) (2024-10-14)
98
207
 
99
208
  **Note:** Version bump only for package @operato/grist-editor
100
209
 
@@ -102,7 +211,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
102
211
 
103
212
 
104
213
 
105
- ### [7.1.10](https://github.com/hatiolab/operato/compare/v7.1.9...v7.1.10) (2024-09-15)
214
+ ## [8.0.0-alpha.30](https://github.com/hatiolab/operato/compare/v8.0.0-alpha.29...v8.0.0-alpha.30) (2024-10-11)
106
215
 
107
216
  **Note:** Version bump only for package @operato/grist-editor
108
217
 
@@ -110,7 +219,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
110
219
 
111
220
 
112
221
 
113
- ### [7.1.9](https://github.com/hatiolab/operato/compare/v7.1.8...v7.1.9) (2024-09-12)
222
+ ## [8.0.0-alpha.29](https://github.com/hatiolab/operato/compare/v8.0.0-alpha.28...v8.0.0-alpha.29) (2024-10-10)
114
223
 
115
224
  **Note:** Version bump only for package @operato/grist-editor
116
225
 
@@ -118,7 +227,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
118
227
 
119
228
 
120
229
 
121
- ### [7.1.8](https://github.com/hatiolab/operato/compare/v7.1.7...v7.1.8) (2024-09-12)
230
+ ## [8.0.0-alpha.27](https://github.com/hatiolab/operato/compare/v8.0.0-alpha.26...v8.0.0-alpha.27) (2024-10-06)
122
231
 
123
232
  **Note:** Version bump only for package @operato/grist-editor
124
233
 
@@ -126,7 +235,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
126
235
 
127
236
 
128
237
 
129
- ### [7.1.7](https://github.com/hatiolab/operato/compare/v7.1.6...v7.1.7) (2024-09-12)
238
+ ## [8.0.0-alpha.26](https://github.com/hatiolab/operato/compare/v8.0.0-alpha.25...v8.0.0-alpha.26) (2024-10-06)
130
239
 
131
240
  **Note:** Version bump only for package @operato/grist-editor
132
241
 
@@ -134,25 +243,97 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
134
243
 
135
244
 
136
245
 
137
- ### [7.1.6](https://github.com/hatiolab/operato/compare/v7.1.5...v7.1.6) (2024-09-07)
246
+ ## [8.0.0-alpha.21](https://github.com/hatiolab/operato/compare/v8.0.0-alpha.20...v8.0.0-alpha.21) (2024-10-05)
247
+
248
+ **Note:** Version bump only for package @operato/grist-editor
249
+
250
+
251
+
252
+
253
+
254
+ ## [8.0.0-alpha.20](https://github.com/hatiolab/operato/compare/v8.0.0-alpha.19...v8.0.0-alpha.20) (2024-10-04)
255
+
256
+ **Note:** Version bump only for package @operato/grist-editor
257
+
258
+
259
+
260
+
261
+
262
+ ## [8.0.0-alpha.19](https://github.com/hatiolab/operato/compare/v8.0.0-alpha.18...v8.0.0-alpha.19) (2024-10-04)
263
+
264
+ **Note:** Version bump only for package @operato/grist-editor
265
+
266
+
267
+
268
+
269
+
270
+ ## [8.0.0-alpha.10](https://github.com/hatiolab/operato/compare/v8.0.0-alpha.9...v8.0.0-alpha.10) (2024-09-18)
271
+
272
+ **Note:** Version bump only for package @operato/grist-editor
273
+
274
+
275
+
276
+
277
+
278
+ ## [8.0.0-alpha.9](https://github.com/hatiolab/operato/compare/v8.0.0-alpha.8...v8.0.0-alpha.9) (2024-09-15)
279
+
280
+ **Note:** Version bump only for package @operato/grist-editor
281
+
282
+
283
+
284
+
285
+
286
+ ## [8.0.0-alpha.8](https://github.com/hatiolab/operato/compare/v8.0.0-alpha.7...v8.0.0-alpha.8) (2024-09-15)
287
+
288
+ **Note:** Version bump only for package @operato/grist-editor
289
+
290
+
291
+
292
+
293
+
294
+ ## [8.0.0-alpha.6](https://github.com/hatiolab/operato/compare/v8.0.0-alpha.5...v8.0.0-alpha.6) (2024-09-14)
295
+
296
+ **Note:** Version bump only for package @operato/grist-editor
297
+
298
+
299
+
300
+
301
+
302
+ ## [8.0.0-alpha.5](https://github.com/hatiolab/operato/compare/v8.0.0-alpha.4...v8.0.0-alpha.5) (2024-09-12)
303
+
304
+ **Note:** Version bump only for package @operato/grist-editor
305
+
306
+
307
+
308
+
309
+
310
+ ## [8.0.0-alpha.4](https://github.com/hatiolab/operato/compare/v8.0.0-alpha.3...v8.0.0-alpha.4) (2024-09-07)
138
311
 
139
312
 
140
313
  ### :bug: Bug Fix
141
314
 
142
- * dataset components & styles ([d6836bd](https://github.com/hatiolab/operato/commit/d6836bd1c400962453dec31ab6e6055e4110900b))
315
+ * dataset components & styles ([be44acd](https://github.com/hatiolab/operato/commit/be44acde8f25980e5b27afc481a2c149f8c23dbd))
143
316
 
144
317
 
145
318
 
146
- ### [7.1.4](https://github.com/hatiolab/operato/compare/v7.1.3...v7.1.4) (2024-09-06)
319
+ ## [8.0.0-alpha.3](https://github.com/hatiolab/operato/compare/v8.0.0-alpha.2...v8.0.0-alpha.3) (2024-09-06)
147
320
 
148
321
 
149
322
  ### :bug: Bug Fix
150
323
 
151
- * add ox-grist-editor/renderer-signature for dataset signature item ([6e31dc6](https://github.com/hatiolab/operato/commit/6e31dc68c04812182e192f82f810a33fab5ae6a4))
324
+ * add ox-grist-editor/renderer-signature for dataset signature item ([b5dda5e](https://github.com/hatiolab/operato/commit/b5dda5ebe0afc8c9a3af73d9475bba160893155a))
325
+
326
+
327
+
328
+ ## [8.0.0-alpha.2](https://github.com/hatiolab/operato/compare/v8.0.0-alpha.1...v8.0.0-alpha.2) (2024-09-05)
329
+
330
+ **Note:** Version bump only for package @operato/grist-editor
331
+
332
+
152
333
 
153
334
 
154
335
 
155
- ### [7.1.3](https://github.com/hatiolab/operato/compare/v7.1.2...v7.1.3) (2024-09-04)
336
+ ## [8.0.0-alpha.1](https://github.com/hatiolab/operato/compare/v8.0.0-alpha.0...v8.0.0-alpha.1) (2024-09-04)
156
337
 
157
338
  **Note:** Version bump only for package @operato/grist-editor
158
339
 
@@ -160,7 +341,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
160
341
 
161
342
 
162
343
 
163
- ### [7.1.2](https://github.com/hatiolab/operato/compare/v7.1.1...v7.1.2) (2024-09-02)
344
+ ## [8.0.0-alpha.0](https://github.com/hatiolab/operato/compare/v7.1.1...v8.0.0-alpha.0) (2024-09-01)
164
345
 
165
346
  **Note:** Version bump only for package @operato/grist-editor
166
347
 
package/dist/src/index.js CHANGED
@@ -7,8 +7,8 @@ import { OxGristEditorPartitionKeys } from './ox-grist-editor-partition-keys.js'
7
7
  import { OxGristEditorQuantifier } from './ox-grist-editor-quantifier.js';
8
8
  import { OxGristEditorValueMap } from './ox-grist-editor-value-map.js';
9
9
  import { OxGristRendererDuration } from './ox-grist-renderer-duration.js';
10
- import { OxGristRendererQuantifier } from './ox-grist-renderer-quantifier';
11
- import { OxGristRendererHashtags } from './ox-grist-renderer-hashtags';
10
+ import { OxGristRendererQuantifier } from './ox-grist-renderer-quantifier.js';
11
+ import { OxGristRendererHashtags } from './ox-grist-renderer-hashtags.js';
12
12
  import { OxGristRendererPartitionKeys } from './ox-grist-renderer-partition-keys.js';
13
13
  import { OxGristEditorValueRanges } from './ox-grist-editor-value-ranges.js';
14
14
  import { OxGristEditorI18nLabel } from './ox-grist-editor-i18n-label.js';
@@ -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,E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A4B,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;AACxD,gBAAgB,CAAC,WAAW,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'\nimport { OxGristRendererSignature } from './ox-grist-renderer-signature.js'\nimport { OxGristEditorSignature } from './ox-grist-editor-signature.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)\nregisterEditor('signature', OxGristEditorSignature)\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)\nregisterRenderer('signature', OxGristRendererSignature)\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,mCAAmC,CAAA;AAC7E,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAA;AACzE,OAAO,EAAE,4BAA4B,EAAE,MAAM,uCAAuC,CAAA;AACpF,OAAO,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAA;AAC5E,OAAO,EAAE,sBAAsB,EAAE,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@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.js'\nimport { OxGristRendererHashtags } from './ox-grist-renderer-hashtags.js'\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'\nimport { OxGristRendererSignature } from './ox-grist-renderer-signature.js'\nimport { OxGristEditorSignature } from './ox-grist-editor-signature.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)\nregisterEditor('signature', OxGristEditorSignature)\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)\nregisterRenderer('signature', OxGristRendererSignature)\n"]}
@@ -6,6 +6,15 @@ import { OxGristEditor } from '@operato/data-grist';
6
6
  import { i18next } from '@operato/i18n';
7
7
  import { openPopup } from '@operato/popup';
8
8
  let OxGristEditorCrontab = class OxGristEditorCrontab extends OxGristEditor {
9
+ constructor() {
10
+ super(...arguments);
11
+ Object.defineProperty(this, "popup", {
12
+ enumerable: true,
13
+ configurable: true,
14
+ writable: true,
15
+ value: void 0
16
+ });
17
+ }
9
18
  get editorTemplate() {
10
19
  return html ` <div tabindex="0">${this.value || ''}</div> `;
11
20
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ox-grist-editor-crontab.js","sourceRoot":"","sources":["../../src/ox-grist-editor-crontab.ts"],"names":[],"mappings":";AAAA,OAAO,6BAA6B,CAAA;AAEpC,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEjD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,SAAS,EAAe,MAAM,gBAAgB,CAAA;AAGhD,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,aAAa;IAGrD,IAAI,cAAc;QAChB,OAAO,IAAI,CAAA,sBAAsB,IAAI,CAAC,KAAK,IAAI,EAAE,SAAS,CAAA;IAC5D,CAAC;IAED,QAAQ,CAAC,CAAQ;QACf,CAAC,CAAC,eAAe,EAAE,CAAA;QACnB,IAAI,CAAC,eAAe,EAAE,CAAA;IACxB,CAAC;IAED,UAAU,CAAC,CAAgB;QACzB,MAAM,GAAG,GAAG,CAAC,CAAC,GAAG,CAAA;QACjB,IAAI,GAAG,IAAI,OAAO,EAAE,CAAC;YACnB,CAAC,CAAC,eAAe,EAAE,CAAA;YACnB,IAAI,CAAC,eAAe,EAAE,CAAA;QACxB,CAAC;IACH,CAAC;IAED,eAAe;QACb,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,OAAO,IAAI,CAAC,KAAK,CAAA;QACnB,CAAC;QAED,MAAM,eAAe,GAAG,CAAC,MAAW,EAAE,EAAE;YACtC,IAAI,CAAC,aAAa,CAChB,IAAI,WAAW,CAAC,cAAc,EAAE;gBAC9B,OAAO,EAAE,IAAI;gBACb,QAAQ,EAAE,IAAI;gBACd,MAAM,EAAE;oBACN,MAAM,EAAE,IAAI,CAAC,KAAK;oBAClB,KAAK,EAAE,MAAM;oBACb,MAAM,EAAE,IAAI,CAAC,MAAM;oBACnB,MAAM,EAAE,IAAI,CAAC,MAAM;oBACnB,GAAG,EAAE,IAAI,CAAC,GAAG;iBACd;aACF,CAAC,CACH,CAAA;QACH,CAAC,CAAA;QAED,IAAI,CAAC,KAAK,GAAG,SAAS,CACpB,IAAI,CAAA;yCAC+B,IAAI,CAAC,KAAK,qBAAqB,eAAe;OAChF,EACD;YACE,QAAQ,EAAE,IAAI;YACd,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,wBAAwB,CAAC;YAC1C,IAAI,EAAE,iCAAiC;SACxC,CACF,CAAA;IACH,CAAC;CACF,CAAA;AApDY,oBAAoB;IADhC,aAAa,CAAC,yBAAyB,CAAC;GAC5B,oBAAoB,CAoDhC","sourcesContent":["import './ox-popup-crontab-input.js'\n\nimport { html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\nimport { OxGristEditor } from '@operato/data-grist'\nimport { i18next } from '@operato/i18n'\nimport { openPopup, PopupHandle } from '@operato/popup'\n\n@customElement('ox-grist-editor-crontab')\nexport class OxGristEditorCrontab extends OxGristEditor {\n private popup?: PopupHandle\n\n get editorTemplate() {\n return html` <div tabindex=\"0\">${this.value || ''}</div> `\n }\n\n _onclick(e: Event): void {\n e.stopPropagation()\n this.showEditorPopup()\n }\n\n _onkeydown(e: KeyboardEvent): void {\n const key = e.key\n if (key == 'Enter') {\n e.stopPropagation()\n this.showEditorPopup()\n }\n }\n\n showEditorPopup() {\n if (this.popup) {\n delete this.popup\n }\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: newval,\n record: this.record,\n column: this.column,\n row: this.row\n }\n })\n )\n }\n\n this.popup = openPopup(\n html`\n <ox-popup-crontab-input .value=${this.value} .confirmCallback=${confirmCallback}></ox-popup-crontab-input>\n `,\n {\n backdrop: true,\n title: i18next.t('title.setting schedule'),\n help: 'data-grist/grist-editor/crontab'\n }\n )\n }\n}\n"]}
1
+ {"version":3,"file":"ox-grist-editor-crontab.js","sourceRoot":"","sources":["../../src/ox-grist-editor-crontab.ts"],"names":[],"mappings":";AAAA,OAAO,6BAA6B,CAAA;AAEpC,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEjD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,SAAS,EAAe,MAAM,gBAAgB,CAAA;AAGhD,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,aAAa;IAAhD;;QACG;;;;;WAAmB;IAmD7B,CAAC;IAjDC,IAAI,cAAc;QAChB,OAAO,IAAI,CAAA,sBAAsB,IAAI,CAAC,KAAK,IAAI,EAAE,SAAS,CAAA;IAC5D,CAAC;IAED,QAAQ,CAAC,CAAQ;QACf,CAAC,CAAC,eAAe,EAAE,CAAA;QACnB,IAAI,CAAC,eAAe,EAAE,CAAA;IACxB,CAAC;IAED,UAAU,CAAC,CAAgB;QACzB,MAAM,GAAG,GAAG,CAAC,CAAC,GAAG,CAAA;QACjB,IAAI,GAAG,IAAI,OAAO,EAAE,CAAC;YACnB,CAAC,CAAC,eAAe,EAAE,CAAA;YACnB,IAAI,CAAC,eAAe,EAAE,CAAA;QACxB,CAAC;IACH,CAAC;IAED,eAAe;QACb,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,OAAO,IAAI,CAAC,KAAK,CAAA;QACnB,CAAC;QAED,MAAM,eAAe,GAAG,CAAC,MAAW,EAAE,EAAE;YACtC,IAAI,CAAC,aAAa,CAChB,IAAI,WAAW,CAAC,cAAc,EAAE;gBAC9B,OAAO,EAAE,IAAI;gBACb,QAAQ,EAAE,IAAI;gBACd,MAAM,EAAE;oBACN,MAAM,EAAE,IAAI,CAAC,KAAK;oBAClB,KAAK,EAAE,MAAM;oBACb,MAAM,EAAE,IAAI,CAAC,MAAM;oBACnB,MAAM,EAAE,IAAI,CAAC,MAAM;oBACnB,GAAG,EAAE,IAAI,CAAC,GAAG;iBACd;aACF,CAAC,CACH,CAAA;QACH,CAAC,CAAA;QAED,IAAI,CAAC,KAAK,GAAG,SAAS,CACpB,IAAI,CAAA;yCAC+B,IAAI,CAAC,KAAK,qBAAqB,eAAe;OAChF,EACD;YACE,QAAQ,EAAE,IAAI;YACd,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,wBAAwB,CAAC;YAC1C,IAAI,EAAE,iCAAiC;SACxC,CACF,CAAA;IACH,CAAC;CACF,CAAA;AApDY,oBAAoB;IADhC,aAAa,CAAC,yBAAyB,CAAC;GAC5B,oBAAoB,CAoDhC","sourcesContent":["import './ox-popup-crontab-input.js'\n\nimport { html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\nimport { OxGristEditor } from '@operato/data-grist'\nimport { i18next } from '@operato/i18n'\nimport { openPopup, PopupHandle } from '@operato/popup'\n\n@customElement('ox-grist-editor-crontab')\nexport class OxGristEditorCrontab extends OxGristEditor {\n private popup?: PopupHandle\n\n get editorTemplate() {\n return html` <div tabindex=\"0\">${this.value || ''}</div> `\n }\n\n _onclick(e: Event): void {\n e.stopPropagation()\n this.showEditorPopup()\n }\n\n _onkeydown(e: KeyboardEvent): void {\n const key = e.key\n if (key == 'Enter') {\n e.stopPropagation()\n this.showEditorPopup()\n }\n }\n\n showEditorPopup() {\n if (this.popup) {\n delete this.popup\n }\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: newval,\n record: this.record,\n column: this.column,\n row: this.row\n }\n })\n )\n }\n\n this.popup = openPopup(\n html`\n <ox-popup-crontab-input .value=${this.value} .confirmCallback=${confirmCallback}></ox-popup-crontab-input>\n `,\n {\n backdrop: true,\n title: i18next.t('title.setting schedule'),\n help: 'data-grist/grist-editor/crontab'\n }\n )\n }\n}\n"]}
@@ -6,6 +6,15 @@ import { OxGristEditor } from '@operato/data-grist';
6
6
  import { i18next } from '@operato/i18n';
7
7
  import { openPopup } from '@operato/popup';
8
8
  let OxGristEditorDuration = class OxGristEditorDuration extends OxGristEditor {
9
+ constructor() {
10
+ super(...arguments);
11
+ Object.defineProperty(this, "popup", {
12
+ enumerable: true,
13
+ configurable: true,
14
+ writable: true,
15
+ value: void 0
16
+ });
17
+ }
9
18
  get editorTemplate() {
10
19
  return html ` <div tabindex="0">${this.value || ''}</div> `;
11
20
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ox-grist-editor-duration.js","sourceRoot":"","sources":["../../src/ox-grist-editor-duration.ts"],"names":[],"mappings":";AAAA,OAAO,8BAA8B,CAAA;AAErC,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEjD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,SAAS,EAAe,MAAM,gBAAgB,CAAA;AAGhD,IAAM,qBAAqB,GAA3B,MAAM,qBAAsB,SAAQ,aAAa;IAGtD,IAAI,cAAc;QAChB,OAAO,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\n\nimport { html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\nimport { OxGristEditor } from '@operato/data-grist'\nimport { i18next } from '@operato/i18n'\nimport { openPopup, PopupHandle } from '@operato/popup'\n\n@customElement('ox-grist-editor-duration')\nexport class OxGristEditorDuration extends OxGristEditor {\n private popup?: PopupHandle\n\n get editorTemplate() {\n return html` <div tabindex=\"0\">${this.value || ''}</div> `\n }\n\n _onclick(e: Event): void {\n e.stopPropagation()\n this.showEditorPopup()\n }\n\n _onkeydown(e: KeyboardEvent): void {\n const key = e.key\n if (key == 'Enter') {\n e.stopPropagation()\n this.showEditorPopup()\n }\n }\n\n showEditorPopup() {\n if (this.popup) {\n delete this.popup\n }\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: newval,\n record: this.record,\n column: this.column,\n row: this.row\n }\n })\n )\n }\n\n this.popup = openPopup(\n html`\n <ox-popup-duration-input .value=${this.value} .confirmCallback=${confirmCallback}></ox-popup-duration-input>\n `,\n {\n backdrop: true,\n title: i18next.t('title.edit duration'),\n help: 'data-grist/grist-editor/duration'\n }\n )\n }\n}\n"]}
1
+ {"version":3,"file":"ox-grist-editor-duration.js","sourceRoot":"","sources":["../../src/ox-grist-editor-duration.ts"],"names":[],"mappings":";AAAA,OAAO,8BAA8B,CAAA;AAErC,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEjD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,SAAS,EAAe,MAAM,gBAAgB,CAAA;AAGhD,IAAM,qBAAqB,GAA3B,MAAM,qBAAsB,SAAQ,aAAa;IAAjD;;QACG;;;;;WAAmB;IAmD7B,CAAC;IAjDC,IAAI,cAAc;QAChB,OA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.js'\n\nimport { html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\nimport { OxGristEditor } from '@operato/data-grist'\nimport { i18next } from '@operato/i18n'\nimport { openPopup, PopupHandle } from '@operato/popup'\n\n@customElement('ox-grist-editor-duration')\nexport class OxGristEditorDuration extends OxGristEditor {\n private popup?: PopupHandle\n\n get editorTemplate() {\n return html` <div tabindex=\"0\">${this.value || ''}</div> `\n }\n\n _onclick(e: Event): void {\n e.stopPropagation()\n this.showEditorPopup()\n }\n\n _onkeydown(e: KeyboardEvent): void {\n const key = e.key\n if (key == 'Enter') {\n e.stopPropagation()\n this.showEditorPopup()\n }\n }\n\n showEditorPopup() {\n if (this.popup) {\n delete this.popup\n }\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: newval,\n record: this.record,\n column: this.column,\n row: this.row\n }\n })\n )\n }\n\n this.popup = openPopup(\n html`\n <ox-popup-duration-input .value=${this.value} .confirmCallback=${confirmCallback}></ox-popup-duration-input>\n `,\n {\n backdrop: true,\n title: i18next.t('title.edit duration'),\n help: 'data-grist/grist-editor/duration'\n }\n )\n }\n}\n"]}
@@ -6,6 +6,15 @@ import { OxGristEditor } from '@operato/data-grist';
6
6
  import { i18next } from '@operato/i18n';
7
7
  import { openPopup } from '@operato/popup';
8
8
  let OxGristEditorHashtags = class OxGristEditorHashtags extends OxGristEditor {
9
+ constructor() {
10
+ super(...arguments);
11
+ Object.defineProperty(this, "popup", {
12
+ enumerable: true,
13
+ configurable: true,
14
+ writable: true,
15
+ value: void 0
16
+ });
17
+ }
9
18
  get editorTemplate() {
10
19
  const value = this.value;
11
20
  return html `
@@ -1 +1 @@
1
- {"version":3,"file":"ox-grist-editor-hashtags.js","sourceRoot":"","sources":["../../src/ox-grist-editor-hashtags.ts"],"names":[],"mappings":";AAAA,OAAO,8BAA8B,CAAA;AAErC,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,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AAE,MAAM;oBACb,MAAM,EAAE,IAAI,CAAC,MAAM;oBACnB,MAAM,EAAE,IAAI,CAAC,MAAM;oBACnB,GAAG,EAAE,IAAI,CAAC,GAAG;iBACd;aACF,CAAC,CACH,CAAA;QACH,CAAC,CAAA;QAED,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;QAE9D,IAAI,CAAC,KAAK,GAAG,SAAS,CACpB,IAAI,CAAA,oCAAoC,KAAK,qBAAqB,eAAe,8BAA8B,EAC/G;YACE,QAAQ,EAAE,IAAI;YACd,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,qBAAqB,CAAC;SACxC,CACF,CAAA;IACH,CAAC;CACF,CAAA;AAzDY,qBAAqB;IADjC,aAAa,CAAC,0BAA0B,CAAC;GAC7B,qBAAqB,CAyDjC","sourcesContent":["import './ox-popup-hashtags-input.js'\n\nimport { html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\nimport { OxGristEditor } from '@operato/data-grist'\nimport { i18next } from '@operato/i18n'\nimport { openPopup, PopupHandle } from '@operato/popup'\n\n@customElement('ox-grist-editor-hashtags')\nexport class OxGristEditorHashtags extends OxGristEditor {\n private popup?: PopupHandle\n\n get editorTemplate() {\n const value = this.value\n\n return html`\n <div tabindex=\"0\">\n ${value && value.length > 0 ? (value as string[]).map(x => `#${x}`).join(' ') : '\\u00A0' /* &nbsp; */}\n </div>\n `\n }\n\n _onclick(e: Event): void {\n e.stopPropagation()\n this.showEditorPopup()\n }\n\n _onkeydown(e: KeyboardEvent): void {\n const key = e.key\n if (key == 'Enter') {\n e.stopPropagation()\n this.showEditorPopup()\n }\n }\n\n showEditorPopup() {\n if (this.popup) {\n delete this.popup\n }\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: newval,\n record: this.record,\n column: this.column,\n row: this.row\n }\n })\n )\n }\n\n const value = Array.isArray(this.value) ? [...this.value] : []\n\n this.popup = openPopup(\n html` <ox-popup-hashtags-input .value=${value} .confirmCallback=${confirmCallback}></ox-popup-hashtags-input> `,\n {\n backdrop: true,\n title: i18next.t('title.edit hashtags')\n }\n )\n }\n}\n"]}
1
+ {"version":3,"file":"ox-grist-editor-hashtags.js","sourceRoot":"","sources":["../../src/ox-grist-editor-hashtags.ts"],"names":[],"mappings":";AAAA,OAAO,8BAA8B,CAAA;AAErC,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEjD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,SAAS,EAAe,MAAM,gBAAgB,CAAA;AAGhD,IAAM,qBAAqB,GAA3B,MAAM,qBAAsB,SAAQ,aAAa;IAAjD;;QACG;;;;;WAAmB;IAwD7B,CAAC;IAtDC,IAAI,cAAc;QAChB,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAA;QAExB,OAAO,IAAI,CAAA;;UAEL,KAAK,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAE,KAAkB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,YAAY;;KAExG,CAAA;IACH,CAAC;IAED,QAAQ,CAAC,CAAQ;QACf,CAAC,CAAC,eAAe,EAAE,CAAA;QACnB,IAAI,CAAC,eAAe,EAAE,CAAA;IACxB,CAAC;IAED,UAAU,CAAC,CAAgB;QACzB,MAAM,GAAG,GAAG,CAAC,CAAC,GAAG,CAAA;QACjB,IAAI,GAAG,IAAI,OAAO,EAAE,CAAC;YACnB,CAAC,CAAC,eAAe,EAAE,CAAA;YACnB,IAAI,CAAC,eAAe,EAAE,CAAA;QACxB,CAAC;IACH,CAAC;IAED,eAAe;QACb,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,OAAO,IAAI,CAAC,KAAK,CAAA;QACnB,CAAC;QAED,MAAM,eAAe,GAAG,CAAC,MAAW,EAAE,EAAE;YACtC,IAAI,CAAC,aAAa,CAChB,IAAI,WAAW,CAAC,cAAc,EAAE;gBAC9B,OAAO,EAAE,IAAI;gBACb,QAAQ,EAAE,IAAI;gBACd,MAAM,EAAE;oBACN,MAAM,EAAE,IAAI,CAAC,KAAK;oBAClB,KAAK,EAAE,MAAM;oBACb,MAAM,EAAE,IAAI,CAAC,MAAM;oBACnB,MAAM,EAAE,IAAI,CAAC,MAAM;oBACnB,GAAG,EAAE,IAAI,CAAC,GAAG;iBACd;aACF,CAAC,CACH,CAAA;QACH,CAAC,CAAA;QAED,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;QAE9D,IAAI,CAAC,KAAK,GAAG,SAAS,CACpB,IAAI,CAAA,oCAAoC,KAAK,qBAAqB,eAAe,8BAA8B,EAC/G;YACE,QAAQ,EAAE,IAAI;YACd,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,qBAAqB,CAAC;SACxC,CACF,CAAA;IACH,CAAC;CACF,CAAA;AAzDY,qBAAqB;IADjC,aAAa,CAAC,0BAA0B,CAAC;GAC7B,qBAAqB,CAyDjC","sourcesContent":["import './ox-popup-hashtags-input.js'\n\nimport { html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\nimport { OxGristEditor } from '@operato/data-grist'\nimport { i18next } from '@operato/i18n'\nimport { openPopup, PopupHandle } from '@operato/popup'\n\n@customElement('ox-grist-editor-hashtags')\nexport class OxGristEditorHashtags extends OxGristEditor {\n private popup?: PopupHandle\n\n get editorTemplate() {\n const value = this.value\n\n return html`\n <div tabindex=\"0\">\n ${value && value.length > 0 ? (value as string[]).map(x => `#${x}`).join(' ') : '\\u00A0' /* &nbsp; */}\n </div>\n `\n }\n\n _onclick(e: Event): void {\n e.stopPropagation()\n this.showEditorPopup()\n }\n\n _onkeydown(e: KeyboardEvent): void {\n const key = e.key\n if (key == 'Enter') {\n e.stopPropagation()\n this.showEditorPopup()\n }\n }\n\n showEditorPopup() {\n if (this.popup) {\n delete this.popup\n }\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: newval,\n record: this.record,\n column: this.column,\n row: this.row\n }\n })\n )\n }\n\n const value = Array.isArray(this.value) ? [...this.value] : []\n\n this.popup = openPopup(\n html` <ox-popup-hashtags-input .value=${value} .confirmCallback=${confirmCallback}></ox-popup-hashtags-input> `,\n {\n backdrop: true,\n title: i18next.t('title.edit hashtags')\n }\n )\n }\n}\n"]}
@@ -10,6 +10,15 @@ import { OxGristEditor } from '@operato/data-grist';
10
10
  import { i18next } from '@operato/i18n';
11
11
  import { openPopup } from '@operato/popup';
12
12
  let OxGristEditorI18nLabel = class OxGristEditorI18nLabel extends OxGristEditor {
13
+ constructor() {
14
+ super(...arguments);
15
+ Object.defineProperty(this, "popup", {
16
+ enumerable: true,
17
+ configurable: true,
18
+ writable: true,
19
+ value: void 0
20
+ });
21
+ }
13
22
  get options() {
14
23
  var _a;
15
24
  return ((_a = this.column.record) === null || _a === void 0 ? void 0 : _a.options) || {};
@@ -1 +1 @@
1
- {"version":3,"file":"ox-grist-editor-i18n-label.js","sourceRoot":"","sources":["../../src/ox-grist-editor-i18n-label.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,OAAO,gCAAgC,CAAA;AAEvC,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;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,EAAE,GAAG,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,WAAW,EAAE,KAAI,OAAO,CAAC,CAAC,CAAC,kBAAkB,CAAC,GAAG;YACjE,IAAI;SACL,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAnFY,sBAAsB;IADlC,aAAa,CAAC,4BAA4B,CAAC;GAC/B,sBAAsB,CAmFlC","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"]}
1
+ {"version":3,"file":"ox-grist-editor-i18n-label.js","sourceRoot":"","sources":["../../src/ox-grist-editor-i18n-label.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,OAAO,gCAAgC,CAAA;AAEvC,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAGjD,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAErC,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,SAAS,EAAe,MAAM,gBAAgB,CAAA;AAGhD,IAAM,sBAAsB,GAA5B,MAAM,sBAAuB,SAAQ,aAAa;IAAlD;;QACG;;;;;WAAmB;IAkF7B,CAAC;IAhFC,IAAI,OAAO;;QACT,OAAO,CAAA,MAAA,IAAI,CAAC,MAAM,CAAC,MAAM,0CAAE,OAAO,KAAI,EAAE,CAAA;IAC1C,CAAC;IAED,IAAI,cAAc;Q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AAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM;oBACrD,MAAM,EAAE,IAAI,CAAC,MAAM;oBACnB,MAAM,EAAE,IAAI,CAAC,MAAM;oBACnB,GAAG,EAAE,IAAI,CAAC,GAAG;iBACd;aACF,CAAC,CACH,CAAA;QACH,CAAC,CAAA;QAED,IAAI,CAAC;YACH,IAAI,KAAK,GACP,CAAC,WAAW,IAAI,OAAO,IAAI,CAAC,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC,CAAA;QACzG,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,IAAI,KAAK,GAAQ,EAAE,CAAA;QACrB,CAAC;QAED;;;;;;;UAOE;QACF,IAAI,QAAQ,GAAG,IAAI,CAAA;0CACmB,KAAK,eAAe,SAAS,qBAAqB,eAAe;;KAEtG,CAAA;QAED,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC,QAAQ,EAAE;YAC/B,QAAQ,EAAE,IAAI;YACd,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,GAAG,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,WAAW,EAAE,KAAI,OAAO,CAAC,CAAC,CAAC,kBAAkB,CAAC,GAAG;YACjE,IAAI;SACL,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAnFY,sBAAsB;IADlC,aAAa,CAAC,4BAA4B,CAAC;GAC/B,sBAAsB,CAmFlC","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"]}
@@ -11,6 +11,15 @@ import { OxGristEditor } from '@operato/data-grist';
11
11
  import { i18next } from '@operato/i18n';
12
12
  import { openPopup } from '@operato/popup';
13
13
  let OxGristEditorParameters = class OxGristEditorParameters extends OxGristEditor {
14
+ constructor() {
15
+ super(...arguments);
16
+ Object.defineProperty(this, "popup", {
17
+ enumerable: true,
18
+ configurable: true,
19
+ writable: true,
20
+ value: void 0
21
+ });
22
+ }
14
23
  get editorTemplate() {
15
24
  const value = this.value && typeof this.value === 'object' ? JSON.stringify(this.value) : this.value;
16
25
  return html ` <div tabindex="0">${value || ''}</div> `;
@@ -1 +1 @@
1
- {"version":3,"file":"ox-grist-editor-parameters.js","sourceRoot":"","sources":["../../src/ox-grist-editor-parameters.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,OAAO,4BAA4B,CAAA;AACnC,OAAO,kCAAkC,CAAA;AAEzC,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAErC,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,SAAS,EAAe,MAAM,gBAAgB,CAAA;AAGhD,IAAM,uBAAuB,GAA7B,MAAM,uBAAwB,SAAQ,aAAa;IAGxD,IAAI,cAAc;QAChB,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,IAAI,OAAO,IAAI,CAAC,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAA;QAC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,CAAC,CAAC,MAAM;oBACrD,MAAM,EAAE,IAAI,CAAC,MAAM;oBACnB,MAAM,EAAE,IAAI,CAAC,MAAM;oBACnB,GAAG,EAAE,IAAI,CAAC,GAAG;iBACd;aACF,CAAC,CACH,CAAA;QACH,CAAC,CAAA;QAED,IAAI,CAAC;YACH,IAAI,KAAK,GACP,CAAC,WAAW,IAAI,OAAO,IAAI,CAAC,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC,CAAA;QACzG,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,IAAI,KAAK,GAAQ,EAAE,CAAA;QACrB,CAAC;QAED;;;;;;;UAOE;QACF,IAAI,QAAQ,GAAG,IAAI,CAAA;;iBAEN,KAAK;iBACL,IAAI;gBACL,IAAI,CAAC,MAAM;mBACR,OAAO;2BACC,eAAe;;;KAGrC,CAAA;QAED,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC,QAAQ,EAAE;YAC/B,QAAQ,EAAE,IAAI;YACd,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,GAAG,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,WAAW,EAAE,KAAI,EAAE,IAAI,OAAO,CAAC,CAAC,CAAC,cAAc,CAAC,EAAE;YAClE,IAAI;SACL,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAnFY,uBAAuB;IADnC,aAAa,CAAC,4BAA4B,CAAC;GAC/B,uBAAuB,CAmFnC","sourcesContent":["/**\n * @license Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport './ox-parameters-builder.js'\nimport './ox-popup-parameters-builder.js'\n\nimport { html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\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-parameters')\nexport class OxGristEditorParameters extends OxGristEditor {\n private popup?: PopupHandle\n\n get editorTemplate() {\n const value = this.value && typeof this.value === 'object' ? JSON.stringify(this.value) : this.value\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 var { options } = this.column.record\n\n if (typeof options === 'function') {\n options = await options.call(this, this.value, this.column, this.record, this.row, this.field)\n }\n\n const { name, help, spec, context, objectified = false } = 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-parameters-builder\n .value=${value}\n .props=${spec}\n .host=${this.record}\n .context=${context}\n .confirmCallback=${confirmCallback}\n >\n </ox-popup-parameters-builder>\n `\n\n this.popup = openPopup(template, {\n backdrop: true,\n size: 'large',\n title: `${name?.toUpperCase() || ''} ${i18next.t('field.params')}`,\n help\n })\n }\n}\n"]}
1
+ {"version":3,"file":"ox-grist-editor-parameters.js","sourceRoot":"","sources":["../../src/ox-grist-editor-parameters.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,OAAO,4BAA4B,CAAA;AACnC,OAAO,kCAAkC,CAAA;AAEzC,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAErC,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,SAAS,EAAe,MAAM,gBAAgB,CAAA;AAGhD,IAAM,uBAAuB,GAA7B,MAAM,uBAAwB,SAAQ,aAAa;IAAnD;;QACG;;;;;WAAmB;IAkF7B,CAAC;IAhFC,IAAI,cAAc;QAChB,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,IAAI,OAAO,IAAI,CAAC,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAA;QACpG,OAAO,IAAI,CAAA,sBAAsB,KAAK,IAAI,EAAE,SAAS,CAAA;IACvD,CAAC;IAED,QAAQ,CAAC,CAAQ;QACf,CAAC,CAAC,eAAe,EAAE,CAAA;QACnB,IAAI,CAAC,YAAY,EAAE,CAAA;IACrB,CAAC;IAED,UAAU,CAAC,CAAgB;QACzB,MAAM,GAAG,GAAG,CAAC,CAAC,GAAG,CAAA;QACjB,IAAI,GAAG,IAAI,OAAO,EAAE,CAAC;YACnB,CAAC,CAAC,eAAe,EAAE,CAAA;YACnB,IAAI,CAAC,YAAY,EAAE,CAAA;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AAI,CAAC,KAAK,IAAI,EAAE,CAAC,CAAA;QACzG,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,IAAI,KAAK,GAAQ,EAAE,CAAA;QACrB,CAAC;QAED;;;;;;;UAOE;QACF,IAAI,QAAQ,GAAG,IAAI,CAAA;;iBAEN,KAAK;iBACL,IAAI;gBACL,IAAI,CAAC,MAAM;mBACR,OAAO;2BACC,eAAe;;;KAGrC,CAAA;QAED,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC,QAAQ,EAAE;YAC/B,QAAQ,EAAE,IAAI;YACd,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,GAAG,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,WAAW,EAAE,KAAI,EAAE,IAAI,OAAO,CAAC,CAAC,CAAC,cAAc,CAAC,EAAE;YAClE,IAAI;SACL,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAnFY,uBAAuB;IADnC,aAAa,CAAC,4BAA4B,CAAC;GAC/B,uBAAuB,CAmFnC","sourcesContent":["/**\n * @license Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport './ox-parameters-builder.js'\nimport './ox-popup-parameters-builder.js'\n\nimport { html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\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-parameters')\nexport class OxGristEditorParameters extends OxGristEditor {\n private popup?: PopupHandle\n\n get editorTemplate() {\n const value = this.value && typeof this.value === 'object' ? JSON.stringify(this.value) : this.value\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 var { options } = this.column.record\n\n if (typeof options === 'function') {\n options = await options.call(this, this.value, this.column, this.record, this.row, this.field)\n }\n\n const { name, help, spec, context, objectified = false } = 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-parameters-builder\n .value=${value}\n .props=${spec}\n .host=${this.record}\n .context=${context}\n .confirmCallback=${confirmCallback}\n >\n </ox-popup-parameters-builder>\n `\n\n this.popup = openPopup(template, {\n backdrop: true,\n size: 'large',\n title: `${name?.toUpperCase() || ''} ${i18next.t('field.params')}`,\n help\n })\n }\n}\n"]}
@@ -10,6 +10,15 @@ import { OxGristEditor } from '@operato/data-grist';
10
10
  import { i18next } from '@operato/i18n';
11
11
  import { openPopup } from '@operato/popup';
12
12
  let OxGristEditorPartitionKeys = class OxGristEditorPartitionKeys extends OxGristEditor {
13
+ constructor() {
14
+ super(...arguments);
15
+ Object.defineProperty(this, "popup", {
16
+ enumerable: true,
17
+ configurable: true,
18
+ writable: true,
19
+ value: void 0
20
+ });
21
+ }
13
22
  get editorTemplate() {
14
23
  return this.value && this.value instanceof Array && this.value.length > 0
15
24
  ? html `<md-icon style="--md-icon-size:1.3em">key</md-icon>`