@truedat/qx 5.12.2 → 5.12.6
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 +8 -3
- package/src/api.js +3 -1
- package/src/components/QxContext.js +3 -0
- package/src/components/QxRoutes.js +6 -1
- package/src/components/common/DescriptionInput.js +47 -0
- package/src/components/common/TestFormWrapper.js +33 -0
- package/src/components/common/TypeSelector.js +33 -0
- package/src/components/common/index.js +4 -0
- package/src/components/functions/FunctionEditor.js +200 -0
- package/src/components/functions/FunctionParams.js +122 -0
- package/src/components/functions/Functions.js +152 -0
- package/src/components/functions/__tests__/FunctionEditor.spec.js +195 -0
- package/src/components/functions/__tests__/FunctionParams.spec.js +108 -0
- package/src/components/functions/__tests__/Functions.spec.js +95 -0
- package/src/components/functions/__tests__/__snapshots__/FunctionEditor.spec.js.snap +1563 -0
- package/src/components/functions/__tests__/__snapshots__/FunctionParams.spec.js.snap +228 -0
- package/src/components/functions/__tests__/__snapshots__/Functions.spec.js.snap +86 -0
- package/src/components/functions/__tests__/useWatchParams.spec.js +23 -0
- package/src/components/functions/expressions/ConstantSelector.js +26 -0
- package/src/components/functions/expressions/Expression.js +40 -0
- package/src/components/functions/expressions/FieldSelector.js +56 -0
- package/src/components/functions/expressions/FunctionArgs.js +49 -0
- package/src/components/functions/expressions/FunctionSelector.js +95 -0
- package/src/components/functions/expressions/ParamSelector.js +51 -0
- package/src/components/functions/expressions/ShapeSelector.js +74 -0
- package/src/components/functions/expressions/__tests__/ConstantSelector.spec.js +64 -0
- package/src/components/functions/expressions/__tests__/Expression.spec.js +131 -0
- package/src/components/functions/expressions/__tests__/FunctionArgs.spec.js +86 -0
- package/src/components/functions/expressions/__tests__/FunctionSelector.spec.js +69 -0
- package/src/components/functions/expressions/__tests__/ParamSelector.spec.js +115 -0
- package/src/components/functions/expressions/__tests__/ShapeSelector.spec.js +107 -0
- package/src/components/functions/expressions/__tests__/__snapshots__/ConstantSelector.spec.js.snap +149 -0
- package/src/components/functions/expressions/__tests__/__snapshots__/Expression.spec.js.snap +904 -0
- package/src/components/functions/expressions/__tests__/__snapshots__/FunctionArgs.spec.js.snap +392 -0
- package/src/components/functions/expressions/__tests__/__snapshots__/FunctionSelector.spec.js.snap +377 -0
- package/src/components/functions/expressions/__tests__/__snapshots__/ParamSelector.spec.js.snap +95 -0
- package/src/components/functions/expressions/__tests__/__snapshots__/ShapeSelector.spec.js.snap +290 -0
- package/src/components/functions/expressions/constantInputs/AnySelector.js +29 -0
- package/src/components/functions/expressions/constantInputs/BooleanSelector.js +37 -0
- package/src/components/functions/expressions/constantInputs/DefaultSelector.js +34 -0
- package/src/components/functions/expressions/constantInputs/__tests__/AnySelector.spec.js +63 -0
- package/src/components/functions/expressions/constantInputs/__tests__/BooleanSelector.spec.js +51 -0
- package/src/components/functions/expressions/constantInputs/__tests__/DefaultSelector.spec.js +56 -0
- package/src/components/functions/expressions/constantInputs/__tests__/__snapshots__/AnySelector.spec.js.snap +236 -0
- package/src/components/functions/expressions/constantInputs/__tests__/__snapshots__/BooleanSelector.spec.js.snap +101 -0
- package/src/components/functions/expressions/constantInputs/__tests__/__snapshots__/DefaultSelector.spec.js.snap +39 -0
- package/src/components/functions/expressions/constantInputs/index.js +5 -0
- package/src/components/functions/useWatchParams.js +13 -0
- package/src/hooks/__tests__/useFunctions.spec.js +101 -0
- package/src/hooks/useFunctions.js +33 -0
- package/src/styles/Expression.less +102 -0
- package/src/types.js +38 -0
package/src/components/functions/expressions/__tests__/__snapshots__/FunctionSelector.spec.js.snap
ADDED
|
@@ -0,0 +1,377 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`<FunctionSelector /> matches the latest snapshot 1`] = `
|
|
4
|
+
<div>
|
|
5
|
+
<div
|
|
6
|
+
class="accordion ui fluid no-margin"
|
|
7
|
+
>
|
|
8
|
+
<div
|
|
9
|
+
class="active title no-padding"
|
|
10
|
+
>
|
|
11
|
+
<div
|
|
12
|
+
class="flex-center"
|
|
13
|
+
>
|
|
14
|
+
<i
|
|
15
|
+
aria-hidden="true"
|
|
16
|
+
class="dropdown icon"
|
|
17
|
+
/>
|
|
18
|
+
<div
|
|
19
|
+
aria-expanded="false"
|
|
20
|
+
class="ui fluid search selection dropdown"
|
|
21
|
+
role="combobox"
|
|
22
|
+
>
|
|
23
|
+
<input
|
|
24
|
+
aria-autocomplete="list"
|
|
25
|
+
autocomplete="off"
|
|
26
|
+
class="search"
|
|
27
|
+
tabindex="0"
|
|
28
|
+
type="text"
|
|
29
|
+
value=""
|
|
30
|
+
/>
|
|
31
|
+
<div
|
|
32
|
+
aria-atomic="true"
|
|
33
|
+
aria-live="polite"
|
|
34
|
+
class="divider text"
|
|
35
|
+
role="alert"
|
|
36
|
+
>
|
|
37
|
+
function.placeholder
|
|
38
|
+
</div>
|
|
39
|
+
<i
|
|
40
|
+
aria-hidden="true"
|
|
41
|
+
class="dropdown icon"
|
|
42
|
+
/>
|
|
43
|
+
<div
|
|
44
|
+
class="menu transition"
|
|
45
|
+
role="listbox"
|
|
46
|
+
>
|
|
47
|
+
<div
|
|
48
|
+
class="message"
|
|
49
|
+
>
|
|
50
|
+
No results found.
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
<div
|
|
57
|
+
class="content active no-padding"
|
|
58
|
+
/>
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
`;
|
|
62
|
+
|
|
63
|
+
exports[`<FunctionSelector /> user interaction 1`] = `
|
|
64
|
+
<div>
|
|
65
|
+
<div
|
|
66
|
+
class="accordion ui fluid no-margin"
|
|
67
|
+
style="display: none;"
|
|
68
|
+
>
|
|
69
|
+
<div
|
|
70
|
+
class="active title no-padding"
|
|
71
|
+
>
|
|
72
|
+
<div
|
|
73
|
+
class="flex-center"
|
|
74
|
+
>
|
|
75
|
+
<i
|
|
76
|
+
aria-hidden="true"
|
|
77
|
+
class="dropdown icon"
|
|
78
|
+
/>
|
|
79
|
+
<div
|
|
80
|
+
aria-expanded="true"
|
|
81
|
+
class="ui active visible fluid search selection dropdown"
|
|
82
|
+
role="combobox"
|
|
83
|
+
>
|
|
84
|
+
<input
|
|
85
|
+
aria-autocomplete="list"
|
|
86
|
+
autocomplete="off"
|
|
87
|
+
class="search"
|
|
88
|
+
tabindex="0"
|
|
89
|
+
type="text"
|
|
90
|
+
value=""
|
|
91
|
+
/>
|
|
92
|
+
<div
|
|
93
|
+
aria-atomic="true"
|
|
94
|
+
aria-live="polite"
|
|
95
|
+
class="divider text"
|
|
96
|
+
role="alert"
|
|
97
|
+
>
|
|
98
|
+
eq:boolean
|
|
99
|
+
</div>
|
|
100
|
+
<i
|
|
101
|
+
aria-hidden="true"
|
|
102
|
+
class="dropdown icon"
|
|
103
|
+
/>
|
|
104
|
+
<div
|
|
105
|
+
class="visible menu transition"
|
|
106
|
+
role="listbox"
|
|
107
|
+
>
|
|
108
|
+
<div
|
|
109
|
+
aria-checked="true"
|
|
110
|
+
aria-selected="true"
|
|
111
|
+
class="active selected item"
|
|
112
|
+
role="option"
|
|
113
|
+
style="pointer-events: all;"
|
|
114
|
+
>
|
|
115
|
+
<div
|
|
116
|
+
class="ui header"
|
|
117
|
+
>
|
|
118
|
+
<div
|
|
119
|
+
class="flex-center"
|
|
120
|
+
>
|
|
121
|
+
<div>
|
|
122
|
+
eq
|
|
123
|
+
</div>
|
|
124
|
+
<div
|
|
125
|
+
class="function-params-label"
|
|
126
|
+
>
|
|
127
|
+
<div
|
|
128
|
+
class="ui grey label"
|
|
129
|
+
>
|
|
130
|
+
<i
|
|
131
|
+
aria-hidden="true"
|
|
132
|
+
class="question circle outline icon"
|
|
133
|
+
/>
|
|
134
|
+
arg1
|
|
135
|
+
</div>
|
|
136
|
+
<div
|
|
137
|
+
class="ui grey label"
|
|
138
|
+
>
|
|
139
|
+
<i
|
|
140
|
+
aria-hidden="true"
|
|
141
|
+
class="question circle outline icon"
|
|
142
|
+
/>
|
|
143
|
+
arg2
|
|
144
|
+
</div>
|
|
145
|
+
</div>
|
|
146
|
+
</div>
|
|
147
|
+
</div>
|
|
148
|
+
<div
|
|
149
|
+
class="sub header"
|
|
150
|
+
/>
|
|
151
|
+
</div>
|
|
152
|
+
</div>
|
|
153
|
+
</div>
|
|
154
|
+
</div>
|
|
155
|
+
</div>
|
|
156
|
+
<div
|
|
157
|
+
class="content active no-padding"
|
|
158
|
+
>
|
|
159
|
+
<ul
|
|
160
|
+
class="function-tree"
|
|
161
|
+
>
|
|
162
|
+
<li>
|
|
163
|
+
<div
|
|
164
|
+
class="flex-column"
|
|
165
|
+
>
|
|
166
|
+
<div
|
|
167
|
+
class="param-label-header"
|
|
168
|
+
>
|
|
169
|
+
<div
|
|
170
|
+
class="ui large image label"
|
|
171
|
+
>
|
|
172
|
+
<i
|
|
173
|
+
aria-hidden="true"
|
|
174
|
+
class="grey question circle outline fitted icon"
|
|
175
|
+
/>
|
|
176
|
+
<div
|
|
177
|
+
class="detail"
|
|
178
|
+
>
|
|
179
|
+
arg1
|
|
180
|
+
</div>
|
|
181
|
+
</div>
|
|
182
|
+
<div
|
|
183
|
+
class="param-label-description"
|
|
184
|
+
/>
|
|
185
|
+
</div>
|
|
186
|
+
</div>
|
|
187
|
+
</li>
|
|
188
|
+
<li>
|
|
189
|
+
<div
|
|
190
|
+
class="flex-column"
|
|
191
|
+
>
|
|
192
|
+
<div
|
|
193
|
+
class="param-label-header"
|
|
194
|
+
>
|
|
195
|
+
<div
|
|
196
|
+
class="ui large image label"
|
|
197
|
+
>
|
|
198
|
+
<i
|
|
199
|
+
aria-hidden="true"
|
|
200
|
+
class="grey question circle outline fitted icon"
|
|
201
|
+
/>
|
|
202
|
+
<div
|
|
203
|
+
class="detail"
|
|
204
|
+
>
|
|
205
|
+
arg2
|
|
206
|
+
</div>
|
|
207
|
+
</div>
|
|
208
|
+
<div
|
|
209
|
+
class="param-label-description"
|
|
210
|
+
/>
|
|
211
|
+
</div>
|
|
212
|
+
</div>
|
|
213
|
+
</li>
|
|
214
|
+
</ul>
|
|
215
|
+
</div>
|
|
216
|
+
</div>
|
|
217
|
+
lazy
|
|
218
|
+
</div>
|
|
219
|
+
`;
|
|
220
|
+
|
|
221
|
+
exports[`<FunctionSelector /> user interaction 2`] = `
|
|
222
|
+
<div>
|
|
223
|
+
<div
|
|
224
|
+
class="accordion ui fluid no-margin"
|
|
225
|
+
style="display: none;"
|
|
226
|
+
>
|
|
227
|
+
<div
|
|
228
|
+
class="title no-padding"
|
|
229
|
+
>
|
|
230
|
+
<div
|
|
231
|
+
class="flex-center"
|
|
232
|
+
>
|
|
233
|
+
<i
|
|
234
|
+
aria-hidden="true"
|
|
235
|
+
class="dropdown icon"
|
|
236
|
+
/>
|
|
237
|
+
<div
|
|
238
|
+
aria-expanded="false"
|
|
239
|
+
class="ui fluid search selection dropdown"
|
|
240
|
+
role="combobox"
|
|
241
|
+
>
|
|
242
|
+
<input
|
|
243
|
+
aria-autocomplete="list"
|
|
244
|
+
autocomplete="off"
|
|
245
|
+
class="search"
|
|
246
|
+
tabindex="0"
|
|
247
|
+
type="text"
|
|
248
|
+
value=""
|
|
249
|
+
/>
|
|
250
|
+
<div
|
|
251
|
+
aria-atomic="true"
|
|
252
|
+
aria-live="polite"
|
|
253
|
+
class="divider text"
|
|
254
|
+
role="alert"
|
|
255
|
+
>
|
|
256
|
+
eq:boolean
|
|
257
|
+
</div>
|
|
258
|
+
<i
|
|
259
|
+
aria-hidden="true"
|
|
260
|
+
class="dropdown icon"
|
|
261
|
+
/>
|
|
262
|
+
<div
|
|
263
|
+
class="menu transition"
|
|
264
|
+
role="listbox"
|
|
265
|
+
>
|
|
266
|
+
<div
|
|
267
|
+
aria-checked="true"
|
|
268
|
+
aria-selected="true"
|
|
269
|
+
class="active selected item"
|
|
270
|
+
role="option"
|
|
271
|
+
style="pointer-events: all;"
|
|
272
|
+
>
|
|
273
|
+
<div
|
|
274
|
+
class="ui header"
|
|
275
|
+
>
|
|
276
|
+
<div
|
|
277
|
+
class="flex-center"
|
|
278
|
+
>
|
|
279
|
+
<div>
|
|
280
|
+
eq
|
|
281
|
+
</div>
|
|
282
|
+
<div
|
|
283
|
+
class="function-params-label"
|
|
284
|
+
>
|
|
285
|
+
<div
|
|
286
|
+
class="ui grey label"
|
|
287
|
+
>
|
|
288
|
+
<i
|
|
289
|
+
aria-hidden="true"
|
|
290
|
+
class="question circle outline icon"
|
|
291
|
+
/>
|
|
292
|
+
arg1
|
|
293
|
+
</div>
|
|
294
|
+
<div
|
|
295
|
+
class="ui grey label"
|
|
296
|
+
>
|
|
297
|
+
<i
|
|
298
|
+
aria-hidden="true"
|
|
299
|
+
class="question circle outline icon"
|
|
300
|
+
/>
|
|
301
|
+
arg2
|
|
302
|
+
</div>
|
|
303
|
+
</div>
|
|
304
|
+
</div>
|
|
305
|
+
</div>
|
|
306
|
+
<div
|
|
307
|
+
class="sub header"
|
|
308
|
+
/>
|
|
309
|
+
</div>
|
|
310
|
+
</div>
|
|
311
|
+
</div>
|
|
312
|
+
</div>
|
|
313
|
+
</div>
|
|
314
|
+
<div
|
|
315
|
+
class="content no-padding"
|
|
316
|
+
>
|
|
317
|
+
<ul
|
|
318
|
+
class="function-tree"
|
|
319
|
+
>
|
|
320
|
+
<li>
|
|
321
|
+
<div
|
|
322
|
+
class="flex-column"
|
|
323
|
+
>
|
|
324
|
+
<div
|
|
325
|
+
class="param-label-header"
|
|
326
|
+
>
|
|
327
|
+
<div
|
|
328
|
+
class="ui large image label"
|
|
329
|
+
>
|
|
330
|
+
<i
|
|
331
|
+
aria-hidden="true"
|
|
332
|
+
class="grey question circle outline fitted icon"
|
|
333
|
+
/>
|
|
334
|
+
<div
|
|
335
|
+
class="detail"
|
|
336
|
+
>
|
|
337
|
+
arg1
|
|
338
|
+
</div>
|
|
339
|
+
</div>
|
|
340
|
+
<div
|
|
341
|
+
class="param-label-description"
|
|
342
|
+
/>
|
|
343
|
+
</div>
|
|
344
|
+
</div>
|
|
345
|
+
</li>
|
|
346
|
+
<li>
|
|
347
|
+
<div
|
|
348
|
+
class="flex-column"
|
|
349
|
+
>
|
|
350
|
+
<div
|
|
351
|
+
class="param-label-header"
|
|
352
|
+
>
|
|
353
|
+
<div
|
|
354
|
+
class="ui large image label"
|
|
355
|
+
>
|
|
356
|
+
<i
|
|
357
|
+
aria-hidden="true"
|
|
358
|
+
class="grey question circle outline fitted icon"
|
|
359
|
+
/>
|
|
360
|
+
<div
|
|
361
|
+
class="detail"
|
|
362
|
+
>
|
|
363
|
+
arg2
|
|
364
|
+
</div>
|
|
365
|
+
</div>
|
|
366
|
+
<div
|
|
367
|
+
class="param-label-description"
|
|
368
|
+
/>
|
|
369
|
+
</div>
|
|
370
|
+
</div>
|
|
371
|
+
</li>
|
|
372
|
+
</ul>
|
|
373
|
+
</div>
|
|
374
|
+
</div>
|
|
375
|
+
lazy
|
|
376
|
+
</div>
|
|
377
|
+
`;
|
package/src/components/functions/expressions/__tests__/__snapshots__/ParamSelector.spec.js.snap
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`<ParamSelector /> deleting param will clean field 1`] = `
|
|
4
|
+
<div>
|
|
5
|
+
<div
|
|
6
|
+
class="ui list"
|
|
7
|
+
role="list"
|
|
8
|
+
>
|
|
9
|
+
<div
|
|
10
|
+
class="item"
|
|
11
|
+
role="listitem"
|
|
12
|
+
>
|
|
13
|
+
<button
|
|
14
|
+
class="ui button"
|
|
15
|
+
>
|
|
16
|
+
add_param
|
|
17
|
+
</button>
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
<div
|
|
21
|
+
aria-expanded="false"
|
|
22
|
+
class="ui fluid selection dropdown"
|
|
23
|
+
role="listbox"
|
|
24
|
+
tabindex="0"
|
|
25
|
+
>
|
|
26
|
+
<i
|
|
27
|
+
aria-hidden="true"
|
|
28
|
+
class="dropdown icon"
|
|
29
|
+
/>
|
|
30
|
+
<div
|
|
31
|
+
class="menu transition"
|
|
32
|
+
/>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
`;
|
|
36
|
+
|
|
37
|
+
exports[`<ParamSelector /> matches the latest snapshot 1`] = `
|
|
38
|
+
<div>
|
|
39
|
+
<div
|
|
40
|
+
aria-expanded="false"
|
|
41
|
+
class="ui fluid selection dropdown"
|
|
42
|
+
role="listbox"
|
|
43
|
+
tabindex="0"
|
|
44
|
+
>
|
|
45
|
+
<i
|
|
46
|
+
aria-hidden="true"
|
|
47
|
+
class="dropdown icon"
|
|
48
|
+
/>
|
|
49
|
+
<div
|
|
50
|
+
class="menu transition"
|
|
51
|
+
/>
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
`;
|
|
55
|
+
|
|
56
|
+
exports[`<ParamSelector /> user interaction 1`] = `
|
|
57
|
+
<div>
|
|
58
|
+
<div
|
|
59
|
+
aria-expanded="false"
|
|
60
|
+
class="ui fluid selection dropdown"
|
|
61
|
+
role="listbox"
|
|
62
|
+
tabindex="0"
|
|
63
|
+
>
|
|
64
|
+
<div
|
|
65
|
+
aria-atomic="true"
|
|
66
|
+
aria-live="polite"
|
|
67
|
+
class="divider text"
|
|
68
|
+
role="alert"
|
|
69
|
+
>
|
|
70
|
+
param1
|
|
71
|
+
</div>
|
|
72
|
+
<i
|
|
73
|
+
aria-hidden="true"
|
|
74
|
+
class="dropdown icon"
|
|
75
|
+
/>
|
|
76
|
+
<div
|
|
77
|
+
class="menu transition"
|
|
78
|
+
>
|
|
79
|
+
<div
|
|
80
|
+
aria-checked="true"
|
|
81
|
+
aria-selected="true"
|
|
82
|
+
class="active selected item"
|
|
83
|
+
role="option"
|
|
84
|
+
style="pointer-events: all;"
|
|
85
|
+
>
|
|
86
|
+
<span
|
|
87
|
+
class="text"
|
|
88
|
+
>
|
|
89
|
+
param1
|
|
90
|
+
</span>
|
|
91
|
+
</div>
|
|
92
|
+
</div>
|
|
93
|
+
</div>
|
|
94
|
+
</div>
|
|
95
|
+
`;
|