@truedat/qx 8.10.2 → 8.10.4
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/package.json +3 -3
- package/src/components/QxRoutes.js +8 -7
- package/src/components/__tests__/QxRoutes.spec.js +2 -1
- package/src/components/__tests__/__fixtures__/helper.js +13 -0
- package/src/components/__tests__/__snapshots__/QxRoutes.spec.js.snap +1 -1
- package/src/components/common/ClauseViewer.js +52 -8
- package/src/components/common/DescriptionInput.js +9 -34
- package/src/components/common/TypeSelector.js +20 -10
- package/src/components/common/__tests__/ClauseViewer.spec.js +150 -0
- package/src/components/common/__tests__/DescriptionInput.spec.js +2 -5
- package/src/components/common/__tests__/__snapshots__/DescriptionInput.spec.js.snap +7 -10
- package/src/components/common/expressions/Clauses.js +22 -17
- package/src/components/common/expressions/Condition.js +201 -102
- package/src/components/common/expressions/Expression.js +17 -23
- package/src/components/common/expressions/FunctionSelector.js +3 -3
- package/src/components/common/expressions/ShapeSelector.js +1 -1
- package/src/components/common/expressions/__tests__/Clauses.spec.js +1 -1
- package/src/components/common/expressions/__tests__/Condition.spec.js +83 -26
- package/src/components/common/expressions/__tests__/ParamSelector.spec.js +1 -1
- package/src/components/common/expressions/__tests__/__snapshots__/Clauses.spec.js.snap +18 -22
- package/src/components/common/expressions/__tests__/__snapshots__/Condition.spec.js.snap +215 -216
- package/src/components/common/expressions/__tests__/__snapshots__/ConstantSelector.spec.js.snap +6 -10
- package/src/components/common/expressions/__tests__/__snapshots__/Expression.spec.js.snap +630 -654
- package/src/components/common/expressions/__tests__/__snapshots__/FunctionArgs.spec.js.snap +193 -201
- package/src/components/common/expressions/__tests__/__snapshots__/FunctionSelector.spec.js.snap +450 -466
- package/src/components/common/expressions/__tests__/__snapshots__/ShapeSelector.spec.js.snap +34 -34
- package/src/components/common/expressions/constantInputs/AnySelector.js +1 -0
- package/src/components/common/expressions/constantInputs/__tests__/__snapshots__/AnySelector.spec.js.snap +15 -15
- package/src/components/dataViews/__tests__/__snapshots__/AdvancedDataViewEditor.spec.js.snap +378 -406
- package/src/components/dataViews/__tests__/__snapshots__/DataViewSummary.spec.js.snap +6 -6
- package/src/components/dataViews/__tests__/__snapshots__/Queryable.spec.js.snap +489 -577
- package/src/components/dataViews/__tests__/__snapshots__/Queryables.spec.js.snap +400 -476
- package/src/components/dataViews/advancedForm/Queryable.js +56 -64
- package/src/components/dataViews/advancedForm/Queryables.js +11 -2
- package/src/components/dataViews/queryableProperties/Join.js +16 -6
- package/src/components/dataViews/queryableProperties/__tests__/__snapshots__/Join.spec.js.snap +0 -28
- package/src/components/dataViews/queryableProperties/__tests__/__snapshots__/Select.spec.js.snap +270 -282
- package/src/components/dataViews/queryableProperties/__tests__/__snapshots__/SelectField.spec.js.snap +172 -180
- package/src/components/dataViews/simpleForm/DatasetForm.js +4 -0
- package/src/components/dataViews/simpleForm/FormQueryable.js +49 -53
- package/src/components/dataViews/summary/Where.js +3 -2
- package/src/components/functions/FunctionEdit.js +92 -0
- package/src/components/functions/FunctionEditor.js +32 -10
- package/src/components/functions/FunctionParams.js +54 -61
- package/src/components/functions/FunctionsList.js +213 -0
- package/src/components/functions/__tests__/FunctionEdit.spec.js +168 -0
- package/src/components/functions/__tests__/FunctionParams.spec.js +1 -8
- package/src/components/functions/__tests__/FunctionsList.spec.js +62 -0
- package/src/components/functions/__tests__/__snapshots__/FunctionEditor.spec.js.snap +553 -469
- package/src/components/functions/__tests__/__snapshots__/FunctionParams.spec.js.snap +139 -161
- package/src/components/functions/__tests__/__snapshots__/FunctionsList.spec.js.snap +588 -0
- package/src/components/qualityControls/__tests__/NewQualityControl.spec.js +4 -0
- package/src/components/qualityControls/__tests__/QualityControlEditor.spec.js +8 -1
- package/src/components/qualityControls/__tests__/__snapshots__/EditQualityControl.spec.js.snap +109 -118
- package/src/components/qualityControls/__tests__/__snapshots__/NewDraftQualityControl.spec.js.snap +109 -118
- package/src/components/qualityControls/__tests__/__snapshots__/QualityControlEditor.spec.js.snap +471 -468
- package/src/hooks/useFunctions.js +6 -0
- package/src/styles/Expression.less +39 -6
- package/src/components/functions/Functions.js +0 -143
- package/src/components/functions/__tests__/Functions.spec.js +0 -56
- package/src/components/functions/__tests__/__snapshots__/Functions.spec.js.snap +0 -85
|
@@ -16,133 +16,129 @@ exports[`<SelectField /> matches the latest snapshot for group_by 1`] = `
|
|
|
16
16
|
class="nine wide column"
|
|
17
17
|
>
|
|
18
18
|
<div
|
|
19
|
-
class="
|
|
19
|
+
class="expression-container"
|
|
20
20
|
>
|
|
21
21
|
<div
|
|
22
|
-
class="
|
|
22
|
+
class="expression-content"
|
|
23
23
|
>
|
|
24
24
|
<div
|
|
25
|
-
|
|
25
|
+
aria-expanded="false"
|
|
26
|
+
class="ui top left pointing dropdown"
|
|
27
|
+
role="listbox"
|
|
28
|
+
tabindex="0"
|
|
26
29
|
>
|
|
27
30
|
<div
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
class="shape-selector-trigger"
|
|
32
|
+
>
|
|
33
|
+
f(x)
|
|
34
|
+
</div>
|
|
35
|
+
<div
|
|
36
|
+
class="menu transition"
|
|
32
37
|
>
|
|
33
38
|
<div
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
class="menu transition"
|
|
39
|
+
aria-checked="true"
|
|
40
|
+
aria-selected="true"
|
|
41
|
+
class="active selected item"
|
|
42
|
+
role="option"
|
|
43
|
+
style="pointer-events: all;"
|
|
40
44
|
>
|
|
41
45
|
<div
|
|
42
|
-
|
|
43
|
-
aria-selected="false"
|
|
44
|
-
class="item"
|
|
45
|
-
role="option"
|
|
46
|
-
style="pointer-events: all;"
|
|
46
|
+
class="text flex-center"
|
|
47
47
|
>
|
|
48
|
-
<
|
|
49
|
-
|
|
48
|
+
<small
|
|
49
|
+
style="margin-right: 5px;"
|
|
50
50
|
>
|
|
51
|
-
<
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
</b>
|
|
59
|
-
</small>
|
|
60
|
-
functions.expression.shape.constant
|
|
61
|
-
</div>
|
|
51
|
+
<b>
|
|
52
|
+
<code>
|
|
53
|
+
f(x)
|
|
54
|
+
</code>
|
|
55
|
+
</b>
|
|
56
|
+
</small>
|
|
57
|
+
functions.expression.shape.function
|
|
62
58
|
</div>
|
|
59
|
+
</div>
|
|
60
|
+
<div
|
|
61
|
+
aria-checked="false"
|
|
62
|
+
aria-selected="false"
|
|
63
|
+
class="item"
|
|
64
|
+
role="option"
|
|
65
|
+
style="pointer-events: all;"
|
|
66
|
+
>
|
|
63
67
|
<div
|
|
64
|
-
|
|
65
|
-
aria-selected="true"
|
|
66
|
-
class="active selected item"
|
|
67
|
-
role="option"
|
|
68
|
-
style="pointer-events: all;"
|
|
68
|
+
class="text flex-center"
|
|
69
69
|
>
|
|
70
|
-
<
|
|
71
|
-
|
|
70
|
+
<small
|
|
71
|
+
style="margin-right: 5px;"
|
|
72
72
|
>
|
|
73
|
-
<
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
</b>
|
|
81
|
-
</small>
|
|
82
|
-
functions.expression.shape.function
|
|
83
|
-
</div>
|
|
73
|
+
<b>
|
|
74
|
+
<code>
|
|
75
|
+
[π]
|
|
76
|
+
</code>
|
|
77
|
+
</b>
|
|
78
|
+
</small>
|
|
79
|
+
functions.expression.shape.constant
|
|
84
80
|
</div>
|
|
85
81
|
</div>
|
|
86
82
|
</div>
|
|
83
|
+
</div>
|
|
84
|
+
<div
|
|
85
|
+
class="accordion ui fluid no-margin"
|
|
86
|
+
>
|
|
87
87
|
<div
|
|
88
|
-
class="
|
|
88
|
+
class="active title no-padding"
|
|
89
89
|
>
|
|
90
90
|
<div
|
|
91
|
-
class="
|
|
91
|
+
class="flex-center"
|
|
92
92
|
>
|
|
93
|
+
<i
|
|
94
|
+
aria-hidden="true"
|
|
95
|
+
class="dropdown icon"
|
|
96
|
+
/>
|
|
93
97
|
<div
|
|
94
|
-
class="
|
|
98
|
+
class="sixteen wide field"
|
|
95
99
|
>
|
|
96
|
-
<i
|
|
97
|
-
aria-hidden="true"
|
|
98
|
-
class="dropdown icon"
|
|
99
|
-
/>
|
|
100
100
|
<div
|
|
101
|
-
|
|
101
|
+
aria-expanded="false"
|
|
102
|
+
class="ui fluid search selection dropdown"
|
|
103
|
+
role="combobox"
|
|
102
104
|
>
|
|
105
|
+
<input
|
|
106
|
+
aria-autocomplete="list"
|
|
107
|
+
autocomplete="off"
|
|
108
|
+
class="search"
|
|
109
|
+
tabindex="0"
|
|
110
|
+
type="text"
|
|
111
|
+
value=""
|
|
112
|
+
/>
|
|
103
113
|
<div
|
|
104
|
-
aria-
|
|
105
|
-
|
|
106
|
-
|
|
114
|
+
aria-atomic="true"
|
|
115
|
+
aria-live="polite"
|
|
116
|
+
class="divider text"
|
|
117
|
+
role="alert"
|
|
118
|
+
>
|
|
119
|
+
functions.form.expression.function.placeholder
|
|
120
|
+
</div>
|
|
121
|
+
<i
|
|
122
|
+
aria-hidden="true"
|
|
123
|
+
class="dropdown icon"
|
|
124
|
+
/>
|
|
125
|
+
<div
|
|
126
|
+
class="menu transition"
|
|
127
|
+
role="listbox"
|
|
107
128
|
>
|
|
108
|
-
<input
|
|
109
|
-
aria-autocomplete="list"
|
|
110
|
-
autocomplete="off"
|
|
111
|
-
class="search"
|
|
112
|
-
tabindex="0"
|
|
113
|
-
type="text"
|
|
114
|
-
value=""
|
|
115
|
-
/>
|
|
116
|
-
<div
|
|
117
|
-
aria-atomic="true"
|
|
118
|
-
aria-live="polite"
|
|
119
|
-
class="divider text"
|
|
120
|
-
role="alert"
|
|
121
|
-
>
|
|
122
|
-
functions.form.expression.function.placeholder
|
|
123
|
-
</div>
|
|
124
|
-
<i
|
|
125
|
-
aria-hidden="true"
|
|
126
|
-
class="dropdown icon"
|
|
127
|
-
/>
|
|
128
129
|
<div
|
|
129
|
-
class="
|
|
130
|
-
role="listbox"
|
|
130
|
+
class="message"
|
|
131
131
|
>
|
|
132
|
-
|
|
133
|
-
class="message"
|
|
134
|
-
>
|
|
135
|
-
No results found.
|
|
136
|
-
</div>
|
|
132
|
+
No results found.
|
|
137
133
|
</div>
|
|
138
134
|
</div>
|
|
139
135
|
</div>
|
|
140
136
|
</div>
|
|
141
137
|
</div>
|
|
142
|
-
<div
|
|
143
|
-
class="content active no-padding"
|
|
144
|
-
/>
|
|
145
138
|
</div>
|
|
139
|
+
<div
|
|
140
|
+
class="content active no-padding"
|
|
141
|
+
/>
|
|
146
142
|
</div>
|
|
147
143
|
</div>
|
|
148
144
|
</div>
|
|
@@ -190,133 +186,129 @@ exports[`<SelectField /> matches the latest snapshot for select 1`] = `
|
|
|
190
186
|
class="nine wide column"
|
|
191
187
|
>
|
|
192
188
|
<div
|
|
193
|
-
class="
|
|
189
|
+
class="expression-container"
|
|
194
190
|
>
|
|
195
191
|
<div
|
|
196
|
-
class="
|
|
192
|
+
class="expression-content"
|
|
197
193
|
>
|
|
198
194
|
<div
|
|
199
|
-
|
|
195
|
+
aria-expanded="false"
|
|
196
|
+
class="ui top left pointing dropdown"
|
|
197
|
+
role="listbox"
|
|
198
|
+
tabindex="0"
|
|
200
199
|
>
|
|
201
200
|
<div
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
201
|
+
class="shape-selector-trigger"
|
|
202
|
+
>
|
|
203
|
+
f(x)
|
|
204
|
+
</div>
|
|
205
|
+
<div
|
|
206
|
+
class="menu transition"
|
|
206
207
|
>
|
|
207
208
|
<div
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
class="menu transition"
|
|
209
|
+
aria-checked="true"
|
|
210
|
+
aria-selected="true"
|
|
211
|
+
class="active selected item"
|
|
212
|
+
role="option"
|
|
213
|
+
style="pointer-events: all;"
|
|
214
214
|
>
|
|
215
215
|
<div
|
|
216
|
-
|
|
217
|
-
aria-selected="false"
|
|
218
|
-
class="item"
|
|
219
|
-
role="option"
|
|
220
|
-
style="pointer-events: all;"
|
|
216
|
+
class="text flex-center"
|
|
221
217
|
>
|
|
222
|
-
<
|
|
223
|
-
|
|
218
|
+
<small
|
|
219
|
+
style="margin-right: 5px;"
|
|
224
220
|
>
|
|
225
|
-
<
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
</b>
|
|
233
|
-
</small>
|
|
234
|
-
functions.expression.shape.constant
|
|
235
|
-
</div>
|
|
221
|
+
<b>
|
|
222
|
+
<code>
|
|
223
|
+
f(x)
|
|
224
|
+
</code>
|
|
225
|
+
</b>
|
|
226
|
+
</small>
|
|
227
|
+
functions.expression.shape.function
|
|
236
228
|
</div>
|
|
229
|
+
</div>
|
|
230
|
+
<div
|
|
231
|
+
aria-checked="false"
|
|
232
|
+
aria-selected="false"
|
|
233
|
+
class="item"
|
|
234
|
+
role="option"
|
|
235
|
+
style="pointer-events: all;"
|
|
236
|
+
>
|
|
237
237
|
<div
|
|
238
|
-
|
|
239
|
-
aria-selected="true"
|
|
240
|
-
class="active selected item"
|
|
241
|
-
role="option"
|
|
242
|
-
style="pointer-events: all;"
|
|
238
|
+
class="text flex-center"
|
|
243
239
|
>
|
|
244
|
-
<
|
|
245
|
-
|
|
240
|
+
<small
|
|
241
|
+
style="margin-right: 5px;"
|
|
246
242
|
>
|
|
247
|
-
<
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
</b>
|
|
255
|
-
</small>
|
|
256
|
-
functions.expression.shape.function
|
|
257
|
-
</div>
|
|
243
|
+
<b>
|
|
244
|
+
<code>
|
|
245
|
+
[π]
|
|
246
|
+
</code>
|
|
247
|
+
</b>
|
|
248
|
+
</small>
|
|
249
|
+
functions.expression.shape.constant
|
|
258
250
|
</div>
|
|
259
251
|
</div>
|
|
260
252
|
</div>
|
|
253
|
+
</div>
|
|
254
|
+
<div
|
|
255
|
+
class="accordion ui fluid no-margin"
|
|
256
|
+
>
|
|
261
257
|
<div
|
|
262
|
-
class="
|
|
258
|
+
class="active title no-padding"
|
|
263
259
|
>
|
|
264
260
|
<div
|
|
265
|
-
class="
|
|
261
|
+
class="flex-center"
|
|
266
262
|
>
|
|
263
|
+
<i
|
|
264
|
+
aria-hidden="true"
|
|
265
|
+
class="dropdown icon"
|
|
266
|
+
/>
|
|
267
267
|
<div
|
|
268
|
-
class="
|
|
268
|
+
class="sixteen wide field"
|
|
269
269
|
>
|
|
270
|
-
<i
|
|
271
|
-
aria-hidden="true"
|
|
272
|
-
class="dropdown icon"
|
|
273
|
-
/>
|
|
274
270
|
<div
|
|
275
|
-
|
|
271
|
+
aria-expanded="false"
|
|
272
|
+
class="ui fluid search selection dropdown"
|
|
273
|
+
role="combobox"
|
|
276
274
|
>
|
|
275
|
+
<input
|
|
276
|
+
aria-autocomplete="list"
|
|
277
|
+
autocomplete="off"
|
|
278
|
+
class="search"
|
|
279
|
+
tabindex="0"
|
|
280
|
+
type="text"
|
|
281
|
+
value=""
|
|
282
|
+
/>
|
|
277
283
|
<div
|
|
278
|
-
aria-
|
|
279
|
-
|
|
280
|
-
|
|
284
|
+
aria-atomic="true"
|
|
285
|
+
aria-live="polite"
|
|
286
|
+
class="divider text"
|
|
287
|
+
role="alert"
|
|
288
|
+
>
|
|
289
|
+
functions.form.expression.function.placeholder
|
|
290
|
+
</div>
|
|
291
|
+
<i
|
|
292
|
+
aria-hidden="true"
|
|
293
|
+
class="dropdown icon"
|
|
294
|
+
/>
|
|
295
|
+
<div
|
|
296
|
+
class="menu transition"
|
|
297
|
+
role="listbox"
|
|
281
298
|
>
|
|
282
|
-
<input
|
|
283
|
-
aria-autocomplete="list"
|
|
284
|
-
autocomplete="off"
|
|
285
|
-
class="search"
|
|
286
|
-
tabindex="0"
|
|
287
|
-
type="text"
|
|
288
|
-
value=""
|
|
289
|
-
/>
|
|
290
|
-
<div
|
|
291
|
-
aria-atomic="true"
|
|
292
|
-
aria-live="polite"
|
|
293
|
-
class="divider text"
|
|
294
|
-
role="alert"
|
|
295
|
-
>
|
|
296
|
-
functions.form.expression.function.placeholder
|
|
297
|
-
</div>
|
|
298
|
-
<i
|
|
299
|
-
aria-hidden="true"
|
|
300
|
-
class="dropdown icon"
|
|
301
|
-
/>
|
|
302
299
|
<div
|
|
303
|
-
class="
|
|
304
|
-
role="listbox"
|
|
300
|
+
class="message"
|
|
305
301
|
>
|
|
306
|
-
|
|
307
|
-
class="message"
|
|
308
|
-
>
|
|
309
|
-
No results found.
|
|
310
|
-
</div>
|
|
302
|
+
No results found.
|
|
311
303
|
</div>
|
|
312
304
|
</div>
|
|
313
305
|
</div>
|
|
314
306
|
</div>
|
|
315
307
|
</div>
|
|
316
|
-
<div
|
|
317
|
-
class="content active no-padding"
|
|
318
|
-
/>
|
|
319
308
|
</div>
|
|
309
|
+
<div
|
|
310
|
+
class="content active no-padding"
|
|
311
|
+
/>
|
|
320
312
|
</div>
|
|
321
313
|
</div>
|
|
322
314
|
</div>
|
|
@@ -32,6 +32,9 @@ const DatasetForm = ({
|
|
|
32
32
|
const joinIndex = _.findIndex((f) => f?.type == "join")(dataset);
|
|
33
33
|
const whereIndex = _.findIndex((f) => f?.type == "where")(dataset);
|
|
34
34
|
const joins = _.filter((f) => f?.type == "join")(dataset);
|
|
35
|
+
const hasUnresourcedJoin = _.some(
|
|
36
|
+
(q) => q.type === "join" && !q.properties?.resource?.id,
|
|
37
|
+
)(queryables);
|
|
35
38
|
const wheres = _.filter((f) => f?.type == "where")(dataset);
|
|
36
39
|
const joinRange =
|
|
37
40
|
joinIndex === -1 ? [] : _.range(joinIndex, joinIndex + _.size(joins));
|
|
@@ -139,6 +142,7 @@ const DatasetForm = ({
|
|
|
139
142
|
content={formatMessage({
|
|
140
143
|
id: "queryables.form.action.add_join",
|
|
141
144
|
})}
|
|
145
|
+
disabled={hasUnresourcedJoin}
|
|
142
146
|
onClick={() => {
|
|
143
147
|
onQueryableAdd("join");
|
|
144
148
|
}}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _ from "lodash/fp";
|
|
2
2
|
import { use } from "react";
|
|
3
3
|
import { useIntl } from "react-intl";
|
|
4
|
-
import { Button,
|
|
4
|
+
import { Button, Form } from "semantic-ui-react";
|
|
5
5
|
import { useFormContext, Controller } from "react-hook-form";
|
|
6
6
|
import QxContext from "@truedat/qx/components/QxContext";
|
|
7
7
|
import { From, GroupBy, Join, Where } from "../queryableProperties";
|
|
@@ -55,59 +55,55 @@ const FormQueryable = ({ index = 0, prefix, type = "from", onDelete }) => {
|
|
|
55
55
|
: null;
|
|
56
56
|
|
|
57
57
|
return (
|
|
58
|
-
<
|
|
59
|
-
|
|
60
|
-
<
|
|
61
|
-
{
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
58
|
+
<div>
|
|
59
|
+
{type !== "from" && onDelete ? (
|
|
60
|
+
<Button
|
|
61
|
+
onClick={onDelete}
|
|
62
|
+
icon="trash alternate outline"
|
|
63
|
+
basic
|
|
64
|
+
color="red"
|
|
65
|
+
aria-label="delete"
|
|
66
|
+
floated="right"
|
|
67
|
+
/>
|
|
68
|
+
) : null}
|
|
69
|
+
<div className="vertical-space">
|
|
70
|
+
<Controller
|
|
71
|
+
control={control}
|
|
72
|
+
name={`${prefix}.alias`}
|
|
73
|
+
rules={{
|
|
74
|
+
validate: () => validateAlias || validateResource,
|
|
75
|
+
}}
|
|
76
|
+
render={({
|
|
77
|
+
field: { onBlur, onChange, value },
|
|
78
|
+
fieldState: { error },
|
|
79
|
+
}) => (
|
|
80
|
+
<Form.Input
|
|
81
|
+
label={formatMessage({
|
|
82
|
+
id: "dataViews.form.queryable.alias",
|
|
83
|
+
})}
|
|
84
|
+
autoComplete="off"
|
|
85
|
+
placeholder={formatMessage({
|
|
86
|
+
id: "dataViews.form.queryable.alias",
|
|
87
|
+
})}
|
|
88
|
+
error={error?.message}
|
|
89
|
+
onBlur={onBlur}
|
|
90
|
+
onChange={(_e, { value }) => onChange(value)}
|
|
91
|
+
value={value}
|
|
69
92
|
/>
|
|
70
|
-
)
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
id: "dataViews.form.queryable.alias",
|
|
85
|
-
})}
|
|
86
|
-
autoComplete="off"
|
|
87
|
-
placeholder={formatMessage({
|
|
88
|
-
id: "dataViews.form.queryable.alias",
|
|
89
|
-
})}
|
|
90
|
-
error={error?.message}
|
|
91
|
-
onBlur={onBlur}
|
|
92
|
-
onChange={(_e, { value }) => onChange(value)}
|
|
93
|
-
value={value}
|
|
94
|
-
/>
|
|
95
|
-
)}
|
|
96
|
-
/>
|
|
97
|
-
</Grid.Row>
|
|
98
|
-
<Grid.Row className="vertical-space">
|
|
99
|
-
<QxContext
|
|
100
|
-
value={{ ...context, field: `${prefix}.properties`, fields }}
|
|
101
|
-
>
|
|
102
|
-
{type === "from" && <From />}
|
|
103
|
-
{type === "join" && <Join />}
|
|
104
|
-
{type === "group_by" && <GroupBy />}
|
|
105
|
-
{type === "where" && <Where />}
|
|
106
|
-
</QxContext>
|
|
107
|
-
</Grid.Row>
|
|
108
|
-
</Segment>
|
|
109
|
-
</Grid.Column>
|
|
110
|
-
</Grid>
|
|
93
|
+
)}
|
|
94
|
+
/>
|
|
95
|
+
</div>
|
|
96
|
+
<div className="vertical-space">
|
|
97
|
+
<QxContext
|
|
98
|
+
value={{ ...context, field: `${prefix}.properties`, fields }}
|
|
99
|
+
>
|
|
100
|
+
{type === "from" && <From />}
|
|
101
|
+
{type === "join" && <Join />}
|
|
102
|
+
{type === "group_by" && <GroupBy />}
|
|
103
|
+
{type === "where" && <Where />}
|
|
104
|
+
</QxContext>
|
|
105
|
+
</div>
|
|
106
|
+
</div>
|
|
111
107
|
);
|
|
112
108
|
};
|
|
113
109
|
|
|
@@ -17,8 +17,9 @@ const hasValidClauses = (clauses) => {
|
|
|
17
17
|
_.some(
|
|
18
18
|
(expr) =>
|
|
19
19
|
!_.isNil(expr?.value?.name) &&
|
|
20
|
-
(!_.isNil(
|
|
21
|
-
|
|
20
|
+
_.some((arg) => !_.isNil(arg?.value))(
|
|
21
|
+
_.values(expr?.value?.args ?? {}),
|
|
22
|
+
),
|
|
22
23
|
)(expressions)
|
|
23
24
|
);
|
|
24
25
|
})(clauses);
|