@operato/app 1.0.0-beta.8 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +378 -0
- package/demo/data-grist-test.html +1 -1
- package/dist/src/filters-form/filter-resource-select.d.ts +4 -0
- package/dist/src/filters-form/filter-resource-select.js +78 -0
- package/dist/src/filters-form/filter-resource-select.js.map +1 -0
- package/dist/src/{grist → filters-form}/index.d.ts +0 -0
- package/dist/src/filters-form/index.js +5 -0
- package/dist/src/filters-form/index.js.map +1 -0
- package/dist/src/grist-editor/index.js +1 -9
- package/dist/src/grist-editor/index.js.map +1 -1
- package/dist/src/grist-editor/ox-grist-editor-resource-object-legacy.d.ts +10 -0
- package/dist/src/grist-editor/ox-grist-editor-resource-object-legacy.js +99 -0
- package/dist/src/grist-editor/ox-grist-editor-resource-object-legacy.js.map +1 -0
- package/dist/src/grist-editor/ox-grist-editor-resource-object.d.ts +0 -1
- package/dist/src/grist-editor/ox-grist-editor-resource-object.js +7 -12
- package/dist/src/grist-editor/ox-grist-editor-resource-object.js.map +1 -1
- package/dist/src/grist-editor/ox-grist-renderer-crontab.js +3 -3
- package/dist/src/grist-editor/ox-grist-renderer-crontab.js.map +1 -1
- package/dist/src/grist-editor/ox-grist-renderer-resource-id.js +5 -2
- package/dist/src/grist-editor/ox-grist-renderer-resource-id.js.map +1 -1
- package/dist/src/grist-editor/ox-popup-code-input.js +5 -4
- package/dist/src/grist-editor/ox-popup-code-input.js.map +1 -1
- package/dist/src/grist-editor/ox-selector-resource-id.js +5 -4
- package/dist/src/grist-editor/ox-selector-resource-id.js.map +1 -1
- package/dist/src/grist-editor/ox-selector-resource-object-adv.d.ts +36 -0
- package/dist/src/grist-editor/ox-selector-resource-object-adv.js +270 -0
- package/dist/src/grist-editor/ox-selector-resource-object-adv.js.map +1 -0
- package/dist/src/grist-editor/ox-selector-resource-object-legacy.d.ts +39 -0
- package/dist/src/grist-editor/ox-selector-resource-object-legacy.js +351 -0
- package/dist/src/grist-editor/ox-selector-resource-object-legacy.js.map +1 -0
- package/dist/src/grist-editor/ox-selector-resource-object.d.ts +1 -5
- package/dist/src/grist-editor/ox-selector-resource-object.js +70 -146
- package/dist/src/grist-editor/ox-selector-resource-object.js.map +1 -1
- package/dist/src/input/ox-input-background-pattern.d.ts +3 -0
- package/dist/src/input/ox-input-background-pattern.js +35 -7
- package/dist/src/input/ox-input-background-pattern.js.map +1 -1
- package/dist/src/input/ox-input-fill-style.d.ts +4 -2
- package/dist/src/input/ox-input-fill-style.js +13 -7
- package/dist/src/input/ox-input-fill-style.js.map +1 -1
- package/dist/src/input/ox-input-graphql.d.ts +1 -1
- package/dist/src/input/ox-input-graphql.js +7 -7
- package/dist/src/input/ox-input-graphql.js.map +1 -1
- package/dist/src/property-editor/index.d.ts +2 -1
- package/dist/src/property-editor/index.js +5 -2
- package/dist/src/property-editor/index.js.map +1 -1
- package/dist/src/property-editor/ox-property-editor-graphql.d.ts +2 -2
- package/dist/src/property-editor/ox-property-editor-graphql.js +4 -4
- package/dist/src/property-editor/ox-property-editor-graphql.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +25 -30
- package/src/filters-form/filter-resource-select.ts +94 -0
- package/src/filters-form/index.ts +6 -0
- package/src/grist-editor/index.ts +1 -9
- package/src/grist-editor/ox-grist-editor-resource-object-legacy.ts +123 -0
- package/src/grist-editor/ox-grist-editor-resource-object.ts +17 -13
- package/src/grist-editor/ox-grist-renderer-crontab.ts +5 -4
- package/src/grist-editor/ox-grist-renderer-resource-id.ts +6 -2
- package/src/grist-editor/ox-popup-code-input.ts +5 -4
- package/src/grist-editor/ox-selector-resource-id.ts +5 -4
- package/src/grist-editor/ox-selector-resource-object-legacy.ts +360 -0
- package/src/grist-editor/ox-selector-resource-object.ts +71 -160
- package/src/input/ox-input-background-pattern.ts +37 -7
- package/src/input/ox-input-fill-style.ts +18 -8
- package/src/input/ox-input-graphql.ts +8 -8
- package/src/property-editor/index.ts +5 -2
- package/src/property-editor/ox-property-editor-graphql.ts +5 -4
- package/dist/src/grist/id-input.d.ts +0 -19
- package/dist/src/grist/id-input.js +0 -119
- package/dist/src/grist/id-input.js.map +0 -1
- package/dist/src/grist/id-renderer.d.ts +0 -2
- package/dist/src/grist/id-renderer.js +0 -9
- package/dist/src/grist/id-renderer.js.map +0 -1
- package/dist/src/grist/id-selector.d.ts +0 -23
- package/dist/src/grist/id-selector.js +0 -197
- package/dist/src/grist/id-selector.js.map +0 -1
- package/dist/src/grist/index.js +0 -7
- package/dist/src/grist/index.js.map +0 -1
- package/dist/src/grist-editor/ox-grist-editor-crontab.d.ts +0 -8
- package/dist/src/grist-editor/ox-grist-editor-crontab.js +0 -50
- package/dist/src/grist-editor/ox-grist-editor-crontab.js.map +0 -1
- package/dist/src/grist-editor/ox-grist-editor-parameters.d.ts +0 -12
- package/dist/src/grist-editor/ox-grist-editor-parameters.js +0 -84
- package/dist/src/grist-editor/ox-grist-editor-parameters.js.map +0 -1
- package/dist/src/grist-editor/ox-grist-editor-partition-keys.d.ts +0 -11
- package/dist/src/grist-editor/ox-grist-editor-partition-keys.js +0 -74
- package/dist/src/grist-editor/ox-grist-editor-partition-keys.js.map +0 -1
- package/dist/src/grist-editor/ox-grist-editor-value-map.d.ts +0 -11
- package/dist/src/grist-editor/ox-grist-editor-value-map.js +0 -74
- package/dist/src/grist-editor/ox-grist-editor-value-map.js.map +0 -1
- package/dist/src/grist-editor/ox-parameters-builder.d.ts +0 -4
- package/dist/src/grist-editor/ox-parameters-builder.js +0 -118
- package/dist/src/grist-editor/ox-parameters-builder.js.map +0 -1
- package/dist/src/grist-editor/ox-popup-crontab-input.d.ts +0 -11
- package/dist/src/grist-editor/ox-popup-crontab-input.js +0 -74
- package/dist/src/grist-editor/ox-popup-crontab-input.js.map +0 -1
- package/dist/src/grist-editor/ox-popup-parameters-builder.d.ts +0 -13
- package/dist/src/grist-editor/ox-popup-parameters-builder.js +0 -111
- package/dist/src/grist-editor/ox-popup-parameters-builder.js.map +0 -1
- package/dist/src/grist-editor/ox-popup-partition-keys-input.d.ts +0 -12
- package/dist/src/grist-editor/ox-popup-partition-keys-input.js +0 -98
- package/dist/src/grist-editor/ox-popup-partition-keys-input.js.map +0 -1
- package/dist/src/grist-editor/ox-popup-value-map-input.d.ts +0 -12
- package/dist/src/grist-editor/ox-popup-value-map-input.js +0 -104
- package/dist/src/grist-editor/ox-popup-value-map-input.js.map +0 -1
- package/src/grist-editor/ox-grist-editor-crontab.ts +0 -62
- package/src/grist-editor/ox-grist-editor-parameters.ts +0 -99
- package/src/grist-editor/ox-grist-editor-partition-keys.ts +0 -86
- package/src/grist-editor/ox-grist-editor-value-map.ts +0 -86
- package/src/grist-editor/ox-parameters-builder.ts +0 -128
- package/src/grist-editor/ox-popup-crontab-input.ts +0 -74
- package/src/grist-editor/ox-popup-parameters-builder.ts +0 -106
- package/src/grist-editor/ox-popup-partition-keys-input.ts +0 -95
- package/src/grist-editor/ox-popup-value-map-input.ts +0 -101
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,384 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
### [1.0.1](https://github.com/hatiolab/operato/compare/v1.0.0...v1.0.1) (2022-07-25)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### :bug: Bug Fix
|
|
10
|
+
|
|
11
|
+
* support ox-grist filters-form for ox-grist-editor-resource-object ([e7ffdaa](https://github.com/hatiolab/operato/commit/e7ffdaa9951a4596aff7ec7c60848570605c54ac))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## [1.0.0](https://github.com/hatiolab/operato/compare/v1.0.0-beta.51...v1.0.0) (2022-07-24)
|
|
16
|
+
|
|
17
|
+
**Note:** Version bump only for package @operato/app
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
## [1.0.0-beta.51](https://github.com/hatiolab/operato/compare/v1.0.0-beta.50...v1.0.0-beta.51) (2022-07-22)
|
|
24
|
+
|
|
25
|
+
**Note:** Version bump only for package @operato/app
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
## [1.0.0-beta.50](https://github.com/hatiolab/operato/compare/v1.0.0-beta.49...v1.0.0-beta.50) (2022-07-18)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
### :bug: Bug Fix
|
|
35
|
+
|
|
36
|
+
* autofocus for ox-search-form ([a9d394b](https://github.com/hatiolab/operato/commit/a9d394b0d404ab7e71d943cad69decfa9a369a06))
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
## [1.0.0-beta.49](https://github.com/hatiolab/operato/compare/v1.0.0-beta.48...v1.0.0-beta.49) (2022-07-17)
|
|
41
|
+
|
|
42
|
+
**Note:** Version bump only for package @operato/app
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
## [1.0.0-beta.48](https://github.com/hatiolab/operato/compare/v1.0.0-beta.47...v1.0.0-beta.48) (2022-07-17)
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
### :rocket: New Features
|
|
52
|
+
|
|
53
|
+
* applied graphql v16 and migrated subscriptions-transport-ws to graphql-ws ([9391306](https://github.com/hatiolab/operato/commit/9391306332e4dd436d4da3bd1a9a399c68e6b645))
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
## [1.0.0-beta.47](https://github.com/hatiolab/operato/compare/v1.0.0-beta.46...v1.0.0-beta.47) (2022-07-15)
|
|
58
|
+
|
|
59
|
+
**Note:** Version bump only for package @operato/app
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
## [1.0.0-beta.46](https://github.com/hatiolab/operato/compare/v1.0.0-beta.45...v1.0.0-beta.46) (2022-07-11)
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
### :bug: Bug Fix
|
|
69
|
+
|
|
70
|
+
* property-editor spec. changed ([b10e4ef](https://github.com/hatiolab/operato/commit/b10e4ef151450a0ca19cbf00c9c96da80ddaaed8))
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
## [1.0.0-beta.45](https://github.com/hatiolab/operato/compare/v1.0.0-beta.44...v1.0.0-beta.45) (2022-07-09)
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
### :bug: Bug Fix
|
|
78
|
+
|
|
79
|
+
* upgrade dependencies ([4986392](https://github.com/hatiolab/operato/commit/4986392e64524b5602cc9a144def239e85524bee))
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
## [1.0.0-beta.44](https://github.com/hatiolab/operato/compare/v1.0.0-beta.43...v1.0.0-beta.44) (2022-07-07)
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
### :bug: Bug Fix
|
|
87
|
+
|
|
88
|
+
* ox-grist-editor-resource-object ([869a8a2](https://github.com/hatiolab/operato/commit/869a8a2c55eac4f6dd74117ada5472532192d10e))
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
## [1.0.0-beta.43](https://github.com/hatiolab/operato/compare/v1.0.0-beta.42...v1.0.0-beta.43) (2022-07-03)
|
|
93
|
+
|
|
94
|
+
**Note:** Version bump only for package @operato/app
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
## [1.0.0-beta.42](https://github.com/hatiolab/operato/compare/v1.0.0-beta.41...v1.0.0-beta.42) (2022-07-03)
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
### :bug: Bug Fix
|
|
104
|
+
|
|
105
|
+
* grist-editor style ([70ff66d](https://github.com/hatiolab/operato/commit/70ff66dcb19f6b3a34ce084f4c1ba6250a717fdf))
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
## [1.0.0-beta.41](https://github.com/hatiolab/operato/compare/v1.0.0-beta.40...v1.0.0-beta.41) (2022-06-30)
|
|
110
|
+
|
|
111
|
+
**Note:** Version bump only for package @operato/app
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
## [1.0.0-beta.40](https://github.com/hatiolab/operato/compare/v1.0.0-beta.39...v1.0.0-beta.40) (2022-06-29)
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
### :bug: Bug Fix
|
|
121
|
+
|
|
122
|
+
* [#43](https://github.com/hatiolab/operato/issues/43)-datasample ([14ab019](https://github.com/hatiolab/operato/commit/14ab0199311f340c784018b9fc78b70e57b09567))
|
|
123
|
+
* duration editor for grist and property editor ([db2a59e](https://github.com/hatiolab/operato/commit/db2a59eca05c3d5c324d351ad9c201f5f93113c4))
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
## [1.0.0-beta.39](https://github.com/hatiolab/operato/compare/v1.0.0-beta.38...v1.0.0-beta.39) (2022-06-22)
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
### :rocket: New Features
|
|
131
|
+
|
|
132
|
+
* [#42](https://github.com/hatiolab/operato/issues/42) enhance properties for board pattern ([a2b8346](https://github.com/hatiolab/operato/commit/a2b8346d05ffebd82c22e067aaac8047741f73d0))
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
## [1.0.0-beta.38](https://github.com/hatiolab/operato/compare/v1.0.0-beta.37...v1.0.0-beta.38) (2022-06-20)
|
|
137
|
+
|
|
138
|
+
**Note:** Version bump only for package @operato/app
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
## [1.0.0-beta.37](https://github.com/hatiolab/operato/compare/v1.0.0-beta.36...v1.0.0-beta.37) (2022-06-20)
|
|
145
|
+
|
|
146
|
+
**Note:** Version bump only for package @operato/app
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
## [1.0.0-beta.36](https://github.com/hatiolab/operato/compare/v1.0.0-beta.35...v1.0.0-beta.36) (2022-06-16)
|
|
153
|
+
|
|
154
|
+
**Note:** Version bump only for package @operato/app
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
## [1.0.0-beta.35](https://github.com/hatiolab/operato/compare/v1.0.0-beta.34...v1.0.0-beta.35) (2022-06-16)
|
|
161
|
+
|
|
162
|
+
**Note:** Version bump only for package @operato/app
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
## [1.0.0-beta.34](https://github.com/hatiolab/operato/compare/v1.0.0-beta.33...v1.0.0-beta.34) (2022-06-16)
|
|
169
|
+
|
|
170
|
+
**Note:** Version bump only for package @operato/app
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
## [1.0.0-beta.33](https://github.com/hatiolab/operato/compare/v1.0.0-beta.32...v1.0.0-beta.33) (2022-06-16)
|
|
177
|
+
|
|
178
|
+
**Note:** Version bump only for package @operato/app
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
## [1.0.0-beta.32](https://github.com/hatiolab/operato/compare/v1.0.0-beta.31...v1.0.0-beta.32) (2022-06-15)
|
|
185
|
+
|
|
186
|
+
**Note:** Version bump only for package @operato/app
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
## [1.0.0-beta.31](https://github.com/hatiolab/operato/compare/v1.0.0-beta.30...v1.0.0-beta.31) (2022-06-15)
|
|
193
|
+
|
|
194
|
+
**Note:** Version bump only for package @operato/app
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
## [1.0.0-beta.30](https://github.com/hatiolab/operato/compare/v1.0.0-beta.29...v1.0.0-beta.30) (2022-06-13)
|
|
201
|
+
|
|
202
|
+
**Note:** Version bump only for package @operato/app
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
## [1.0.0-beta.29](https://github.com/hatiolab/operato/compare/v1.0.0-beta.28...v1.0.0-beta.29) (2022-06-10)
|
|
209
|
+
|
|
210
|
+
**Note:** Version bump only for package @operato/app
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
## [1.0.0-beta.28](https://github.com/hatiolab/operato/compare/v1.0.0-beta.27...v1.0.0-beta.28) (2022-06-10)
|
|
217
|
+
|
|
218
|
+
**Note:** Version bump only for package @operato/app
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
## [1.0.0-beta.27](https://github.com/hatiolab/operato/compare/v1.0.0-beta.26...v1.0.0-beta.27) (2022-06-09)
|
|
225
|
+
|
|
226
|
+
**Note:** Version bump only for package @operato/app
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
## [1.0.0-beta.26](https://github.com/hatiolab/operato/compare/v1.0.0-beta.25...v1.0.0-beta.26) (2022-06-04)
|
|
233
|
+
|
|
234
|
+
**Note:** Version bump only for package @operato/app
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
## [1.0.0-beta.25](https://github.com/hatiolab/operato/compare/v1.0.0-beta.24...v1.0.0-beta.25) (2022-06-02)
|
|
241
|
+
|
|
242
|
+
**Note:** Version bump only for package @operato/app
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
## [1.0.0-beta.24](https://github.com/hatiolab/operato/compare/v1.0.0-beta.23...v1.0.0-beta.24) (2022-06-02)
|
|
249
|
+
|
|
250
|
+
**Note:** Version bump only for package @operato/app
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
## [1.0.0-beta.23](https://github.com/hatiolab/operato/compare/v1.0.0-beta.22...v1.0.0-beta.23) (2022-06-02)
|
|
257
|
+
|
|
258
|
+
**Note:** Version bump only for package @operato/app
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
## [1.0.0-beta.22](https://github.com/hatiolab/operato/compare/v1.0.0-beta.21...v1.0.0-beta.22) (2022-05-31)
|
|
265
|
+
|
|
266
|
+
**Note:** Version bump only for package @operato/app
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
## [1.0.0-beta.21](https://github.com/hatiolab/operato/compare/v1.0.0-beta.20...v1.0.0-beta.21) (2022-05-31)
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
### :bug: Bug Fix
|
|
276
|
+
|
|
277
|
+
* add ox-input-key-values, ox-property-editor-key-values and so on ([d26b2e9](https://github.com/hatiolab/operato/commit/d26b2e94a5e43935e5e80a1ebb0948642624ca92))
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
## [1.0.0-beta.20](https://github.com/hatiolab/operato/compare/v1.0.0-beta.19...v1.0.0-beta.20) (2022-05-30)
|
|
282
|
+
|
|
283
|
+
**Note:** Version bump only for package @operato/app
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
## [1.0.0-beta.19](https://github.com/hatiolab/operato/compare/v1.0.0-beta.18...v1.0.0-beta.19) (2022-05-29)
|
|
290
|
+
|
|
291
|
+
**Note:** Version bump only for package @operato/app
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
## [1.0.0-beta.18](https://github.com/hatiolab/operato/compare/v1.0.0-beta.17...v1.0.0-beta.18) (2022-05-27)
|
|
298
|
+
|
|
299
|
+
**Note:** Version bump only for package @operato/app
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
## [1.0.0-beta.17](https://github.com/hatiolab/operato/compare/v1.0.0-beta.16...v1.0.0-beta.17) (2022-05-25)
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
### :bug: Bug Fix
|
|
309
|
+
|
|
310
|
+
* data-grist copy/paste a row ([35fcaef](https://github.com/hatiolab/operato/commit/35fcaefc82aaa6567efd029dd72622909a4b71cf))
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
## [1.0.0-beta.16](https://github.com/hatiolab/operato/compare/v1.0.0-beta.15...v1.0.0-beta.16) (2022-05-23)
|
|
315
|
+
|
|
316
|
+
**Note:** Version bump only for package @operato/app
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
## [1.0.0-beta.15](https://github.com/hatiolab/operato/compare/v1.0.0-beta.14...v1.0.0-beta.15) (2022-05-20)
|
|
323
|
+
|
|
324
|
+
**Note:** Version bump only for package @operato/app
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
## [1.0.0-beta.14](https://github.com/hatiolab/operato/compare/v1.0.0-beta.13...v1.0.0-beta.14) (2022-05-19)
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
### :bug: Bug Fix
|
|
334
|
+
|
|
335
|
+
* ox-data-ooc-view ([a0a404c](https://github.com/hatiolab/operato/commit/a0a404c916e0a418e4e41fe9e1fe06fb9f7f84d9))
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
## [1.0.0-beta.13](https://github.com/hatiolab/operato/compare/v1.0.0-beta.12...v1.0.0-beta.13) (2022-05-19)
|
|
340
|
+
|
|
341
|
+
|
|
342
|
+
### :bug: Bug Fix
|
|
343
|
+
|
|
344
|
+
* incorrect package.json scripts for storybooks ([8c8c405](https://github.com/hatiolab/operato/commit/8c8c405443247108b9c411b8161c008d9b6a2261))
|
|
345
|
+
* record-view ([ffcb397](https://github.com/hatiolab/operato/commit/ffcb397748efb64ce4e515f733b50f088ea1a093))
|
|
346
|
+
* storybook for inputs ([72f7992](https://github.com/hatiolab/operato/commit/72f7992d902528e3a5ca0f3f0f3897902b6b13bd))
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
|
|
350
|
+
## [1.0.0-beta.12](https://github.com/hatiolab/operato/compare/v1.0.0-beta.11...v1.0.0-beta.12) (2022-05-13)
|
|
351
|
+
|
|
352
|
+
|
|
353
|
+
### :rocket: New Features
|
|
354
|
+
|
|
355
|
+
* storybook started ([90c08c9](https://github.com/hatiolab/operato/commit/90c08c9a15e5fe554baaa1becca07793e8434799))
|
|
356
|
+
|
|
357
|
+
|
|
358
|
+
|
|
359
|
+
## [1.0.0-beta.11](https://github.com/hatiolab/operato/compare/v1.0.0-beta.10...v1.0.0-beta.11) (2022-05-01)
|
|
360
|
+
|
|
361
|
+
|
|
362
|
+
### :rocket: New Features
|
|
363
|
+
|
|
364
|
+
* separated filter-form from data-grist ([21e27f7](https://github.com/hatiolab/operato/commit/21e27f74d3e66d782da4aa75801c39a037627f62))
|
|
365
|
+
|
|
366
|
+
|
|
367
|
+
|
|
368
|
+
## [1.0.0-beta.10](https://github.com/hatiolab/operato/compare/v1.0.0-beta.9...v1.0.0-beta.10) (2022-04-28)
|
|
369
|
+
|
|
370
|
+
**Note:** Version bump only for package @operato/app
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
|
|
375
|
+
|
|
376
|
+
## [1.0.0-beta.9](https://github.com/hatiolab/operato/compare/v1.0.0-beta.8...v1.0.0-beta.9) (2022-04-28)
|
|
377
|
+
|
|
378
|
+
**Note:** Version bump only for package @operato/app
|
|
379
|
+
|
|
380
|
+
|
|
381
|
+
|
|
382
|
+
|
|
383
|
+
|
|
6
384
|
## [1.0.0-beta.8](https://github.com/hatiolab/operato/compare/v1.0.0-beta.7...v1.0.0-beta.8) (2022-04-27)
|
|
7
385
|
|
|
8
386
|
**Note:** Version bump only for package @operato/app
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import '@operato/input/ox-checkbox.js';
|
|
2
|
+
import '../grist-editor/ox-selector-resource-id';
|
|
3
|
+
import { html } from 'lit-html';
|
|
4
|
+
import { i18next } from '@operato/i18n';
|
|
5
|
+
import { openPopup } from '@operato/layout';
|
|
6
|
+
function openResourceSelector(filter, value, confirmCallback) {
|
|
7
|
+
const { queryName, select, list, basicArgs, valueField = 'id' } = filter.options || {};
|
|
8
|
+
var actualValue;
|
|
9
|
+
if (typeof valueField === 'function') {
|
|
10
|
+
actualValue = valueField(value);
|
|
11
|
+
}
|
|
12
|
+
else {
|
|
13
|
+
actualValue = value === null || value === void 0 ? void 0 : value[valueField];
|
|
14
|
+
}
|
|
15
|
+
var template = html `
|
|
16
|
+
<ox-selector-resource-id
|
|
17
|
+
.value=${actualValue}
|
|
18
|
+
.confirmCallback=${confirmCallback}
|
|
19
|
+
.queryName=${queryName}
|
|
20
|
+
.select=${select}
|
|
21
|
+
.list=${list}
|
|
22
|
+
.basicArgs=${basicArgs}
|
|
23
|
+
.valueField=${valueField}
|
|
24
|
+
></ox-selector-resource-id>
|
|
25
|
+
`;
|
|
26
|
+
const popup = openPopup(template, {
|
|
27
|
+
backdrop: true,
|
|
28
|
+
size: 'large',
|
|
29
|
+
title: i18next.t('title.select_item')
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
export const FilterResourceSelect = (filter, value, owner) => {
|
|
33
|
+
const { name, operator = 'like' } = filter;
|
|
34
|
+
return operator === 'like'
|
|
35
|
+
? html ` <input
|
|
36
|
+
type="text"
|
|
37
|
+
name=${name}
|
|
38
|
+
.value=${value}
|
|
39
|
+
@change=${(e) => {
|
|
40
|
+
const input = e.target;
|
|
41
|
+
input.dispatchEvent(new CustomEvent('filter-change', {
|
|
42
|
+
bubbles: true,
|
|
43
|
+
composed: true,
|
|
44
|
+
detail: {
|
|
45
|
+
name,
|
|
46
|
+
operator,
|
|
47
|
+
value: input.value
|
|
48
|
+
}
|
|
49
|
+
}));
|
|
50
|
+
}}
|
|
51
|
+
/>`
|
|
52
|
+
: operator == 'in'
|
|
53
|
+
? html ``
|
|
54
|
+
: operator === 'eq'
|
|
55
|
+
? html `
|
|
56
|
+
<input
|
|
57
|
+
style="min-width: 100px; min-height: 24px"
|
|
58
|
+
type="text"
|
|
59
|
+
name=${name}
|
|
60
|
+
.value=${value}
|
|
61
|
+
readonly
|
|
62
|
+
@click=${(e) => {
|
|
63
|
+
e.stopPropagation();
|
|
64
|
+
const confirmCallback = (selected) => {
|
|
65
|
+
var { idField = 'id', nameField = 'name', descriptionField = 'description' } = filter.options || {};
|
|
66
|
+
owner.dispatchEvent(new CustomEvent('filter-change', {
|
|
67
|
+
bubbles: true,
|
|
68
|
+
composed: true,
|
|
69
|
+
detail: selected ? selected[idField] : ''
|
|
70
|
+
}));
|
|
71
|
+
};
|
|
72
|
+
openResourceSelector(filter, value, confirmCallback);
|
|
73
|
+
}}
|
|
74
|
+
/>
|
|
75
|
+
`
|
|
76
|
+
: html ``;
|
|
77
|
+
};
|
|
78
|
+
//# sourceMappingURL=filter-resource-select.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filter-resource-select.js","sourceRoot":"","sources":["../../../src/filters-form/filter-resource-select.ts"],"names":[],"mappings":"AAAA,OAAO,+BAA+B,CAAA;AACtC,OAAO,yCAAyC,CAAA;AAEhD,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAG/B,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAI3C,SAAS,oBAAoB,CAAC,MAAoB,EAAE,KAAU,EAA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A;QACL,CAAC,CAAC,QAAQ,IAAI,IAAI;YAClB,CAAC,CAAC,IAAI,CAAA,EAAE;YACR,CAAC,CAAC,QAAQ,KAAK,IAAI;gBACnB,CAAC,CAAC,IAAI,CAAA;;;;iBAIO,IAAI;mBACF,KAAK;;mBAEL,CAAC,CAAQ,EAAE,EAAE;oBACpB,CAAC,CAAC,eAAe,EAAE,CAAA;oBAEnB,MAAM,eAAe,GAAG,CAAC,QAAmC,EAAE,EAAE;wBAC9D,IAAI,EAAE,OAAO,GAAG,IAAI,EAAE,SAAS,GAAG,MAAM,EAAE,gBAAgB,GAAG,aAAa,EAAE,GAAG,MAAM,CAAC,OAAO,IAAI,EAAE,CAAA;wBAEnG,KAAK,CAAC,aAAa,CACjB,IAAI,WAAW,CAAC,eAAe,EAAE;4BAC/B,OAAO,EAAE,IAAI;4BACb,QAAQ,EAAE,IAAI;4BACd,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE;yBAC1C,CAAC,CACH,CAAA;oBACH,CAAC,CAAA;oBAED,oBAAoB,CAAC,MAAM,EAAE,KAAK,EAAE,eAAe,CAAC,CAAA;gBACtD,CAAC;;OAEJ;gBACH,CAAC,CAAC,IAAI,CAAA,EAAE,CAAA;AACZ,CAAC,CAAA","sourcesContent":["import '@operato/input/ox-checkbox.js'\nimport '../grist-editor/ox-selector-resource-id'\n\nimport { html } from 'lit-html'\n\nimport { FilterConfig, FilterSelectRenderer } from '@operato/form'\nimport { i18next } from '@operato/i18n'\nimport { openPopup } from '@operato/layout'\n\ntype SelectedCallback = (value: { id: string; name: string; description: string }) => void\n\nfunction openResourceSelector(filter: FilterConfig, value: any, confirmCallback: SelectedCallback) {\n const { queryName, select, list, basicArgs, valueField = 'id' } = filter.options || {}\n\n var actualValue\n if (typeof valueField === 'function') {\n actualValue = valueField(value)\n } else {\n actualValue = value?.[valueField]\n }\n\n var template = html`\n <ox-selector-resource-id\n .value=${actualValue}\n .confirmCallback=${confirmCallback}\n .queryName=${queryName}\n .select=${select}\n .list=${list}\n .basicArgs=${basicArgs}\n .valueField=${valueField}\n ></ox-selector-resource-id>\n `\n\n const popup = openPopup(template, {\n backdrop: true,\n size: 'large',\n title: i18next.t('title.select_item')\n })\n}\n\nexport const FilterResourceSelect: FilterSelectRenderer = (filter, value, owner) => {\n const { name, operator = 'like' } = filter\n\n return operator === 'like'\n ? html` <input\n type=\"text\"\n name=${name}\n .value=${value}\n @change=${(e: CustomEvent) => {\n const input = e.target as HTMLInputElement\n input.dispatchEvent(\n new CustomEvent('filter-change', {\n bubbles: true,\n composed: true,\n detail: {\n name,\n operator,\n value: input.value\n }\n })\n )\n }}\n />`\n : operator == 'in'\n ? html``\n : operator === 'eq'\n ? html`\n <input\n style=\"min-width: 100px; min-height: 24px\"\n type=\"text\"\n name=${name}\n .value=${value}\n readonly\n @click=${(e: Event) => {\n e.stopPropagation()\n\n const confirmCallback = (selected?: { [field: string]: any }) => {\n var { idField = 'id', nameField = 'name', descriptionField = 'description' } = filter.options || {}\n\n owner.dispatchEvent(\n new CustomEvent('filter-change', {\n bubbles: true,\n composed: true,\n detail: selected ? selected[idField] : ''\n })\n )\n }\n\n openResourceSelector(filter, value, confirmCallback)\n }}\n />\n `\n : html``\n}\n"]}
|
|
File without changes
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { registerFilterRenderer } from '@operato/form';
|
|
2
|
+
import { FilterResourceSelect } from './filter-resource-select.js';
|
|
3
|
+
registerFilterRenderer('resource-object', [FilterResourceSelect]);
|
|
4
|
+
registerFilterRenderer('resource-id', [FilterResourceSelect]);
|
|
5
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/filters-form/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAA;AAEtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAA;AAElE,sBAAsB,CAAC,iBAAiB,EAAE,CAAC,oBAAoB,CAAC,CAAC,CAAA;AACjE,sBAAsB,CAAC,aAAa,EAAE,CAAC,oBAAoB,CAAC,CAAC,CAAA","sourcesContent":["import { registerFilterRenderer } from '@operato/form'\n\nimport { FilterResourceSelect } from './filter-resource-select.js'\n\nregisterFilterRenderer('resource-object', [FilterResourceSelect])\nregisterFilterRenderer('resource-id', [FilterResourceSelect])\n"]}
|
|
@@ -1,23 +1,15 @@
|
|
|
1
1
|
import { OxGristRendererJson5, registerEditor, registerRenderer } from '@operato/data-grist';
|
|
2
|
-
import { OxGristEditorCrontab } from './ox-grist-editor-crontab.js';
|
|
3
2
|
import { OxGristEditorJson } from './ox-grist-editor-json.js';
|
|
4
|
-
import { OxGristEditorParameters } from './ox-grist-editor-parameters.js';
|
|
5
|
-
import { OxGristEditorPartitionKeys } from './ox-grist-editor-partition-keys.js';
|
|
6
3
|
import { OxGristEditorResourceCode } from './ox-grist-editor-resource-code.js';
|
|
7
4
|
import { OxGristEditorResourceId } from './ox-grist-editor-resource-id.js';
|
|
8
5
|
import { OxGristEditorResourceObject } from './ox-grist-editor-resource-object.js';
|
|
9
|
-
import {
|
|
10
|
-
import { OxGristRendererCrontab } from './ox-grist-renderer-crontab.js';
|
|
6
|
+
import { OxGristRendererCrontab } from './ox-grist-renderer-crontab';
|
|
11
7
|
import { OxGristRendererResourceId } from './ox-grist-renderer-resource-id.js';
|
|
12
8
|
import { OxGristRendererResourceObject } from './ox-grist-renderer-resource-object.js';
|
|
13
9
|
/* register grist renderer/editor for id */
|
|
14
10
|
registerEditor('resource-id', OxGristEditorResourceId);
|
|
15
11
|
registerEditor('resource-object', OxGristEditorResourceObject);
|
|
16
12
|
registerEditor('resource-code', OxGristEditorResourceCode);
|
|
17
|
-
registerEditor('parameters', OxGristEditorParameters);
|
|
18
|
-
registerEditor('value-map', OxGristEditorValueMap);
|
|
19
|
-
registerEditor('partition-keys', OxGristEditorPartitionKeys);
|
|
20
|
-
registerEditor('crontab', OxGristEditorCrontab);
|
|
21
13
|
registerEditor('json', OxGristEditorJson);
|
|
22
14
|
registerRenderer('resource-id', OxGristRendererResourceId);
|
|
23
15
|
registerRenderer('resource-object', OxGristRendererResourceObject);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/grist-editor/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAE5F,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/grist-editor/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAE5F,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,EAAE,yBAAyB,EAAE,MAAM,oCAAoC,CAAA;AAC9E,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAA;AAC1E,OAAO,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAA;AAClF,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AACpE,OAAO,EAAE,yBAAyB,EAAE,MAAM,oCAAoC,CAAA;AAC9E,OAAO,EAAE,6BAA6B,EAAE,MAAM,wCAAwC,CAAA;AAEtF,2CAA2C;AAC3C,cAAc,CAAC,aAAa,EAAE,uBAAuB,CAAC,CAAA;AACtD,cAAc,CAAC,iBAAiB,EAAE,2BAA2B,CAAC,CAAA;AAC9D,cAAc,CAAC,eAAe,EAAE,yBAAyB,CAAC,CAAA;AAC1D,cAAc,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAA;AAEzC,gBAAgB,CAAC,aAAa,EAAE,yBAAyB,CAAC,CAAA;AAC1D,gBAAgB,CAAC,iBAAiB,EAAE,6BAA6B,CAAC,CAAA;AAClE,gBAAgB,CAAC,YAAY,EAAE,oBAAoB,CAAC,CAAA;AACpD,gBAAgB,CAAC,WAAW,EAAE,oBAAoB,CAAC,CAAA;AACnD,gBAAgB,CAAC,gBAAgB,EAAE,oBAAoB,CAAC,CAAA;AACxD,gBAAgB,CAAC,SAAS,EAAE,sBAAsB,CAAC,CAAA","sourcesContent":["import { OxGristRendererJson5, registerEditor, registerRenderer } from '@operato/data-grist'\n\nimport { OxGristEditorJson } from './ox-grist-editor-json.js'\nimport { OxGristEditorResourceCode } from './ox-grist-editor-resource-code.js'\nimport { OxGristEditorResourceId } from './ox-grist-editor-resource-id.js'\nimport { OxGristEditorResourceObject } from './ox-grist-editor-resource-object.js'\nimport { OxGristRendererCrontab } from './ox-grist-renderer-crontab'\nimport { OxGristRendererResourceId } from './ox-grist-renderer-resource-id.js'\nimport { OxGristRendererResourceObject } from './ox-grist-renderer-resource-object.js'\n\n/* register grist renderer/editor for id */\nregisterEditor('resource-id', OxGristEditorResourceId)\nregisterEditor('resource-object', OxGristEditorResourceObject)\nregisterEditor('resource-code', OxGristEditorResourceCode)\nregisterEditor('json', OxGristEditorJson)\n\nregisterRenderer('resource-id', OxGristRendererResourceId)\nregisterRenderer('resource-object', OxGristRendererResourceObject)\nregisterRenderer('parameters', OxGristRendererJson5)\nregisterRenderer('value-map', OxGristRendererJson5)\nregisterRenderer('partition-keys', OxGristRendererJson5)\nregisterRenderer('crontab', OxGristRendererCrontab)\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import './ox-selector-resource-object-legacy.js';
|
|
2
|
+
import { TemplateResult } from 'lit';
|
|
3
|
+
import { OxGristEditor } from '@operato/data-grist';
|
|
4
|
+
export declare class OxGristEditorResourceObjectLegacy extends OxGristEditor {
|
|
5
|
+
private popup?;
|
|
6
|
+
private template?;
|
|
7
|
+
get editorTemplate(): TemplateResult<1>;
|
|
8
|
+
firstUpdated(): Promise<void>;
|
|
9
|
+
openSelector(): void;
|
|
10
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import './ox-selector-resource-object-legacy.js';
|
|
3
|
+
import { html } from 'lit';
|
|
4
|
+
import { customElement } from 'lit/decorators.js';
|
|
5
|
+
import { OxGristEditor } from '@operato/data-grist';
|
|
6
|
+
import { i18next } from '@operato/i18n';
|
|
7
|
+
import { openPopup } from '@operato/layout';
|
|
8
|
+
let OxGristEditorResourceObjectLegacy = class OxGristEditorResourceObjectLegacy extends OxGristEditor {
|
|
9
|
+
get editorTemplate() {
|
|
10
|
+
var value = this.value || {};
|
|
11
|
+
var { nameField = 'name', descriptionField = 'description' } = this.column.record.options || {};
|
|
12
|
+
var name, description;
|
|
13
|
+
if (typeof nameField === 'function') {
|
|
14
|
+
name = nameField(value);
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
name = value[nameField];
|
|
18
|
+
}
|
|
19
|
+
if (typeof descriptionField === 'function') {
|
|
20
|
+
description = descriptionField(value);
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
description = value[descriptionField] && `(${value[descriptionField]})`;
|
|
24
|
+
}
|
|
25
|
+
return html ` ${!value ? html `` : html ` <span style="flex:1">${name || ''}${description || ''}</span> `} `;
|
|
26
|
+
}
|
|
27
|
+
async firstUpdated() {
|
|
28
|
+
this.template = ((this.column.record || {}).options || {}).template;
|
|
29
|
+
await this.updateComplete;
|
|
30
|
+
this.renderRoot.addEventListener('click', e => {
|
|
31
|
+
e.stopPropagation();
|
|
32
|
+
this.openSelector();
|
|
33
|
+
});
|
|
34
|
+
this.openSelector();
|
|
35
|
+
}
|
|
36
|
+
openSelector() {
|
|
37
|
+
if (this.popup) {
|
|
38
|
+
delete this.popup;
|
|
39
|
+
}
|
|
40
|
+
var { idField = 'id', nameField = 'name', descriptionField = 'description', valueField = 'id', queryName, basicArgs, select, list } = this.column.record.options || {};
|
|
41
|
+
const confirmCallback = (selected) => {
|
|
42
|
+
this.dispatchEvent(new CustomEvent('field-change', {
|
|
43
|
+
bubbles: true,
|
|
44
|
+
composed: true,
|
|
45
|
+
detail: {
|
|
46
|
+
before: this.value,
|
|
47
|
+
after: selected
|
|
48
|
+
? {
|
|
49
|
+
...(this.column.record.options.select || [])
|
|
50
|
+
.map((field) => field.name)
|
|
51
|
+
.reduce((obj, fieldName) => {
|
|
52
|
+
return (obj = {
|
|
53
|
+
...obj,
|
|
54
|
+
[fieldName]: selected[fieldName]
|
|
55
|
+
});
|
|
56
|
+
}, {}),
|
|
57
|
+
[idField]: selected[idField],
|
|
58
|
+
[nameField]: selected[nameField],
|
|
59
|
+
[descriptionField]: selected[descriptionField]
|
|
60
|
+
}
|
|
61
|
+
: null,
|
|
62
|
+
record: this.record,
|
|
63
|
+
column: this.column,
|
|
64
|
+
row: this.row
|
|
65
|
+
}
|
|
66
|
+
}));
|
|
67
|
+
};
|
|
68
|
+
var value = this.value || {};
|
|
69
|
+
var actualValue;
|
|
70
|
+
if (typeof valueField === 'function') {
|
|
71
|
+
actualValue = valueField(value);
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
actualValue = value[valueField];
|
|
75
|
+
}
|
|
76
|
+
var template = this.template ||
|
|
77
|
+
html `
|
|
78
|
+
<ox-selector-resource-object-legacy
|
|
79
|
+
.value=${actualValue}
|
|
80
|
+
.confirmCallback=${confirmCallback.bind(this)}
|
|
81
|
+
.queryName=${queryName}
|
|
82
|
+
.select=${select}
|
|
83
|
+
.list=${list}
|
|
84
|
+
.basicArgs=${basicArgs}
|
|
85
|
+
.valueField=${valueField}
|
|
86
|
+
></ox-selector-resource-object-legacy>
|
|
87
|
+
`;
|
|
88
|
+
this.popup = openPopup(template, {
|
|
89
|
+
backdrop: true,
|
|
90
|
+
size: 'large',
|
|
91
|
+
title: i18next.t('title.select_item')
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
OxGristEditorResourceObjectLegacy = __decorate([
|
|
96
|
+
customElement('ox-grist-editor-resource-object-legacy')
|
|
97
|
+
], OxGristEditorResourceObjectLegacy);
|
|
98
|
+
export { OxGristEditorResourceObjectLegacy };
|
|
99
|
+
//# sourceMappingURL=ox-grist-editor-resource-object-legacy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ox-grist-editor-resource-object-legacy.js","sourceRoot":"","sources":["../../../src/grist-editor/ox-grist-editor-resource-object-legacy.ts"],"names":[],"mappings":";AAAA,OAAO,yCAAyC,CAAA;AAEhD,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,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,iBAAiB,CAAA;AAGxD,IAAa,iCAAiC,GAA9C,MAAa,iCAAkC,SAAQ,aAAa;IAIlE,IAAI,cAAc;QAChB,IAAI,KAAK,GAAG,IAAI,CAAC,KAAK,IAAI,EAAE,CAAA;QAE5B,IAAI,EAAE,SAAS,GAAG,MAAM,EAAE,gBAAgB,GAAG,aAAa,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,IAAI,EAAE,CAAA;QAC/F,IAAI,IAAI,EAAE,WAAW,CAAA;QACrB,IAAI,OAAO,SAAS,KAAK,UAAU,EAAE;YACnC,IAAI,GAAG,SAAS,CAAC,KAAK,CAAC,CAAA;SACxB;aAAM;YACL,IAAI,GAAG,KAAK,CAAC,SAAS,CAAC,CAAA;SACxB;QAED,IAAI,OAAO,gBAAgB,KAAK,UAAU,EAAE;YAC1C,WAAW,GAAG,gBAAgB,CAAC,KAAK,CAAC,CAAA;SACtC;aAAM;YACL,WAAW,GAAG,KAAK,CAAC,gBAAgB,CAAC,IAAI,IAAI,KAAK,CAAC,gBAAgB,CAAC,GAAG,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AAE,OAAO;YACb,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,mBAAmB,CAAC;SACtC,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAhHY,iCAAiC;IAD7C,aAAa,CAAC,wCAAwC,CAAC;GAC3C,iCAAiC,CAgH7C;SAhHY,iCAAiC","sourcesContent":["import './ox-selector-resource-object-legacy.js'\n\nimport { html, TemplateResult } 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/layout'\n\n@customElement('ox-grist-editor-resource-object-legacy')\nexport class OxGristEditorResourceObjectLegacy extends OxGristEditor {\n private popup?: PopupHandle\n private template?: TemplateResult\n\n get editorTemplate() {\n var value = this.value || {}\n\n var { nameField = 'name', descriptionField = 'description' } = this.column.record.options || {}\n var name, description\n if (typeof nameField === 'function') {\n name = nameField(value)\n } else {\n name = value[nameField]\n }\n\n if (typeof descriptionField === 'function') {\n description = descriptionField(value)\n } else {\n description = value[descriptionField] && `(${value[descriptionField]})`\n }\n\n return html` ${!value ? html`` : html` <span style=\"flex:1\">${name || ''}${description || ''}</span> `} `\n }\n\n async firstUpdated() {\n this.template = ((this.column.record || {}).options || {}).template\n\n await this.updateComplete\n\n this.renderRoot.addEventListener('click', e => {\n e.stopPropagation()\n\n this.openSelector()\n })\n\n this.openSelector()\n }\n\n openSelector() {\n if (this.popup) {\n delete this.popup\n }\n\n var {\n idField = 'id',\n nameField = 'name',\n descriptionField = 'description',\n valueField = 'id',\n queryName,\n basicArgs,\n select,\n list\n } = this.column.record.options || {}\n\n const confirmCallback = (selected?: { [field: string]: any }) => {\n this.dispatchEvent(\n new CustomEvent('field-change', {\n bubbles: true,\n composed: true,\n detail: {\n before: this.value,\n after: selected\n ? {\n ...(this.column.record.options.select || [])\n .map((field: any) => field.name)\n .reduce((obj: { [field: string]: any }, fieldName: string) => {\n return (obj = {\n ...obj,\n [fieldName]: selected[fieldName]\n })\n }, {} as { [field: string]: any }),\n [idField]: selected[idField],\n [nameField]: selected[nameField],\n [descriptionField]: selected[descriptionField]\n }\n : null,\n record: this.record,\n column: this.column,\n row: this.row\n }\n })\n )\n }\n\n var value = this.value || {}\n var actualValue\n if (typeof valueField === 'function') {\n actualValue = valueField(value)\n } else {\n actualValue = value[valueField]\n }\n\n var template =\n this.template ||\n html`\n <ox-selector-resource-object-legacy\n .value=${actualValue}\n .confirmCallback=${confirmCallback.bind(this)}\n .queryName=${queryName}\n .select=${select}\n .list=${list}\n .basicArgs=${basicArgs}\n .valueField=${valueField}\n ></ox-selector-resource-object-legacy>\n `\n\n this.popup = openPopup(template, {\n backdrop: true,\n size: 'large',\n title: i18next.t('title.select_item')\n })\n }\n}\n"]}
|