@truedat/dq 4.44.3 → 4.45.0

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 (29) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/package.json +24 -17
  3. package/src/components/NewRuleImplementation.js +6 -29
  4. package/src/components/RemediationForm.js +20 -47
  5. package/src/components/RemediationPlan.js +1 -1
  6. package/src/components/RuleFilters.js +1 -5
  7. package/src/components/RuleForm.js +20 -59
  8. package/src/components/RuleImplementationFilters.js +1 -5
  9. package/src/components/__tests__/ExecutionForm.spec.js +14 -12
  10. package/src/components/__tests__/NewRuleImplementation.spec.js +27 -15
  11. package/src/components/__tests__/RemediationForm.spec.js +11 -46
  12. package/src/components/__tests__/RemediationPlan.spec.js +49 -73
  13. package/src/components/__tests__/RuleForm.spec.js +22 -52
  14. package/src/components/__tests__/RuleProperties.spec.js +39 -27
  15. package/src/components/__tests__/__snapshots__/ExecutionForm.spec.js.snap +75 -5
  16. package/src/components/__tests__/__snapshots__/NewRuleImplementation.spec.js.snap +202 -2
  17. package/src/components/__tests__/__snapshots__/RemediationForm.spec.js.snap +77 -3
  18. package/src/components/__tests__/__snapshots__/RemediationPlan.spec.js.snap +40 -1
  19. package/src/components/__tests__/__snapshots__/RuleForm.spec.js.snap +156 -6
  20. package/src/components/__tests__/__snapshots__/RuleImplementationsSearch.spec.js.snap +1 -1
  21. package/src/components/__tests__/__snapshots__/RuleProperties.spec.js.snap +68 -56
  22. package/src/components/__tests__/__snapshots__/RuleSearch.spec.js.snap +1 -1
  23. package/src/components/ruleImplementationForm/InformationForm.js +14 -33
  24. package/src/components/ruleImplementationForm/RuleImplementationForm.js +7 -11
  25. package/src/components/ruleImplementationForm/RuleImplementationRawForm.js +20 -39
  26. package/src/components/ruleImplementationForm/__tests__/RuleImplementationForm.spec.js +11 -7
  27. package/src/components/ruleImplementationForm/__tests__/RuleImplementationRawForm.spec.js +175 -156
  28. package/src/components/ruleImplementationForm/__tests__/__snapshots__/RuleImplementationForm.spec.js.snap +75 -0
  29. package/src/components/ruleImplementationForm/__tests__/__snapshots__/RuleImplementationRawForm.spec.js.snap +412 -165
@@ -1,182 +1,429 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
3
  exports[`<RuleImplementationRawForm /> matches the latest snapshot 1`] = `
4
- <Form
5
- as="form"
6
- className="rule"
7
- >
8
- <FormRadio
9
- as={[Function]}
10
- checked={true}
11
- control={[Function]}
12
- label="ruleImplementation.props.executable"
13
- name="executable"
14
- onChange={[Function]}
15
- toggle={true}
16
- />
17
- <FormField>
18
- <label>
19
- ruleImplementation.props.name
20
- <Help
21
- message="datasetForm.implementation_key.tooltip"
22
- />
23
- </label>
24
- <FormInput
25
- as={[Function]}
26
- autoComplete="off"
27
- control={[Function]}
28
- name="implementation_key"
29
- onChange={[Function]}
30
- placeholder="ruleImplementation.props.name.placeholder"
31
- required={true}
32
- value=""
33
- />
34
- </FormField>
35
- <FormField>
36
- <lazy
37
- onChange={[Function]}
38
- />
39
- </FormField>
40
- <LimitsForm
41
- onChange={[MockFunction]}
42
- ruleImplementation={
43
- Object {
44
- "executable": true,
45
- "goal": "10",
46
- "id": 1,
47
- "minimum": "1",
48
- "result_type": "percentage",
49
- }
50
- }
51
- />
52
- <TemplateSelectorLoader
53
- onChange={[Function]}
54
- onLoad={[Function]}
55
- required={true}
56
- scope="ri"
57
- />
58
- <FormDropdown
59
- as={[Function]}
60
- control={[Function]}
61
- label={
4
+ <div>
5
+ <form
6
+ class="ui form rule"
7
+ style=""
8
+ >
9
+ <div
10
+ class="field"
11
+ >
12
+ <div
13
+ class="ui checked toggle checkbox"
14
+ >
15
+ <input
16
+ checked=""
17
+ class="hidden"
18
+ name="executable"
19
+ readonly=""
20
+ tabindex="0"
21
+ type="radio"
22
+ value=""
23
+ />
24
+ <label>
25
+ Executable
26
+ </label>
27
+ </div>
28
+ </div>
29
+ <div
30
+ class="field"
31
+ >
62
32
  <label>
63
- <Memo(MemoizedFormattedMessage)
64
- id="ruleImplementationRawForm.props.source"
33
+ Implementation Key
34
+ <i
35
+ aria-hidden="true"
36
+ class="question circle outline icon rule-form-popup"
65
37
  />
66
38
  </label>
67
- }
68
- name="source_id"
69
- onChange={[Function]}
70
- options={
71
- Array [
72
- Object {
73
- "key": "1",
74
- "text": undefined,
75
- "value": "1",
76
- },
77
- Object {
78
- "key": "2",
79
- "text": undefined,
80
- "value": "2",
81
- },
82
- Object {
83
- "key": "3",
84
- "text": undefined,
85
- "value": "3",
86
- },
87
- ]
88
- }
89
- placeholder="ruleImplementationRawForm.props.source.placeholder"
90
- required={true}
91
- search={true}
92
- selection={true}
93
- value="1"
94
- />
95
- <FormTextArea
96
- as={[Function]}
97
- className="raw"
98
- control={[Function]}
99
- error={false}
100
- label={
39
+ <div
40
+ class="required field"
41
+ >
42
+ <div
43
+ class="ui input"
44
+ >
45
+ <input
46
+ autocomplete="off"
47
+ name="implementation_key"
48
+ placeholder="Rule Implementation Key"
49
+ required=""
50
+ type="text"
51
+ value=""
52
+ />
53
+ </div>
54
+ </div>
55
+ </div>
56
+ <div
57
+ class="ui segment"
58
+ >
59
+ <div
60
+ class="field"
61
+ >
62
+ <label
63
+ class="rule-form-label"
64
+ >
65
+ Result Type
66
+ <span>
67
+ *
68
+ </span>
69
+ <i
70
+ aria-hidden="true"
71
+ class="question circle outline icon rule-form-popup"
72
+ />
73
+ </label>
74
+ <div
75
+ class="inline fields"
76
+ >
77
+ <div
78
+ class="field"
79
+ >
80
+ <div
81
+ class="ui checked radio checkbox"
82
+ >
83
+ <input
84
+ checked=""
85
+ class="hidden"
86
+ name="result_type"
87
+ readonly=""
88
+ tabindex="0"
89
+ type="radio"
90
+ value="percentage"
91
+ />
92
+ <label>
93
+ Percentage
94
+ </label>
95
+ </div>
96
+ </div>
97
+ <div
98
+ class="field"
99
+ >
100
+ <div
101
+ class="ui radio checkbox"
102
+ >
103
+ <input
104
+ class="hidden"
105
+ name="result_type"
106
+ readonly=""
107
+ tabindex="0"
108
+ type="radio"
109
+ value="deviation"
110
+ />
111
+ <label>
112
+ Deviation
113
+ </label>
114
+ </div>
115
+ </div>
116
+ <div
117
+ class="field"
118
+ >
119
+ <div
120
+ class="ui radio checkbox"
121
+ >
122
+ <input
123
+ class="hidden"
124
+ name="result_type"
125
+ readonly=""
126
+ tabindex="0"
127
+ type="radio"
128
+ value="errors_number"
129
+ />
130
+ <label>
131
+ Error count
132
+ </label>
133
+ </div>
134
+ </div>
135
+ </div>
136
+ </div>
137
+ <div
138
+ class="field"
139
+ >
140
+ <label
141
+ class="rule-form-label"
142
+ >
143
+ Threshold
144
+ <span>
145
+ *
146
+ </span>
147
+ <i
148
+ aria-hidden="true"
149
+ class="question circle outline icon rule-form-popup"
150
+ />
151
+ </label>
152
+ <div
153
+ class="field"
154
+ >
155
+ <div
156
+ class="ui input"
157
+ >
158
+ <input
159
+ autocomplete="off"
160
+ name="minimum"
161
+ placeholder="Threshold value"
162
+ type="text"
163
+ value="1"
164
+ />
165
+ </div>
166
+ </div>
167
+ </div>
168
+ <div
169
+ class="field"
170
+ >
171
+ <label
172
+ class="rule-form-label"
173
+ >
174
+ Goal
175
+ <span>
176
+ *
177
+ </span>
178
+ <i
179
+ aria-hidden="true"
180
+ class="question circle outline icon rule-form-popup"
181
+ />
182
+ </label>
183
+ <div
184
+ class="field"
185
+ >
186
+ <div
187
+ class="ui input"
188
+ >
189
+ <input
190
+ autocomplete="off"
191
+ name="goal"
192
+ placeholder="Goal value"
193
+ type="text"
194
+ value="10"
195
+ />
196
+ </div>
197
+ </div>
198
+ </div>
199
+ </div>
200
+ <div
201
+ class="required field"
202
+ >
101
203
  <label>
102
- <Memo(MemoizedFormattedMessage)
103
- id="ruleImplementationRawForm.props.dataset"
104
- />
105
- <Help
106
- message="ruleImplementationRawForm.props.dataset.help"
107
- />
204
+ Template
205
+ <div
206
+ class="ui left pointing label"
207
+ >
208
+ Empty required field
209
+ </div>
108
210
  </label>
109
- }
110
- name="dataset"
111
- onChange={[Function]}
112
- placeholder="ruleImplementationRawForm.props.dataset.placeholder"
113
- required={true}
114
- rows={4}
115
- size="small"
116
- value=""
117
- />
118
- <FormTextArea
119
- as={[Function]}
120
- className="raw"
121
- control={[Function]}
122
- error={false}
123
- label={
211
+ <div
212
+ class="field"
213
+ >
214
+ <div
215
+ aria-busy="false"
216
+ aria-expanded="false"
217
+ class="ui search selection dropdown"
218
+ name="template"
219
+ role="combobox"
220
+ >
221
+ <input
222
+ aria-autocomplete="list"
223
+ autocomplete="off"
224
+ class="search"
225
+ tabindex="0"
226
+ type="text"
227
+ value=""
228
+ />
229
+ <div
230
+ aria-atomic="true"
231
+ aria-live="polite"
232
+ class="divider default text"
233
+ role="alert"
234
+ >
235
+ Select a template...
236
+ </div>
237
+ <i
238
+ aria-hidden="true"
239
+ class="dropdown icon"
240
+ />
241
+ <div
242
+ class="menu transition"
243
+ role="listbox"
244
+ >
245
+ <div
246
+ aria-checked="false"
247
+ aria-selected="true"
248
+ class="selected item"
249
+ role="option"
250
+ style="pointer-events: all;"
251
+ >
252
+ <span
253
+ class="text"
254
+ >
255
+ template1
256
+ </span>
257
+ </div>
258
+ <div
259
+ aria-checked="false"
260
+ aria-selected="false"
261
+ class="item"
262
+ role="option"
263
+ style="pointer-events: all;"
264
+ >
265
+ <span
266
+ class="text"
267
+ >
268
+ template2
269
+ </span>
270
+ </div>
271
+ </div>
272
+ </div>
273
+ </div>
274
+ </div>
275
+ <div
276
+ class="required field"
277
+ >
124
278
  <label>
125
- <Memo(MemoizedFormattedMessage)
126
- id="ruleImplementationRawForm.props.population"
279
+ Data source
280
+ </label>
281
+ <div
282
+ aria-expanded="false"
283
+ class="ui search selection dropdown"
284
+ name="source_id"
285
+ required=""
286
+ role="combobox"
287
+ >
288
+ <input
289
+ aria-autocomplete="list"
290
+ autocomplete="off"
291
+ class="search"
292
+ tabindex="0"
293
+ type="text"
294
+ value=""
295
+ />
296
+ <div
297
+ aria-atomic="true"
298
+ aria-live="polite"
299
+ class="divider text"
300
+ role="alert"
301
+ >
302
+ ext_id_1
303
+ </div>
304
+ <i
305
+ aria-hidden="true"
306
+ class="dropdown icon"
127
307
  />
128
- <Help
129
- message="ruleImplementationRawForm.props.population.help"
308
+ <div
309
+ class="menu transition"
310
+ role="listbox"
311
+ >
312
+ <div
313
+ aria-checked="true"
314
+ aria-selected="true"
315
+ class="active selected item"
316
+ role="option"
317
+ style="pointer-events: all;"
318
+ >
319
+ <span
320
+ class="text"
321
+ >
322
+ ext_id_1
323
+ </span>
324
+ </div>
325
+ <div
326
+ aria-checked="false"
327
+ aria-selected="false"
328
+ class="item"
329
+ role="option"
330
+ style="pointer-events: all;"
331
+ >
332
+ <span
333
+ class="text"
334
+ >
335
+ ext_id_2
336
+ </span>
337
+ </div>
338
+ <div
339
+ aria-checked="false"
340
+ aria-selected="false"
341
+ class="item"
342
+ role="option"
343
+ style="pointer-events: all;"
344
+ >
345
+ <span
346
+ class="text"
347
+ >
348
+ ext_id_3
349
+ </span>
350
+ </div>
351
+ </div>
352
+ </div>
353
+ </div>
354
+ <div
355
+ class="required field raw"
356
+ >
357
+ <label
358
+ for="dataset"
359
+ >
360
+ Dataset
361
+ <i
362
+ aria-hidden="true"
363
+ class="question circle outline icon rule-form-popup"
130
364
  />
131
365
  </label>
132
- }
133
- name="population"
134
- onChange={[Function]}
135
- placeholder="ruleImplementationRawForm.props.population.placeholder"
136
- rows={4}
137
- size="small"
138
- value=""
139
- />
140
- <FormTextArea
141
- as={[Function]}
142
- className="raw"
143
- control={[Function]}
144
- error={false}
145
- label={
366
+ <textarea
367
+ id="dataset"
368
+ name="dataset"
369
+ placeholder="TPERSONS p
370
+ LEFT JOIN TCLIENTES c ON c.person_id = p.id"
371
+ required=""
372
+ rows="4"
373
+ />
374
+ </div>
375
+ <div
376
+ class="field raw"
377
+ >
146
378
  <label>
147
- <Memo(MemoizedFormattedMessage)
148
- id="ruleImplementationRawForm.props.validations"
379
+ Population
380
+ <i
381
+ aria-hidden="true"
382
+ class="question circle outline icon rule-form-popup"
149
383
  />
150
- <Help
151
- message="ruleImplementationRawForm.props.validations.help"
384
+ </label>
385
+ <textarea
386
+ name="population"
387
+ placeholder="p.tipo = 'F'
388
+ AND c.pais = 'ES' "
389
+ rows="4"
390
+ />
391
+ </div>
392
+ <div
393
+ class="required field raw"
394
+ >
395
+ <label>
396
+ Validations
397
+ <i
398
+ aria-hidden="true"
399
+ class="question circle outline icon rule-form-popup"
152
400
  />
153
401
  </label>
154
- }
155
- name="validations"
156
- onChange={[Function]}
157
- placeholder="ruleImplementationRawForm.props.validations.placeholder"
158
- required={true}
159
- rows={4}
160
- size="small"
161
- value=""
162
- />
163
- <FormButton
164
- as={[Function]}
165
- content="actions.save"
166
- control={[Function]}
167
- disabled={true}
168
- floated="right"
169
- loading={false}
170
- onClick={[Function]}
171
- primary={true}
172
- type="submit"
173
- />
174
- <Button
175
- as="button"
176
- content="actions.cancel"
177
- floated="right"
178
- onClick={[Function]}
179
- secondary={true}
180
- />
181
- </Form>
402
+ <textarea
403
+ name="validations"
404
+ placeholder="p.nombre is not null
405
+ AND p.nombre <> "
406
+ required=""
407
+ rows="4"
408
+ />
409
+ </div>
410
+ <div
411
+ class="disabled field"
412
+ >
413
+ <button
414
+ class="ui primary disabled right floated button"
415
+ disabled=""
416
+ tabindex="-1"
417
+ type="submit"
418
+ >
419
+ Save
420
+ </button>
421
+ </div>
422
+ <button
423
+ class="ui secondary right floated button"
424
+ >
425
+ Cancel
426
+ </button>
427
+ </form>
428
+ </div>
182
429
  `;