@truedat/dq 4.47.3 → 4.47.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.
Files changed (25) hide show
  1. package/CHANGELOG.md +20 -1
  2. package/package.json +5 -5
  3. package/src/api/queries.js +5 -0
  4. package/src/components/ConditionSummary.js +63 -21
  5. package/src/components/NewRuleImplementation.js +21 -46
  6. package/src/components/RuleImplementationResults.js +5 -3
  7. package/src/components/__test_samples__/newRuleImplementationHelper.js +1239 -0
  8. package/src/components/__tests__/NewRuleImplementation.spec.js +273 -6
  9. package/src/components/ruleImplementationForm/FiltersField.js +31 -11
  10. package/src/components/ruleImplementationForm/FiltersFormGroup.js +1 -1
  11. package/src/components/ruleImplementationForm/FiltersGrid.js +18 -6
  12. package/src/components/ruleImplementationForm/FiltersGroup.js +3 -3
  13. package/src/components/ruleImplementationForm/InformationForm.js +2 -0
  14. package/src/components/ruleImplementationForm/RuleImplementationForm.js +1 -1
  15. package/src/components/ruleImplementationForm/RuleImplementationRawForm.js +30 -1
  16. package/src/components/ruleImplementationForm/__tests__/RuleImplementationRawForm.spec.js +24 -24
  17. package/src/components/ruleImplementationForm/__tests__/__snapshots__/FiltersFormGroup.spec.js.snap +7 -1
  18. package/src/components/ruleImplementationForm/__tests__/__snapshots__/FiltersGroup.spec.js.snap +8 -1
  19. package/src/components/ruleImplementationForm/__tests__/__snapshots__/RuleImplementationRawForm.spec.js.snap +67 -0
  20. package/src/components/ruleImplementationForm/__tests__/__snapshots__/ValueConditions.spec.js.snap +7 -1
  21. package/src/messages/en.js +11 -2
  22. package/src/messages/es.js +12 -5
  23. package/src/selectors/__tests__/getParsedEvents.spec.js +31 -0
  24. package/src/selectors/getParsedEvents.js +10 -0
  25. package/src/selectors/getRuleImplementationOperators.js +1 -0
@@ -50,7 +50,13 @@ exports[`<FiltersFormGroup /> matches the latest snapshot 1`] = `
50
50
  <div
51
51
  class="menu transition"
52
52
  role="listbox"
53
- />
53
+ >
54
+ <div
55
+ class="message"
56
+ >
57
+ No results found.
58
+ </div>
59
+ </div>
54
60
  </div>
55
61
  </div>
56
62
  <div
@@ -4,6 +4,7 @@ exports[`<FiltersGroup /> matches the latest snapshot when siblings provided 1`]
4
4
  <div>
5
5
  <div
6
6
  class="row"
7
+ data-testid="row-0"
7
8
  style="display: none;"
8
9
  >
9
10
  <div
@@ -56,7 +57,13 @@ exports[`<FiltersGroup /> matches the latest snapshot when siblings provided 1`]
56
57
  <div
57
58
  class="menu transition"
58
59
  role="listbox"
59
- />
60
+ >
61
+ <div
62
+ class="message"
63
+ >
64
+ No results found.
65
+ </div>
66
+ </div>
60
67
  </div>
61
68
  </div>
62
69
  <div
@@ -53,6 +53,72 @@ exports[`<RuleImplementationRawForm /> matches the latest snapshot 1`] = `
53
53
  </div>
54
54
  </div>
55
55
  </div>
56
+ <div
57
+ class="field"
58
+ >
59
+ <div
60
+ class="required field"
61
+ >
62
+ <label>
63
+ Domain
64
+ </label>
65
+ <div
66
+ class="field"
67
+ >
68
+ <div
69
+ aria-expanded="false"
70
+ class="ui fluid search selection dropdown"
71
+ name="domain"
72
+ role="combobox"
73
+ >
74
+ <input
75
+ aria-autocomplete="list"
76
+ autocomplete="off"
77
+ class="search"
78
+ tabindex="0"
79
+ type="text"
80
+ value=""
81
+ />
82
+ <div
83
+ aria-atomic="true"
84
+ aria-live="polite"
85
+ class="divider text"
86
+ role="alert"
87
+ >
88
+ domain1
89
+ </div>
90
+ <i
91
+ aria-hidden="true"
92
+ class="dropdown icon clear"
93
+ />
94
+ <div
95
+ aria-multiselectable="false"
96
+ class="menu transition"
97
+ role="listbox"
98
+ >
99
+ <div
100
+ aria-checked="true"
101
+ aria-selected="true"
102
+ class="active selected item"
103
+ role="option"
104
+ style="pointer-events: all;"
105
+ >
106
+ <div
107
+ class="text"
108
+ style="margin-left: 0px;"
109
+ >
110
+ <i
111
+ aria-hidden="true"
112
+ class="icon"
113
+ />
114
+ domain1
115
+ </div>
116
+ </div>
117
+ </div>
118
+ </div>
119
+ </div>
120
+ </div>
121
+ </div>
56
122
  <div
57
123
  class="ui segment"
58
124
  >
@@ -279,6 +345,7 @@ exports[`<RuleImplementationRawForm /> matches the latest snapshot 1`] = `
279
345
  Data source
280
346
  </label>
281
347
  <div
348
+ aria-busy="false"
282
349
  aria-expanded="false"
283
350
  class="ui search selection dropdown"
284
351
  name="source_id"
@@ -56,7 +56,13 @@ exports[`<ValueConditions /> matches the latest snapshot when siblings provided
56
56
  <div
57
57
  class="menu transition"
58
58
  role="listbox"
59
- />
59
+ >
60
+ <div
61
+ class="message"
62
+ >
63
+ No results found.
64
+ </div>
65
+ </div>
60
66
  </div>
61
67
  </div>
62
68
  <div
@@ -423,7 +423,8 @@ export default {
423
423
  "matches regular expression",
424
424
  "ruleImplementation.operator.starts_with": "starts with",
425
425
  "ruleImplementation.operator.starts_with.string": "starts with",
426
- "ruleImplementation.operator.unique": "has unique value",
426
+ "ruleImplementation.operator.unique": "unique",
427
+ "ruleImplementation.operator.unique.field_list": "unique across fields",
427
428
  "ruleImplementation.operator.variation_on_count": "count variation",
428
429
  "ruleImplementation.operator.variation_on_count.string": "count variation",
429
430
  "ruleImplementation.props.esquema": "Structure",
@@ -494,12 +495,20 @@ export default {
494
495
  "ruleImplementations.actions.upload.tooltip": "Upload Implementations",
495
496
  "ruleImplementations.actions.upload.confirmation.header":
496
497
  "Confirm bulk upload",
497
- "ruleImplementations.events.action_created": "Implementation created on rule: {0}",
498
+ "ruleImplementations.events.action_created": "Implementation created",
498
499
  "ruleImplementations.events.action_changed": "Field {0} changed to {1}",
499
500
  "ruleImplementations.events.action_deprecated": "Implementation deprecated",
500
501
  "ruleImplementations.events.action_moved": "Implementation moved to rule: {0}",
501
502
  "ruleImplementations.events.action_restored": "Implementation restored",
502
503
  "ruleImplementations.events.action_updated": "Implementation updated",
504
+
505
+ "ruleImplementations.events.action_published": "Implementation published",
506
+ "ruleImplementations.events.action_pending_approval": "Approval requested",
507
+ "ruleImplementations.events.action_rejected": "Approval rejected",
508
+ "ruleImplementations.events.action_deprecated": "Implementation deleted",
509
+ "ruleImplementations.events.action_draft": "Implementation on draft status",
510
+ "ruleImplementations.events.action_versioned": "Implementation versioned",
511
+
503
512
  "ruleImplementations.props.business_concept": "Concept",
504
513
  "ruleImplementations.props.last_change_at": "Last change at",
505
514
  "ruleImplementations.props.status": "Status",
@@ -91,7 +91,7 @@ export default {
91
91
  "populationForm.selectAll.text": "Seleccionar todos los datos",
92
92
  "quality_result.failed": "Fallida",
93
93
  "quality_result.no_execution": "No ejecutada",
94
- "quality_result.over_goal": "Cumpleee el objetivo",
94
+ "quality_result.over_goal": "Cumple el objetivo",
95
95
  "quality_result.under_goal": "Por debajo del objetivo",
96
96
  "quality_result.under_minimum": "Por debajo del umbral",
97
97
  "quality_result.under_minumum": "Por debajo del umbral",
@@ -435,7 +435,8 @@ export default {
435
435
  "ruleImplementation.operator.regex_format": "cumple la expresión regular",
436
436
  "ruleImplementation.operator.starts_with.string": "empieza por",
437
437
  "ruleImplementation.operator.starts_with": "empieza por",
438
- "ruleImplementation.operator.unique": "tiene valor único",
438
+ "ruleImplementation.operator.unique": "único",
439
+ "ruleImplementation.operator.unique.field_list": "único en conjunto",
439
440
  "ruleImplementation.operator.variation_on_count.string": "variación conteo",
440
441
  "ruleImplementation.operator.variation_on_count": "variación conteo",
441
442
  "ruleImplementation.props.esquema.placeholder": "añade una estructura",
@@ -507,14 +508,20 @@ export default {
507
508
  "El contenido introducido no está permitido: {invalid_content}",
508
509
  "ruleImplementations.actions.create": "Crear nueva implementación",
509
510
  "ruleImplementations.actions.edit": "Editar implementación",
510
- "ruleImplementations.events.action_created":
511
- "Implementación creada en regla: {0}",
512
511
  "ruleImplementations.events.action_changed": "Campo {0} actualizado a {1}",
513
512
  "ruleImplementations.events.action_deprecated": "Implementación archivada",
514
513
  "ruleImplementations.events.action_moved":
515
514
  "Implementación movida a la regla: {0}",
516
515
  "ruleImplementations.events.action_restored": "Implementación restaurada",
517
516
  "ruleImplementations.events.action_updated": "Implementación actualizada",
517
+
518
+ "ruleImplementations.events.action_published": "Implementación publicada",
519
+ "ruleImplementations.events.action_pending_approval": "Aprobación solicitada",
520
+ "ruleImplementations.events.action_rejected": "Aprobación rechazada",
521
+ "ruleImplementations.events.action_deprecated": "Implementación Eliminada",
522
+ "ruleImplementations.events.action_draft": "Implementación en borrador",
523
+ "ruleImplementations.events.action_versioned": "Implementación versionada",
524
+
518
525
  "ruleImplementations.props.business_concept": "Concepto",
519
526
  "ruleImplementations.props.last_change_at": "Fecha de última modificación",
520
527
  "ruleImplementations.props.executable.false": "Interna",
@@ -597,7 +604,7 @@ export default {
597
604
  "rules.events.action_changed_to": "Campo {0} actualizado a {1}",
598
605
  "rules.events.action_updated": "Regla actualizada",
599
606
  "ruleImplementations.events.action_created":
600
- "Implementación creada en regla: {0}",
607
+ "Implementación creada",
601
608
  "ruleImplementations.events.action_changed": "Campo {0} actualizado a {1}",
602
609
  "ruleImplementations.events.action_deprecated": "Implementación archivada",
603
610
  "ruleImplementations.events.action_moved":
@@ -127,6 +127,28 @@ describe("selectors: getParsedEvents", () => {
127
127
  },
128
128
  ts: "2021-10-20T07:56:45.891087Z",
129
129
  },
130
+ {
131
+ id: 15762,
132
+ service: "td_dd",
133
+ resource_id: 1130,
134
+ resource_type: "implementation",
135
+ event: "implementation_status_updated",
136
+ payload: {
137
+ domain_ids: [386],
138
+ implementation_key: "prueba de estados de audit",
139
+ status: "rejected",
140
+ },
141
+ user_id: 1,
142
+ user_name: null,
143
+ user: {
144
+ email: "user@user.com",
145
+ external_id: "",
146
+ full_name: "user",
147
+ id: 1,
148
+ user_name: "user",
149
+ },
150
+ ts: "2022-06-29T10:07:30.260906Z",
151
+ },
130
152
  ];
131
153
 
132
154
  const parsed = [
@@ -158,6 +180,15 @@ describe("selectors: getParsedEvents", () => {
158
180
  { action: "changed", field: "tags", value: "et" },
159
181
  ],
160
182
  },
183
+ {
184
+ ...events[4],
185
+ payload: [
186
+ {
187
+ action: "rejected",
188
+ field: "prueba de estados de audit",
189
+ },
190
+ ],
191
+ },
161
192
  ];
162
193
 
163
194
  it("should return all the events with the new payload", () => {
@@ -86,6 +86,16 @@ const getParsedEvents = createSelector([getEvents], (events) => {
86
86
  }))
87
87
  )(d),
88
88
  };
89
+ case "implementation_status_updated":
90
+ return {
91
+ ...d,
92
+ payload: [
93
+ {
94
+ field: _.path("payload.implementation_key")(d),
95
+ action: _.path("payload.status")(d),
96
+ },
97
+ ],
98
+ };
89
99
  case "rule_created":
90
100
  return {
91
101
  ...d,
@@ -5,6 +5,7 @@ const defaultOperators = {
5
5
  any: {
6
6
  operators: [
7
7
  { name: "unique", scope: "validation" },
8
+ { name: "unique", value_type: "field_list" },
8
9
  { name: "not_empty" },
9
10
  { name: "empty" },
10
11
  {