@truedat/dq 4.33.8 → 4.34.2

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 (90) hide show
  1. package/CHANGELOG.md +21 -1
  2. package/package.json +5 -5
  3. package/src/api.js +5 -1
  4. package/src/components/ConditionSummary.js +23 -21
  5. package/src/components/ExecutionDetails.js +11 -14
  6. package/src/components/ExecutionForm.js +116 -0
  7. package/src/components/ExecutionGroup.js +24 -15
  8. package/src/components/ExecutionPopup.js +58 -0
  9. package/src/components/ImplementationResultBar.js +80 -0
  10. package/src/components/ImplementationSummary.js +33 -72
  11. package/src/components/ImplementationsRoutes.js +15 -5
  12. package/src/components/ImplementationsUploadButton.js +63 -0
  13. package/src/components/InformationSummary.js +68 -0
  14. package/src/components/NewRuleImplementation.js +12 -0
  15. package/src/components/RuleForm.js +0 -178
  16. package/src/components/RuleImplementation.js +10 -6
  17. package/src/components/RuleImplementationProperties.js +31 -64
  18. package/src/components/RuleImplementationResults.js +87 -53
  19. package/src/components/RuleImplementationsActions.js +18 -48
  20. package/src/components/RuleProperties.js +1 -10
  21. package/src/components/RuleResultDecorator.js +43 -26
  22. package/src/components/RuleResultRow.js +4 -1
  23. package/src/components/RuleRoutes.js +0 -13
  24. package/src/components/RuleSummary.js +15 -2
  25. package/src/components/RulesActions.js +17 -10
  26. package/src/components/RulesUploadButton.js +58 -0
  27. package/src/components/__tests__/ExecutionForm.spec.js +25 -0
  28. package/src/components/__tests__/ExecutionGroup.spec.js +11 -7
  29. package/src/components/__tests__/ExecutionPopup.spec.js +20 -0
  30. package/src/components/__tests__/ImplementationResultBar.spec.js +98 -0
  31. package/src/components/__tests__/ImplementationSummary.spec.js +9 -26
  32. package/src/components/__tests__/InformationSummary.spec.js +35 -0
  33. package/src/components/__tests__/NewRuleImplementation.spec.js +1 -1
  34. package/src/components/__tests__/RuleForm.spec.js +0 -191
  35. package/src/components/__tests__/RuleImplementation.spec.js +1 -0
  36. package/src/components/__tests__/RuleImplementationProperties.spec.js +23 -33
  37. package/src/components/__tests__/RuleImplementationsActions.spec.js +10 -32
  38. package/src/components/__tests__/RuleProperties.spec.js +7 -9
  39. package/src/components/__tests__/RuleResultDecorator.spec.js +17 -11
  40. package/src/components/__tests__/RuleResultRow.spec.js +25 -46
  41. package/src/components/__tests__/RuleRow.spec.js +0 -4
  42. package/src/components/__tests__/RuleSummary.spec.js +6 -6
  43. package/src/components/__tests__/Rules.spec.js +15 -39
  44. package/src/components/__tests__/__snapshots__/ConditionSummary.spec.js.snap +55 -51
  45. package/src/components/__tests__/__snapshots__/ExecutionForm.spec.js.snap +33 -0
  46. package/src/components/__tests__/__snapshots__/ExecutionGroup.spec.js.snap +5 -4
  47. package/src/components/__tests__/__snapshots__/ExecutionPopup.spec.js.snap +11 -0
  48. package/src/components/__tests__/__snapshots__/ImplementationResultBar.spec.js.snap +141 -0
  49. package/src/components/__tests__/__snapshots__/ImplementationSummary.spec.js.snap +194 -457
  50. package/src/components/__tests__/__snapshots__/InformationSummary.spec.js.snap +185 -0
  51. package/src/components/__tests__/__snapshots__/NewRuleImplementation.spec.js.snap +6 -0
  52. package/src/components/__tests__/__snapshots__/RuleForm.spec.js.snap +0 -148
  53. package/src/components/__tests__/__snapshots__/RuleImplementation.spec.js.snap +20 -0
  54. package/src/components/__tests__/__snapshots__/RuleImplementationProperties.spec.js.snap +43 -49
  55. package/src/components/__tests__/__snapshots__/RuleImplementationResults.spec.js.snap +63 -61
  56. package/src/components/__tests__/__snapshots__/RuleImplementationsActions.spec.js.snap +5 -49
  57. package/src/components/__tests__/__snapshots__/RuleProperties.spec.js.snap +0 -1
  58. package/src/components/__tests__/__snapshots__/RuleRow.spec.js.snap +0 -28
  59. package/src/components/__tests__/__snapshots__/Rules.spec.js.snap +0 -101
  60. package/src/components/ruleImplementationForm/InformationForm.js +5 -5
  61. package/src/components/ruleImplementationForm/LimitsForm.js +142 -0
  62. package/src/components/ruleImplementationForm/RuleImplementationForm.js +14 -4
  63. package/src/components/ruleImplementationForm/RuleImplementationRawForm.js +16 -6
  64. package/src/components/ruleImplementationForm/__tests__/LimitsForm.spec.js +186 -0
  65. package/src/components/ruleImplementationForm/__tests__/RuleImplementationRawForm.spec.js +42 -35
  66. package/src/components/ruleImplementationForm/__tests__/__snapshots__/LimitsForm.spec.js.snap +1104 -0
  67. package/src/components/ruleImplementationForm/__tests__/__snapshots__/RuleImplementationForm.spec.js.snap +4 -1
  68. package/src/components/ruleImplementationForm/__tests__/__snapshots__/RuleImplementationRawForm.spec.js.snap +12 -1
  69. package/src/components/ruleImplementationForm/limitsValidation.js +72 -0
  70. package/src/messages/en.js +145 -71
  71. package/src/messages/es.js +270 -180
  72. package/src/reducers/__tests__/rule.spec.js +2 -4
  73. package/src/reducers/__tests__/ruleImplementation.spec.js +2 -0
  74. package/src/reducers/__tests__/ruleImplementations.spec.js +12 -8
  75. package/src/reducers/dqMessage.js +100 -1
  76. package/src/reducers/index.js +4 -0
  77. package/src/reducers/rule.js +0 -3
  78. package/src/reducers/ruleImplementation.js +3 -0
  79. package/src/reducers/ruleImplementationRedirect.js +6 -1
  80. package/src/reducers/ruleImplementations.js +3 -0
  81. package/src/reducers/ruleRedirect.js +5 -0
  82. package/src/reducers/uploadImplementationsFile.js +28 -0
  83. package/src/reducers/uploadRulesFile.js +25 -0
  84. package/src/routines.js +2 -0
  85. package/src/sagas/index.js +6 -0
  86. package/src/sagas/uploadImplementations.js +28 -0
  87. package/src/sagas/uploadRules.js +28 -0
  88. package/src/selectors/getRuleImplementationColumns.js +38 -3
  89. package/src/selectors/ruleColumnsSelector.js +0 -31
  90. package/src/styles/ruleSummary.less +17 -10
@@ -1,52 +1,91 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
- exports[`<ImplementationSummary /> displays correctly general summary 1`] = `
3
+ exports[`<ImplementationSummary /> displays correctly validations values of list type 1`] = `
4
4
  <div>
5
5
  <h3
6
6
  class="ui header"
7
7
  >
8
8
  <i
9
9
  aria-hidden="true"
10
- class="database small icon"
10
+ class="info small icon"
11
11
  />
12
12
  <div
13
13
  class="content"
14
14
  >
15
- Rule Implementation
15
+ information
16
16
  </div>
17
17
  </h3>
18
18
  <div
19
- class="ui grid"
19
+ class="ui segment"
20
20
  >
21
21
  <div
22
- class="row"
22
+ class="ui list"
23
+ role="list"
23
24
  >
24
25
  <div
25
- class="column"
26
+ class="item"
27
+ role="listitem"
26
28
  >
27
29
  <div
28
- class="ui olive label"
30
+ class="header"
31
+ >
32
+ thresholds
33
+ </div>
34
+ <div
35
+ class="content"
29
36
  >
30
- Executable
37
+ <div
38
+ class="description"
39
+ >
40
+ percentage
41
+ </div>
31
42
  </div>
32
43
  </div>
33
- </div>
34
- <div
35
- class="two column row"
36
- >
37
44
  <div
38
- class="four wide column"
45
+ class="item"
46
+ role="listitem"
39
47
  >
40
- Implementation key
48
+ <i
49
+ aria-hidden="true"
50
+ class="yellow circle icon"
51
+ />
52
+ <div
53
+ class="content"
54
+ >
55
+ <div
56
+ class="header"
57
+ >
58
+ threshold
59
+ </div>
60
+ <div
61
+ class="description"
62
+ >
63
+ 10 %
64
+ </div>
65
+ </div>
41
66
  </div>
42
67
  <div
43
- class="twelve wide column"
68
+ class="item"
69
+ role="listitem"
44
70
  >
45
- <span
46
- class="highlighted"
71
+ <i
72
+ aria-hidden="true"
73
+ class="green circle icon"
74
+ />
75
+ <div
76
+ class="content"
47
77
  >
48
- "ImplKey"
49
- </span>
78
+ <div
79
+ class="header"
80
+ >
81
+ goal
82
+ </div>
83
+ <div
84
+ class="description"
85
+ >
86
+ 50 %
87
+ </div>
88
+ </div>
50
89
  </div>
51
90
  </div>
52
91
  </div>
@@ -63,44 +102,48 @@ exports[`<ImplementationSummary /> displays correctly general summary 1`] = `
63
102
  Dataset
64
103
  </div>
65
104
  </h3>
66
- <table
67
- class="ui very basic table"
105
+ <div
106
+ class="ui segment"
68
107
  >
69
- <thead
70
- class=""
108
+ <table
109
+ class="ui very basic table"
71
110
  >
72
- <tr
111
+ <thead
73
112
  class=""
74
113
  >
75
- <th
114
+ <tr
76
115
  class=""
77
116
  >
78
- Structure
79
- </th>
80
- </tr>
81
- </thead>
82
- <tbody
83
- class=""
84
- >
85
- <tr
117
+ <th
118
+ class=""
119
+ >
120
+ Structure
121
+ </th>
122
+ </tr>
123
+ </thead>
124
+ <tbody
86
125
  class=""
87
126
  >
88
- <td
127
+ <tr
89
128
  class=""
90
129
  >
91
- <a
92
- href="/structures/1915"
130
+ <td
131
+ class=""
93
132
  >
94
- <span
95
- class="highlighted"
133
+ <a
134
+ href="/structures/1915"
96
135
  >
97
- "CMC &gt; Objetos Públicos &gt; 0. 0 Meses"
98
- </span>
99
- </a>
100
- </td>
101
- </tr>
102
- </tbody>
103
- </table>
136
+ <span
137
+ class="highlighted"
138
+ >
139
+ "CMC &gt; Objetos Públicos &gt; 0. 0 Meses"
140
+ </span>
141
+ </a>
142
+ </td>
143
+ </tr>
144
+ </tbody>
145
+ </table>
146
+ </div>
104
147
  <h3
105
148
  class="ui header"
106
149
  >
@@ -114,263 +157,140 @@ exports[`<ImplementationSummary /> displays correctly general summary 1`] = `
114
157
  Validations
115
158
  </div>
116
159
  </h3>
117
- <table
118
- class="ui very basic table"
160
+ <div
161
+ class="ui segment"
119
162
  >
120
- <thead
121
- class=""
163
+ <table
164
+ class="ui very basic table"
122
165
  >
123
- <tr
166
+ <thead
124
167
  class=""
125
168
  >
126
- <th
127
- class=""
128
- >
129
- Field
130
- </th>
131
- <th
169
+ <tr
132
170
  class=""
133
171
  >
134
- Operator
135
- </th>
136
- <th
137
- class=""
138
- >
139
- Values
140
- </th>
141
- </tr>
142
- </thead>
143
- <tbody
144
- class=""
145
- >
146
- <tr
147
- class=""
148
- >
149
- <td
150
- class="five wide"
151
- >
152
- <a
153
- href="/structures/2598"
172
+ <th
173
+ class=""
154
174
  >
155
- <span
156
- class="highlighted"
157
- >
158
- "Mes"
159
- </span>
160
- </a>
161
- </td>
162
- <td
163
- class="five wide"
164
- >
165
- <span
166
- class="highlighted"
175
+ Field
176
+ </th>
177
+ <th
178
+ class=""
167
179
  >
168
- "in_list"
169
- </span>
170
- </td>
171
- <td
172
- class="five wide"
173
- >
174
- <span
175
- class="highlighted"
180
+ Operator
181
+ </th>
182
+ <th
183
+ class=""
176
184
  >
177
- "4, 5, 6"
178
- </span>
179
- </td>
180
- </tr>
181
- </tbody>
182
- </table>
183
- </div>
184
- `;
185
-
186
- exports[`<ImplementationSummary /> displays correctly validations values of list type 1`] = `
187
- <div>
188
- <h3
189
- class="ui header"
190
- >
191
- <i
192
- aria-hidden="true"
193
- class="database small icon"
194
- />
195
- <div
196
- class="content"
197
- >
198
- Rule Implementation
199
- </div>
200
- </h3>
201
- <div
202
- class="ui grid"
203
- >
204
- <div
205
- class="row"
206
- >
207
- <div
208
- class="column"
209
- >
210
- <div
211
- class="ui olive label"
212
- >
213
- Executable
214
- </div>
215
- </div>
216
- </div>
217
- <div
218
- class="two column row"
219
- >
220
- <div
221
- class="four wide column"
222
- >
223
- Implementation key
224
- </div>
225
- <div
226
- class="twelve wide column"
227
- >
228
- <span
229
- class="highlighted"
230
- >
231
- "ImplKey"
232
- </span>
233
- </div>
234
- </div>
235
- </div>
236
- <h3
237
- class="ui header"
238
- >
239
- <i
240
- aria-hidden="true"
241
- class="database small icon"
242
- />
243
- <div
244
- class="content"
245
- >
246
- Dataset
247
- </div>
248
- </h3>
249
- <table
250
- class="ui very basic table"
251
- >
252
- <thead
253
- class=""
254
- >
255
- <tr
256
- class=""
257
- >
258
- <th
259
- class=""
260
- >
261
- Structure
262
- </th>
263
- </tr>
264
- </thead>
265
- <tbody
266
- class=""
267
- >
268
- <tr
185
+ Values
186
+ </th>
187
+ </tr>
188
+ </thead>
189
+ <tbody
269
190
  class=""
270
191
  >
271
- <td
192
+ <tr
272
193
  class=""
273
194
  >
274
- <a
275
- href="/structures/1915"
195
+ <td
196
+ class="five wide"
197
+ >
198
+ <a
199
+ href="/structures/2598"
200
+ >
201
+ <span
202
+ class="highlighted"
203
+ >
204
+ "Mes"
205
+ </span>
206
+ </a>
207
+ </td>
208
+ <td
209
+ class="five wide"
276
210
  >
277
211
  <span
278
212
  class="highlighted"
279
213
  >
280
- "CMC &gt; Objetos Públicos &gt; 0. 0 Meses"
214
+ "in_list"
281
215
  </span>
282
- </a>
283
- </td>
284
- </tr>
285
- </tbody>
286
- </table>
287
- <h3
288
- class="ui header"
289
- >
290
- <i
291
- aria-hidden="true"
292
- class="setting small icon"
293
- />
294
- <div
295
- class="content"
296
- >
297
- Validations
298
- </div>
299
- </h3>
300
- <table
301
- class="ui very basic table"
302
- >
303
- <thead
304
- class=""
305
- >
306
- <tr
307
- class=""
308
- >
309
- <th
310
- class=""
311
- >
312
- Field
313
- </th>
314
- <th
315
- class=""
316
- >
317
- Operator
318
- </th>
319
- <th
320
- class=""
321
- >
322
- Values
323
- </th>
324
- </tr>
325
- </thead>
326
- <tbody
327
- class=""
328
- >
329
- <tr
330
- class=""
331
- >
332
- <td
333
- class="five wide"
334
- >
335
- <a
336
- href="/structures/2598"
216
+ </td>
217
+ <td
218
+ class="five wide"
337
219
  >
338
220
  <span
339
221
  class="highlighted"
340
222
  >
341
- "Mes"
223
+ "4, 5, 6"
342
224
  </span>
343
- </a>
344
- </td>
345
- <td
346
- class="five wide"
347
- >
348
- <span
349
- class="highlighted"
350
- >
351
- "in_list"
352
- </span>
353
- </td>
354
- <td
355
- class="five wide"
356
- >
357
- <span
358
- class="highlighted"
359
- >
360
- "4, 5, 6"
361
- </span>
362
- </td>
363
- </tr>
364
- </tbody>
365
- </table>
225
+ </td>
226
+ </tr>
227
+ </tbody>
228
+ </table>
229
+ </div>
366
230
  </div>
367
231
  `;
368
232
 
369
233
  exports[`<ImplementationSummary /> matches the latest snapshot 1`] = `
370
234
  <Fragment>
371
- <GeneralSummary
372
- executable={true}
373
- implementationKey="ImplKey"
235
+ <InformationSummary
236
+ ruleImplementation={
237
+ Object {
238
+ "dataset": Array [
239
+ Object {
240
+ "structure": Object {
241
+ "id": 1915,
242
+ "name": "0. 0 Meses",
243
+ "path": Array [
244
+ "CMC",
245
+ "Objetos Públicos",
246
+ ],
247
+ "system": Object {
248
+ "external_id": "Microstrategy",
249
+ "id": 1,
250
+ "name": "Microstrategy",
251
+ },
252
+ },
253
+ },
254
+ ],
255
+ "executable": true,
256
+ "goal": 50,
257
+ "implementationKey": "ImplKey",
258
+ "implementationType": "",
259
+ "minimum": 10,
260
+ "population": Array [
261
+ Object {},
262
+ ],
263
+ "rawContent": Object {
264
+ "dataset": "",
265
+ "population": "",
266
+ "system": "",
267
+ "validations": "",
268
+ },
269
+ "result_type": "percentage",
270
+ "validations": Array [
271
+ Object {
272
+ "operator": Object {
273
+ "name": "in_list",
274
+ "value_type": "string_list",
275
+ },
276
+ "structure": Object {
277
+ "field_type": "string",
278
+ "id": 2598,
279
+ "name": "Mes",
280
+ },
281
+ "value": Array [
282
+ Object {
283
+ "raw": Array [
284
+ "4",
285
+ "5",
286
+ "6",
287
+ ],
288
+ },
289
+ ],
290
+ },
291
+ ],
292
+ }
293
+ }
374
294
  />
375
295
  <DatasetSummary
376
296
  rows={
@@ -432,186 +352,3 @@ exports[`<ImplementationSummary /> matches the latest snapshot 1`] = `
432
352
  />
433
353
  </Fragment>
434
354
  `;
435
-
436
- exports[`<ImplementationSummary /> renders executable as internal when it is false 1`] = `
437
- <div>
438
- <h3
439
- class="ui header"
440
- >
441
- <i
442
- aria-hidden="true"
443
- class="database small icon"
444
- />
445
- <div
446
- class="content"
447
- >
448
- Rule Implementation
449
- </div>
450
- </h3>
451
- <div
452
- class="ui grid"
453
- >
454
- <div
455
- class="row"
456
- >
457
- <div
458
- class="column"
459
- >
460
- <div
461
- class="ui teal label"
462
- >
463
- Internal
464
- </div>
465
- </div>
466
- </div>
467
- <div
468
- class="two column row"
469
- >
470
- <div
471
- class="four wide column"
472
- >
473
- Implementation key
474
- </div>
475
- <div
476
- class="twelve wide column"
477
- >
478
- <span
479
- class="highlighted"
480
- >
481
- "ImplKey"
482
- </span>
483
- </div>
484
- </div>
485
- </div>
486
- <h3
487
- class="ui header"
488
- >
489
- <i
490
- aria-hidden="true"
491
- class="database small icon"
492
- />
493
- <div
494
- class="content"
495
- >
496
- Dataset
497
- </div>
498
- </h3>
499
- <table
500
- class="ui very basic table"
501
- >
502
- <thead
503
- class=""
504
- >
505
- <tr
506
- class=""
507
- >
508
- <th
509
- class=""
510
- >
511
- Structure
512
- </th>
513
- </tr>
514
- </thead>
515
- <tbody
516
- class=""
517
- >
518
- <tr
519
- class=""
520
- >
521
- <td
522
- class=""
523
- >
524
- <a
525
- href="/structures/1915"
526
- >
527
- <span
528
- class="highlighted"
529
- >
530
- "CMC &gt; Objetos Públicos &gt; 0. 0 Meses"
531
- </span>
532
- </a>
533
- </td>
534
- </tr>
535
- </tbody>
536
- </table>
537
- <h3
538
- class="ui header"
539
- >
540
- <i
541
- aria-hidden="true"
542
- class="setting small icon"
543
- />
544
- <div
545
- class="content"
546
- >
547
- Validations
548
- </div>
549
- </h3>
550
- <table
551
- class="ui very basic table"
552
- >
553
- <thead
554
- class=""
555
- >
556
- <tr
557
- class=""
558
- >
559
- <th
560
- class=""
561
- >
562
- Field
563
- </th>
564
- <th
565
- class=""
566
- >
567
- Operator
568
- </th>
569
- <th
570
- class=""
571
- >
572
- Values
573
- </th>
574
- </tr>
575
- </thead>
576
- <tbody
577
- class=""
578
- >
579
- <tr
580
- class=""
581
- >
582
- <td
583
- class="five wide"
584
- >
585
- <a
586
- href="/structures/2598"
587
- >
588
- <span
589
- class="highlighted"
590
- >
591
- "Mes"
592
- </span>
593
- </a>
594
- </td>
595
- <td
596
- class="five wide"
597
- >
598
- <span
599
- class="highlighted"
600
- >
601
- "in_list"
602
- </span>
603
- </td>
604
- <td
605
- class="five wide"
606
- >
607
- <span
608
- class="highlighted"
609
- >
610
- "4, 5, 6"
611
- </span>
612
- </td>
613
- </tr>
614
- </tbody>
615
- </table>
616
- </div>
617
- `;