@truedat/df 5.8.2 → 5.8.4

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@truedat/df",
3
- "version": "5.8.2",
3
+ "version": "5.8.4",
4
4
  "description": "Truedat Web Data Quality Module",
5
5
  "sideEffects": false,
6
6
  "jsnext:main": "src/index.js",
@@ -34,7 +34,7 @@
34
34
  "@testing-library/jest-dom": "^5.16.5",
35
35
  "@testing-library/react": "^12.0.0",
36
36
  "@testing-library/user-event": "^13.2.1",
37
- "@truedat/test": "5.8.2",
37
+ "@truedat/test": "5.8.4",
38
38
  "babel-jest": "^28.1.0",
39
39
  "babel-plugin-dynamic-import-node": "^2.3.3",
40
40
  "babel-plugin-lodash": "^3.3.4",
@@ -87,8 +87,8 @@
87
87
  },
88
88
  "dependencies": {
89
89
  "@apollo/client": "^3.7.1",
90
- "@truedat/auth": "5.8.2",
91
- "@truedat/core": "5.8.2",
90
+ "@truedat/auth": "5.8.4",
91
+ "@truedat/core": "5.8.4",
92
92
  "decode-uri-component": "^0.2.2",
93
93
  "path-to-regexp": "^1.7.0",
94
94
  "prop-types": "^15.8.1",
@@ -109,5 +109,5 @@
109
109
  "react-dom": ">= 16.8.6 < 17",
110
110
  "semantic-ui-react": ">= 2.0.3 < 2.2"
111
111
  },
112
- "gitHead": "4eddd0a75147c3ce81b15c491edea1e414a33897"
112
+ "gitHead": "7dfd208b88f5e98b40dde7797a58db8a64fef37d"
113
113
  }
@@ -1,5 +1,5 @@
1
1
  import _ from "lodash/fp";
2
- import React, { useState } from "react";
2
+ import React, { useState, useEffect } from "react";
3
3
  import PropTypes from "prop-types";
4
4
  import { Form } from "semantic-ui-react";
5
5
  import { HierarchySelector } from "@truedat/core/components";
@@ -7,7 +7,7 @@ import { HierarchySelector } from "@truedat/core/components";
7
7
  const pickId = _.cond([
8
8
  [_.eq(""), _.constant(null)],
9
9
  [_.isString, _.identity],
10
- [_.conformsTo({ id: _.isString }), _.flow(_.prop("id"))],
10
+ [_.conformsTo({ id: _.isString }), _.prop("id")],
11
11
  [_.stubTrue, _.constant(null)],
12
12
  ]);
13
13
 
@@ -31,6 +31,21 @@ export const HierarchyDropdown = ({
31
31
  return onChange(e, { name, value: idOrIds(value) });
32
32
  };
33
33
 
34
+ // TODO: Refactor so that the information of the nodes is obtained through the API,
35
+ // and not by this function
36
+ useEffect(() => {
37
+ _.cond([
38
+ [
39
+ (v) => _.isArray(v) && _.any(_.isObject)(v),
40
+ () => handleChange(null, { value: currentValue }),
41
+ ],
42
+ [
43
+ (v) => _.has("name")(v),
44
+ () => handleChange(null, { value: currentValue }),
45
+ ],
46
+ ])(currentValue);
47
+ }, [currentValue]);
48
+
34
49
  const multiple = _.includes(cardinality)(["+", "*"]);
35
50
  return (
36
51
  <>
@@ -26,7 +26,7 @@ export default {
26
26
  "hierarchy.name": "Hierarchy name",
27
27
  "hierarchy.new_node": "New node",
28
28
  "hierarchy.node": "Node",
29
- "hierarchy.selectable.mindepth": "Selectable minimum level: {depth}",
29
+ "hierarchy.selectable.mindepth": "Minimum selectable level: {depth}",
30
30
  "navigation.admin.templates": "Templates",
31
31
  "navigation.hierarchies": "Hierarchies",
32
32
  "navigation.templates": "Templates",
@@ -70,8 +70,7 @@ export default {
70
70
  "template.field.type.copy": "File Structure",
71
71
  "template.field.type.date": "Date",
72
72
  "template.field.type.datetime": "Date Time",
73
- "template.field.type.depth":
74
- "Selectable minimun level (to allow everything, set value: 0)",
73
+ "template.field.type.depth": "Minimum selectable level",
75
74
  "template.field.type.domain": "Domain",
76
75
  "template.field.type.enriched_text": "Enriched text",
77
76
  "template.field.type.float": "Float",
@@ -26,7 +26,7 @@ export default {
26
26
  "hierarchy.name": "Nombre de jerarquía",
27
27
  "hierarchy.new_node": "Nuevo nodo",
28
28
  "hierarchy.node": "Nodo",
29
- "hierarchy.selectable.mindepth": "Nivel minimo seleccionable: {depth}",
29
+ "hierarchy.selectable.mindepth": "Nivel mínimo seleccionable: {depth}",
30
30
  "navigation.admin.templates": "Plantillas",
31
31
  "navigation.hierarchies": "Jerarquías",
32
32
  "navigation.templates": "Plantillas",
@@ -70,8 +70,7 @@ export default {
70
70
  "template.field.type.copy": "Estructura de Fichero",
71
71
  "template.field.type.date": "Fecha",
72
72
  "template.field.type.datetime": "Fecha Hora",
73
- "template.field.type.depth":
74
- "Nivel mínimo seleccionable (para permitir todo, establecer valor: 0)",
73
+ "template.field.type.depth": "Nivel mínimo seleccionable",
75
74
  "template.field.type.domain": "Dominio",
76
75
  "template.field.type.enriched_text": "Texto enriquecido",
77
76
  "template.field.type.float": "Decimal",