@truedat/qx 7.13.7 → 7.13.9

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 (74) hide show
  1. package/package.json +3 -3
  2. package/src/components/QxRoutes.js +8 -6
  3. package/src/components/common/ResourceSelector.js +25 -6
  4. package/src/components/common/TypeSelector.js +14 -9
  5. package/src/components/common/__tests__/__snapshots__/ResourceSelector.spec.js.snap +269 -241
  6. package/src/components/common/__tests__/__snapshots__/TypeSelector.spec.js.snap +198 -190
  7. package/src/components/common/expressions/Clauses.js +19 -11
  8. package/src/components/common/expressions/Condition.js +32 -31
  9. package/src/components/common/expressions/FieldSelector.js +30 -16
  10. package/src/components/common/expressions/FunctionSelector.js +38 -23
  11. package/src/components/common/expressions/ShapeSelector.js +6 -5
  12. package/src/components/common/expressions/__tests__/ShapeSelector.spec.js +1 -1
  13. package/src/components/common/expressions/__tests__/__snapshots__/Clauses.spec.js.snap +36 -12
  14. package/src/components/common/expressions/__tests__/__snapshots__/Condition.spec.js.snap +87 -75
  15. package/src/components/common/expressions/__tests__/__snapshots__/ConstantSelector.spec.js.snap +99 -97
  16. package/src/components/common/expressions/__tests__/__snapshots__/Expression.spec.js.snap +236 -216
  17. package/src/components/common/expressions/__tests__/__snapshots__/FunctionArgs.spec.js.snap +97 -89
  18. package/src/components/common/expressions/__tests__/__snapshots__/FunctionSelector.spec.js.snap +373 -345
  19. package/src/components/common/expressions/constantInputs/AnySelector.js +2 -1
  20. package/src/components/common/expressions/constantInputs/BooleanSelector.js +20 -15
  21. package/src/components/common/expressions/constantInputs/DefaultSelector.js +0 -1
  22. package/src/components/common/expressions/constantInputs/__tests__/__snapshots__/AnySelector.spec.js.snap +189 -182
  23. package/src/components/common/expressions/constantInputs/__tests__/__snapshots__/BooleanSelector.spec.js.snap +74 -66
  24. package/src/components/common/expressions/constantInputs/__tests__/__snapshots__/DefaultSelector.spec.js.snap +2 -4
  25. package/src/components/common/resourceSelectors/DataStructureSelector.js +5 -4
  26. package/src/components/common/resourceSelectors/DataViewSelector.js +4 -3
  27. package/src/components/common/resourceSelectors/ReferenceDatasetSelector.js +4 -3
  28. package/src/components/common/resourceSelectors/__tests__/__snapshots__/DataStructureSelector.spec.js.snap +65 -61
  29. package/src/components/common/resourceSelectors/__tests__/__snapshots__/DataViewSelector.spec.js.snap +38 -34
  30. package/src/components/common/resourceSelectors/__tests__/__snapshots__/ReferenceDatasetSelector.spec.js.snap +38 -34
  31. package/src/components/dataViews/BreadCrumb.js +20 -0
  32. package/src/components/dataViews/DataViewEditor.js +169 -178
  33. package/src/components/dataViews/DataViews.js +113 -135
  34. package/src/components/dataViews/__tests__/AdvancedDataViewEditor.spec.js +260 -0
  35. package/src/components/dataViews/__tests__/DataViewEditor.spec.js +173 -239
  36. package/src/components/dataViews/__tests__/DataViewSelect.spec.js +1 -1
  37. package/src/components/dataViews/__tests__/DataViews.spec.js +124 -51
  38. package/src/components/dataViews/__tests__/Queryable.spec.js +1 -1
  39. package/src/components/dataViews/__tests__/Queryables.spec.js +1 -1
  40. package/src/components/dataViews/__tests__/SimpleDataViewEditor.spec.js +164 -0
  41. package/src/components/dataViews/__tests__/__snapshots__/{DataViewEditor.spec.js.snap → AdvancedDataViewEditor.spec.js.snap} +230 -200
  42. package/src/components/dataViews/__tests__/__snapshots__/DataViews.spec.js.snap +141 -29
  43. package/src/components/dataViews/__tests__/__snapshots__/Queryable.spec.js.snap +184 -141
  44. package/src/components/dataViews/__tests__/__snapshots__/Queryables.spec.js.snap +126 -91
  45. package/src/components/dataViews/actions/CancelButton.js +33 -0
  46. package/src/components/dataViews/actions/DeleteButton.js +33 -0
  47. package/src/components/dataViews/advancedForm/AdvancedDataViewEditor.js +159 -0
  48. package/src/components/dataViews/{DataViewSelect.js → advancedForm/DataViewSelect.js} +2 -2
  49. package/src/components/dataViews/{Queryable.js → advancedForm/Queryable.js} +2 -2
  50. package/src/components/dataViews/queryableFunctions.js +7 -0
  51. package/src/components/dataViews/queryableProperties/GroupBy.js +23 -27
  52. package/src/components/dataViews/queryableProperties/Join.js +0 -3
  53. package/src/components/dataViews/queryableProperties/__tests__/__snapshots__/From.spec.js.snap +30 -26
  54. package/src/components/dataViews/queryableProperties/__tests__/__snapshots__/GroupBy.spec.js.snap +130 -102
  55. package/src/components/dataViews/queryableProperties/__tests__/__snapshots__/Join.spec.js.snap +42 -31
  56. package/src/components/dataViews/queryableProperties/__tests__/__snapshots__/Select.spec.js.snap +81 -69
  57. package/src/components/dataViews/queryableProperties/__tests__/__snapshots__/SelectField.spec.js.snap +62 -54
  58. package/src/components/dataViews/queryableProperties/__tests__/__snapshots__/Where.spec.js.snap +12 -4
  59. package/src/components/dataViews/simpleForm/AggregationForm.js +179 -0
  60. package/src/components/dataViews/simpleForm/DatasetForm.js +199 -0
  61. package/src/components/dataViews/simpleForm/FormQueryable.js +114 -0
  62. package/src/components/dataViews/simpleForm/InformationForm.js +107 -0
  63. package/src/components/dataViews/simpleForm/SelectionForm.js +50 -0
  64. package/src/components/dataViews/simpleForm/SimpleDataViewEditor.js +265 -0
  65. package/src/components/functions/__tests__/__snapshots__/FunctionEditor.spec.js.snap +663 -631
  66. package/src/components/functions/__tests__/__snapshots__/FunctionParams.spec.js.snap +113 -109
  67. package/src/components/qualityControls/__tests__/__snapshots__/ControlProperties.spec.js.snap +92 -76
  68. package/src/components/qualityControls/__tests__/__snapshots__/EditQualityControl.spec.js.snap +108 -80
  69. package/src/components/qualityControls/__tests__/__snapshots__/NewDraftQualityControl.spec.js.snap +108 -80
  70. package/src/components/qualityControls/__tests__/__snapshots__/QualityControlEditor.spec.js.snap +108 -80
  71. package/src/components/qualityControls/controlProperties/__tests__/__snapshots__/Count.spec.js.snap +40 -36
  72. package/src/components/qualityControls/controlProperties/__tests__/__snapshots__/Ratio.spec.js.snap +92 -76
  73. package/src/hooks/useDataViews.js +7 -0
  74. /package/src/components/dataViews/{Queryables.js → advancedForm/Queryables.js} +0 -0
@@ -1,6 +1,6 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
- exports[`<DataViews /> matches the latest snapshot 1`] = `
3
+ exports[`<DataViews /> renders cards and the mode label, and the Open link points to the correct route 1`] = `
4
4
  <div>
5
5
  <div
6
6
  class="ui segment"
@@ -24,54 +24,166 @@ exports[`<DataViews /> matches the latest snapshot 1`] = `
24
24
  </div>
25
25
  </h2>
26
26
  <div
27
- class="ui grid"
27
+ class="ui hidden divider"
28
+ />
29
+ <a
30
+ class="ui primary right floated button"
31
+ data-discover="true"
32
+ href="/dataviews/new"
33
+ role="button"
34
+ >
35
+ dataViews.action.new
36
+ </a>
37
+ <div
38
+ class="ui icon input"
39
+ >
40
+ <input
41
+ placeholder="search.placeholder"
42
+ type="text"
43
+ />
44
+ <i
45
+ aria-hidden="true"
46
+ class="search icon"
47
+ />
48
+ </div>
49
+ <div
50
+ class="ui hidden divider"
51
+ />
52
+ <div
53
+ class="ui stackable five cards"
28
54
  >
29
55
  <div
30
- class="four wide column"
56
+ class="ui card"
31
57
  >
32
- <button
33
- class="ui fluid button"
58
+ <div
59
+ class="content"
34
60
  >
35
- dataViews.action.new
36
- </button>
61
+ <a
62
+ class="header"
63
+ data-discover="true"
64
+ href="/dataviews/1"
65
+ >
66
+ <i
67
+ aria-hidden="true"
68
+ class="dataViews.mode.icon.guided small icon"
69
+ />
70
+ Users Spain
71
+ </a>
72
+ <div
73
+ class="description"
74
+ >
75
+ Active users in Spain
76
+ </div>
77
+ </div>
37
78
  <div
38
- class="ui divided selection list"
39
- role="list"
79
+ class="extra content"
40
80
  >
41
81
  <div
42
- class="item"
43
- role="listitem"
82
+ class="ui actions"
44
83
  >
45
- <div
46
- class="content"
84
+ <button
85
+ class="ui red basic icon button"
47
86
  >
48
- <div
49
- class="header"
50
- >
51
- StructureView
52
- </div>
53
- </div>
87
+ <i
88
+ aria-hidden="true"
89
+ class="trash alternate outline icon"
90
+ />
91
+ </button>
54
92
  </div>
55
93
  </div>
56
94
  </div>
57
95
  <div
58
- class="eleven wide column"
96
+ class="ui card"
59
97
  >
60
- <h2
61
- class="ui icon center aligned header"
98
+ <div
99
+ class="content"
100
+ >
101
+ <a
102
+ class="header"
103
+ data-discover="true"
104
+ href="/dataviews/2"
105
+ >
106
+ <i
107
+ aria-hidden="true"
108
+ class="dataViews.mode.icon.advanced small icon"
109
+ />
110
+ Inventory
111
+ </a>
112
+ <div
113
+ class="description"
114
+ >
115
+ Stock levels
116
+ </div>
117
+ </div>
118
+ <div
119
+ class="extra content"
62
120
  >
63
- <i
64
- aria-hidden="true"
65
- class="hand pointer outline icon"
66
- />
67
121
  <div
68
- class="sub header"
122
+ class="ui actions"
69
123
  >
70
- dataViews.no_selection
124
+ <button
125
+ class="ui red basic icon button"
126
+ >
127
+ <i
128
+ aria-hidden="true"
129
+ class="trash alternate outline icon"
130
+ />
131
+ </button>
71
132
  </div>
72
- </h2>
133
+ </div>
73
134
  </div>
74
135
  </div>
75
136
  </div>
76
137
  </div>
77
138
  `;
139
+
140
+ exports[`<DataViews /> renders empty state when no data views 1`] = `
141
+ <div>
142
+ <div
143
+ class="ui segment"
144
+ >
145
+ <h2
146
+ class="ui header"
147
+ >
148
+ <i
149
+ aria-hidden="true"
150
+ class="archive circular icon"
151
+ />
152
+ <div
153
+ class="content"
154
+ >
155
+ dataViews.header
156
+ <div
157
+ class="sub header"
158
+ >
159
+ dataViews.subheader
160
+ </div>
161
+ </div>
162
+ </h2>
163
+ <div
164
+ class="ui hidden divider"
165
+ />
166
+ <a
167
+ class="ui primary right floated button"
168
+ data-discover="true"
169
+ href="/dataviews/new"
170
+ role="button"
171
+ >
172
+ dataViews.action.new
173
+ </a>
174
+ <h4
175
+ class="ui header"
176
+ >
177
+ <i
178
+ aria-hidden="true"
179
+ class="search icon"
180
+ />
181
+ <div
182
+ class="content"
183
+ >
184
+ dataViews.empty_list
185
+ </div>
186
+ </h4>
187
+ </div>
188
+ </div>
189
+ `;
@@ -52,38 +52,42 @@ exports[`<Queryable /> matches the latest snapshot with duplicated alias 1`] = `
52
52
  resource
53
53
  </label>
54
54
  <div
55
- aria-expanded="false"
56
- class="ui selection dropdown"
57
- role="listbox"
58
- tabindex="0"
55
+ class="field"
59
56
  >
60
57
  <div
61
- aria-atomic="true"
62
- aria-live="polite"
63
- class="divider default text"
64
- role="alert"
65
- >
66
- type
67
- </div>
68
- <i
69
- aria-hidden="true"
70
- class="dropdown icon"
71
- />
72
- <div
73
- class="menu transition"
58
+ aria-expanded="false"
59
+ class="ui selection dropdown"
60
+ role="listbox"
61
+ tabindex="0"
74
62
  >
75
63
  <div
76
- aria-checked="false"
77
- aria-selected="true"
78
- class="selected item"
79
- role="option"
80
- style="pointer-events: all;"
64
+ aria-atomic="true"
65
+ aria-live="polite"
66
+ class="divider default text"
67
+ role="alert"
81
68
  >
82
- <span
83
- class="text"
69
+ type
70
+ </div>
71
+ <i
72
+ aria-hidden="true"
73
+ class="dropdown icon"
74
+ />
75
+ <div
76
+ class="menu transition"
77
+ >
78
+ <div
79
+ aria-checked="false"
80
+ aria-selected="true"
81
+ class="selected item"
82
+ role="option"
83
+ style="pointer-events: all;"
84
84
  >
85
- data_structure
86
- </span>
85
+ <span
86
+ class="text"
87
+ >
88
+ data_structure
89
+ </span>
90
+ </div>
87
91
  </div>
88
92
  </div>
89
93
  </div>
@@ -147,19 +151,70 @@ exports[`<Queryable /> matches the latest snapshot with duplicated resource 1`]
147
151
  <label>
148
152
  resource
149
153
  </label>
154
+ <div
155
+ class="field"
156
+ >
157
+ <div
158
+ aria-expanded="false"
159
+ class="ui selection dropdown"
160
+ role="listbox"
161
+ tabindex="0"
162
+ >
163
+ <div
164
+ aria-atomic="true"
165
+ aria-live="polite"
166
+ class="divider text"
167
+ role="alert"
168
+ >
169
+ type
170
+ </div>
171
+ <i
172
+ aria-hidden="true"
173
+ class="dropdown icon"
174
+ />
175
+ <div
176
+ class="menu transition"
177
+ >
178
+ <div
179
+ aria-checked="false"
180
+ aria-selected="true"
181
+ class="selected item"
182
+ role="option"
183
+ style="pointer-events: all;"
184
+ >
185
+ <span
186
+ class="text"
187
+ >
188
+ data_structure
189
+ </span>
190
+ </div>
191
+ </div>
192
+ </div>
193
+ </div>
194
+ </div>
195
+ <div
196
+ class="field"
197
+ >
150
198
  <div
151
199
  aria-expanded="false"
152
- class="ui selection dropdown"
153
- role="listbox"
154
- tabindex="0"
200
+ class="ui fluid search selection dropdown"
201
+ role="combobox"
155
202
  >
203
+ <input
204
+ aria-autocomplete="list"
205
+ autocomplete="off"
206
+ class="search"
207
+ tabindex="0"
208
+ type="text"
209
+ value=""
210
+ />
156
211
  <div
157
212
  aria-atomic="true"
158
213
  aria-live="polite"
159
214
  class="divider text"
160
215
  role="alert"
161
216
  >
162
- type
217
+ data_view
163
218
  </div>
164
219
  <i
165
220
  aria-hidden="true"
@@ -167,59 +222,16 @@ exports[`<Queryable /> matches the latest snapshot with duplicated resource 1`]
167
222
  />
168
223
  <div
169
224
  class="menu transition"
225
+ role="listbox"
170
226
  >
171
227
  <div
172
- aria-checked="false"
173
- aria-selected="true"
174
- class="selected item"
175
- role="option"
176
- style="pointer-events: all;"
228
+ class="message"
177
229
  >
178
- <span
179
- class="text"
180
- >
181
- data_structure
182
- </span>
230
+ No results found.
183
231
  </div>
184
232
  </div>
185
233
  </div>
186
234
  </div>
187
- <div
188
- aria-expanded="false"
189
- class="ui fluid search selection dropdown"
190
- role="combobox"
191
- >
192
- <input
193
- aria-autocomplete="list"
194
- autocomplete="off"
195
- class="search"
196
- tabindex="0"
197
- type="text"
198
- value=""
199
- />
200
- <div
201
- aria-atomic="true"
202
- aria-live="polite"
203
- class="divider text"
204
- role="alert"
205
- >
206
- data_view
207
- </div>
208
- <i
209
- aria-hidden="true"
210
- class="dropdown icon"
211
- />
212
- <div
213
- class="menu transition"
214
- role="listbox"
215
- >
216
- <div
217
- class="message"
218
- >
219
- No results found.
220
- </div>
221
- </div>
222
- </div>
223
235
  </div>
224
236
  </div>
225
237
  </div>
@@ -280,38 +292,42 @@ exports[`<Queryable /> matches the latest snapshot with from queryable 1`] = `
280
292
  resource
281
293
  </label>
282
294
  <div
283
- aria-expanded="false"
284
- class="ui selection dropdown"
285
- role="listbox"
286
- tabindex="0"
295
+ class="field"
287
296
  >
288
297
  <div
289
- aria-atomic="true"
290
- aria-live="polite"
291
- class="divider default text"
292
- role="alert"
293
- >
294
- type
295
- </div>
296
- <i
297
- aria-hidden="true"
298
- class="dropdown icon"
299
- />
300
- <div
301
- class="menu transition"
298
+ aria-expanded="false"
299
+ class="ui selection dropdown"
300
+ role="listbox"
301
+ tabindex="0"
302
302
  >
303
303
  <div
304
- aria-checked="false"
305
- aria-selected="true"
306
- class="selected item"
307
- role="option"
308
- style="pointer-events: all;"
304
+ aria-atomic="true"
305
+ aria-live="polite"
306
+ class="divider default text"
307
+ role="alert"
308
+ >
309
+ type
310
+ </div>
311
+ <i
312
+ aria-hidden="true"
313
+ class="dropdown icon"
314
+ />
315
+ <div
316
+ class="menu transition"
309
317
  >
310
- <span
311
- class="text"
318
+ <div
319
+ aria-checked="false"
320
+ aria-selected="true"
321
+ class="selected item"
322
+ role="option"
323
+ style="pointer-events: all;"
312
324
  >
313
- data_structure
314
- </span>
325
+ <span
326
+ class="text"
327
+ >
328
+ data_structure
329
+ </span>
330
+ </div>
315
331
  </div>
316
332
  </div>
317
333
  </div>
@@ -383,11 +399,19 @@ exports[`<Queryable /> matches the latest snapshot with from queryable 2`] = `
383
399
  class="item"
384
400
  role="listitem"
385
401
  >
386
- <button
387
- class="ui button"
402
+ <div
403
+ class="ui medium basic buttons"
388
404
  >
389
- add_group_field
390
- </button>
405
+ <button
406
+ class="ui button"
407
+ >
408
+ <i
409
+ aria-hidden="true"
410
+ class="plus icon"
411
+ />
412
+ add_group_field
413
+ </button>
414
+ </div>
391
415
  </div>
392
416
  </div>
393
417
  </div>
@@ -405,11 +429,19 @@ exports[`<Queryable /> matches the latest snapshot with from queryable 2`] = `
405
429
  class="item"
406
430
  role="listitem"
407
431
  >
408
- <button
409
- class="ui button"
432
+ <div
433
+ class="ui medium basic buttons"
410
434
  >
411
- add_aggregate_field
412
- </button>
435
+ <button
436
+ class="ui button"
437
+ >
438
+ <i
439
+ aria-hidden="true"
440
+ class="plus icon"
441
+ />
442
+ add_aggregate_field
443
+ </button>
444
+ </div>
413
445
  </div>
414
446
  </div>
415
447
  </div>
@@ -473,38 +505,42 @@ exports[`<Queryable /> matches the latest snapshot with join queryable 1`] = `
473
505
  resource
474
506
  </label>
475
507
  <div
476
- aria-expanded="false"
477
- class="ui selection dropdown"
478
- role="listbox"
479
- tabindex="0"
508
+ class="field"
480
509
  >
481
510
  <div
482
- aria-atomic="true"
483
- aria-live="polite"
484
- class="divider default text"
485
- role="alert"
486
- >
487
- type
488
- </div>
489
- <i
490
- aria-hidden="true"
491
- class="dropdown icon"
492
- />
493
- <div
494
- class="menu transition"
511
+ aria-expanded="false"
512
+ class="ui selection dropdown"
513
+ role="listbox"
514
+ tabindex="0"
495
515
  >
496
516
  <div
497
- aria-checked="false"
498
- aria-selected="true"
499
- class="selected item"
500
- role="option"
501
- style="pointer-events: all;"
517
+ aria-atomic="true"
518
+ aria-live="polite"
519
+ class="divider default text"
520
+ role="alert"
521
+ >
522
+ type
523
+ </div>
524
+ <i
525
+ aria-hidden="true"
526
+ class="dropdown icon"
527
+ />
528
+ <div
529
+ class="menu transition"
502
530
  >
503
- <span
504
- class="text"
531
+ <div
532
+ aria-checked="false"
533
+ aria-selected="true"
534
+ class="selected item"
535
+ role="option"
536
+ style="pointer-events: all;"
505
537
  >
506
- data_structure
507
- </span>
538
+ <span
539
+ class="text"
540
+ >
541
+ data_structure
542
+ </span>
543
+ </div>
508
544
  </div>
509
545
  </div>
510
546
  </div>
@@ -521,7 +557,6 @@ exports[`<Queryable /> matches the latest snapshot with join queryable 1`] = `
521
557
  <div
522
558
  aria-expanded="false"
523
559
  class="ui selection dropdown select-field-dropdown"
524
- label="alias"
525
560
  role="listbox"
526
561
  tabindex="0"
527
562
  >
@@ -678,11 +713,19 @@ exports[`<Queryable /> matches the latest snapshot with join queryable 1`] = `
678
713
  <div
679
714
  class="ui horizontal divider"
680
715
  >
681
- <button
682
- class="ui mini button"
716
+ <div
717
+ class="ui medium basic buttons"
683
718
  >
684
- addGroup
685
- </button>
719
+ <button
720
+ class="ui button"
721
+ >
722
+ <i
723
+ aria-hidden="true"
724
+ class="plus icon"
725
+ />
726
+ addGroup
727
+ </button>
728
+ </div>
686
729
  </div>
687
730
  </div>
688
731
  </div>