@truedat/dd 4.48.7 → 4.48.8

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.
@@ -1,81 +1,78 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
3
  exports[`<StructureFieldRow /> matches the latest snapshot 1`] = `
4
- <TableRow
5
- as="tr"
6
- cellAs="td"
7
- key="1"
8
- >
9
- <TableCell
10
- as="td"
11
- content={
12
- <Link
13
- to="/structures/1"
4
+ <div>
5
+ <table>
6
+ <tbody>
7
+ <tr
8
+ class=""
14
9
  >
15
- f1
16
- </Link>
17
- }
18
- key="0"
19
- />
20
- <TableCell
21
- as="td"
22
- content={
23
- <Memo(MemoizedFormattedMessage)
24
- defaultMessage="tp"
25
- id="structure.type.tp"
26
- />
27
- }
28
- key="1"
29
- />
30
- <TableCell
31
- as="td"
32
- content="22"
33
- key="2"
34
- />
35
- <TableCell
36
- as="td"
37
- content={
38
- <Memo(MemoizedFormattedMessage)
39
- id="structure.field.nullable.true"
40
- />
41
- }
42
- key="3"
43
- />
44
- <TableCell
45
- as="td"
46
- content="dd"
47
- key="4"
48
- />
49
- <TableCell
50
- as="td"
51
- key="5"
52
- />
53
- <TableCell
54
- as="td"
55
- key="6"
56
- textAlign="center"
57
- />
58
- <TableCell
59
- as="td"
60
- content={
61
- <List>
62
- <ListItem>
63
- <Link
64
- to="/concepts/2/versions/current"
10
+ <td
11
+ class=""
12
+ >
13
+ <a
14
+ href="/structures/1"
65
15
  >
66
- Bar
67
- </Link>
68
- </ListItem>
69
- <ListItem>
70
- <Link
71
- to="/concepts/1/versions/current"
16
+ f1
17
+ </a>
18
+ </td>
19
+ <td
20
+ class=""
21
+ >
22
+ tp
23
+ </td>
24
+ <td
25
+ class=""
26
+ >
27
+ 22
28
+ </td>
29
+ <td
30
+ class=""
31
+ >
32
+ Yes
33
+ </td>
34
+ <td
35
+ class=""
36
+ >
37
+ dd
38
+ </td>
39
+ <td
40
+ class=""
41
+ />
42
+ <td
43
+ class="center aligned"
44
+ />
45
+ <td
46
+ class=""
47
+ >
48
+ <div
49
+ class="ui list"
50
+ role="list"
72
51
  >
73
- foo
74
- </Link>
75
- </ListItem>
76
- </List>
77
- }
78
- key="7"
79
- />
80
- </TableRow>
52
+ <div
53
+ class="item"
54
+ role="listitem"
55
+ >
56
+ <a
57
+ href="/concepts/2/versions/current"
58
+ >
59
+ Bar
60
+ </a>
61
+ </div>
62
+ <div
63
+ class="item"
64
+ role="listitem"
65
+ >
66
+ <a
67
+ href="/concepts/1/versions/current"
68
+ >
69
+ foo
70
+ </a>
71
+ </div>
72
+ </div>
73
+ </td>
74
+ </tr>
75
+ </tbody>
76
+ </table>
77
+ </div>
81
78
  `;
@@ -1,166 +1,138 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
3
  exports[`<StructureFields /> matches the latest snapshot 1`] = `
4
- <Table
5
- as="table"
6
- >
7
- <TableHeader
8
- as="thead"
4
+ <div>
5
+ <table
6
+ class="ui table"
9
7
  >
10
- <TableRow
11
- as="tr"
12
- cellAs="td"
8
+ <thead
9
+ class=""
13
10
  >
14
- <TableHeaderCell
15
- as="th"
16
- content={
17
- <Memo(MemoizedFormattedMessage)
18
- id="structure.field.name"
19
- />
20
- }
21
- key="0"
22
- />
23
- <TableHeaderCell
24
- as="th"
25
- content={
26
- <Memo(MemoizedFormattedMessage)
27
- id="structure.field.type"
28
- />
29
- }
30
- key="1"
31
- />
32
- <TableHeaderCell
33
- as="th"
34
- content={
35
- <Memo(MemoizedFormattedMessage)
36
- id="structure.field.precision"
37
- />
38
- }
39
- key="2"
40
- />
41
- <TableHeaderCell
42
- as="th"
43
- content={
44
- <Memo(MemoizedFormattedMessage)
45
- id="structure.field.nullable"
46
- />
47
- }
48
- key="3"
49
- />
50
- <TableHeaderCell
51
- as="th"
52
- content={
53
- <Memo(MemoizedFormattedMessage)
54
- id="structure.field.description"
55
- />
56
- }
57
- key="4"
58
- />
59
- <TableHeaderCell
60
- as="th"
61
- content={
62
- <Memo(MemoizedFormattedMessage)
63
- id="structure.field.external_id"
64
- />
65
- }
66
- key="5"
67
- />
68
- <TableHeaderCell
69
- as="th"
70
- content={
71
- <Memo(MemoizedFormattedMessage)
72
- id="structure.field.links"
73
- />
74
- }
75
- key="6"
76
- />
77
- </TableRow>
78
- </TableHeader>
79
- <TableBody
80
- as="tbody"
81
- >
82
- <StructureFieldRow
83
- columns={
84
- Array [
85
- Object {
86
- "name": "name",
87
- },
88
- Object {
89
- "name": "type",
90
- },
91
- Object {
92
- "name": "precision",
93
- },
94
- Object {
95
- "name": "nullable",
96
- },
97
- Object {
98
- "name": "description",
99
- },
100
- Object {
101
- "name": "external_id",
102
- },
103
- Object {
104
- "name": "links",
105
- },
106
- ]
107
- }
108
- field={
109
- Object {
110
- "description": "desc1",
111
- "id": 123,
112
- "links": Array [
113
- Object {
114
- "id": 123,
115
- },
116
- ],
117
- "name": "field1",
118
- "nullable": true,
119
- "precision": "22",
120
- "type": "varchar",
121
- }
122
- }
123
- key="0"
124
- />
125
- <StructureFieldRow
126
- columns={
127
- Array [
128
- Object {
129
- "name": "name",
130
- },
131
- Object {
132
- "name": "type",
133
- },
134
- Object {
135
- "name": "precision",
136
- },
137
- Object {
138
- "name": "nullable",
139
- },
140
- Object {
141
- "name": "description",
142
- },
143
- Object {
144
- "name": "external_id",
145
- },
146
- Object {
147
- "name": "links",
148
- },
149
- ]
150
- }
151
- field={
152
- Object {
153
- "description": "desc2",
154
- "external_id": "foo",
155
- "id": 122,
156
- "name": "field2",
157
- "nullable": true,
158
- "precision": "22",
159
- "type": "varchar",
160
- }
161
- }
162
- key="1"
163
- />
164
- </TableBody>
165
- </Table>
11
+ <tr
12
+ class=""
13
+ >
14
+ <th
15
+ class=""
16
+ >
17
+ Field
18
+ </th>
19
+ <th
20
+ class=""
21
+ >
22
+ Type
23
+ </th>
24
+ <th
25
+ class=""
26
+ >
27
+ Precision
28
+ </th>
29
+ <th
30
+ class=""
31
+ >
32
+ Nullable
33
+ </th>
34
+ <th
35
+ class=""
36
+ >
37
+ Description
38
+ </th>
39
+ <th
40
+ class=""
41
+ >
42
+ Concepts
43
+ </th>
44
+ </tr>
45
+ </thead>
46
+ <tbody
47
+ class=""
48
+ >
49
+ <tr
50
+ class=""
51
+ >
52
+ <td
53
+ class=""
54
+ >
55
+ <a
56
+ href="/structures/1"
57
+ >
58
+ field1
59
+ </a>
60
+ </td>
61
+ <td
62
+ class=""
63
+ >
64
+ varchar
65
+ </td>
66
+ <td
67
+ class=""
68
+ >
69
+ 22
70
+ </td>
71
+ <td
72
+ class=""
73
+ >
74
+ Yes
75
+ </td>
76
+ <td
77
+ class=""
78
+ >
79
+ desc1
80
+ </td>
81
+ <td
82
+ class=""
83
+ >
84
+ <div
85
+ class="ui list"
86
+ role="list"
87
+ >
88
+ <div
89
+ class="item"
90
+ role="listitem"
91
+ >
92
+ <a
93
+ href="/concepts/123/versions/current"
94
+ />
95
+ </div>
96
+ </div>
97
+ </td>
98
+ </tr>
99
+ <tr
100
+ class=""
101
+ >
102
+ <td
103
+ class=""
104
+ >
105
+ <a
106
+ href="/structures/2"
107
+ >
108
+ field2
109
+ </a>
110
+ </td>
111
+ <td
112
+ class=""
113
+ >
114
+ varchar
115
+ </td>
116
+ <td
117
+ class=""
118
+ >
119
+ 22
120
+ </td>
121
+ <td
122
+ class=""
123
+ >
124
+ Yes
125
+ </td>
126
+ <td
127
+ class=""
128
+ >
129
+ desc2
130
+ </td>
131
+ <td
132
+ class=""
133
+ />
134
+ </tr>
135
+ </tbody>
136
+ </table>
137
+ </div>
166
138
  `;
@@ -227,17 +227,17 @@ export default {
227
227
  "structure.field.links": "Concepts",
228
228
  "structure.field.menu.link": "Link to Concept",
229
229
  "structure.field.name": "Field",
230
- "structure.field.nullable": "Nullable",
231
- "structure.field.nullable.false": "No",
232
- "structure.field.nullable.true": "Yes",
233
- "structure.field.optional": "Optional",
230
+ "structure.field.metadata.nullable": "Nullable",
231
+ "structure.field.metadata.nullable.false": "No",
232
+ "structure.field.metadata.nullable.true": "Yes",
233
+ "structure.field.metadata.optional": "Optional",
234
+ "structure.field.metadata.precision": "Precision",
235
+ "structure.field.metadata.type": "Type",
234
236
  "structure.field.patterns.count": "Count",
235
237
  "structure.field.patterns.frecuency": "Frecuency",
236
238
  "structure.field.patterns.percentage": "Percentage",
237
239
  "structure.field.patterns.title": "You are seeing the patterns of the field",
238
- "structure.field.precision": "Precision",
239
240
  "structure.field.required": "Required",
240
- "structure.field.type": "Type",
241
241
  "structure.fields.empty": "No field information available for this structure",
242
242
  "structure.filter.empty": "Empty",
243
243
  "structure.grant.has_grant": "You have granted access on this structure",
@@ -234,18 +234,18 @@ export default {
234
234
  "structure.field.has_df_content": "Info adicional",
235
235
  "structure.field.links": "Términos",
236
236
  "structure.field.menu.link": "Vincular a concepto",
237
+ "structure.field.metadata.nullable": "Opcional",
238
+ "structure.field.metadata.nullable.false": "No",
239
+ "structure.field.metadata.nullable.true": "Sí",
240
+ "structure.field.metadata.optional": "Opcional",
241
+ "structure.field.metadata.precision": "Precisión",
242
+ "structure.field.metadata.type": "Tipo",
237
243
  "structure.field.name": "Campo",
238
- "structure.field.nullable": "Opcional",
239
- "structure.field.nullable.false": "No",
240
- "structure.field.nullable.true": "Sí",
241
- "structure.field.optional": "Opcional",
242
244
  "structure.field.patterns.count": "Conteo",
243
245
  "structure.field.patterns.frecuency": "Patrones más frecuentes",
244
246
  "structure.field.patterns.percentage": "Porcentaje",
245
247
  "structure.field.patterns.title": "Estás viendo los patrones del campo",
246
- "structure.field.precision": "Precisión",
247
248
  "structure.field.required": "Requerido",
248
- "structure.field.type": "Tipo",
249
249
  "structure.fields.empty":
250
250
  "No se dispone de información sobre los campos de esta estructura",
251
251
  "structure.filter.empty": "Vacío",
@@ -7,8 +7,8 @@ const structureFields = (fn) =>
7
7
  _.flow(
8
8
  fn,
9
9
  _.pick([
10
+ "alias",
10
11
  "confidential",
11
- "latest_note",
12
12
  "domain_ids",
13
13
  "domains",
14
14
  "external_id",
@@ -25,17 +25,17 @@ const structureVersionFields = _.pick([
25
25
  "degree",
26
26
  "deleted_at",
27
27
  "description",
28
+ "grant",
29
+ "grants",
28
30
  "group",
29
31
  "implementations",
30
32
  "metadata",
31
33
  "name",
34
+ "note",
35
+ "siblings",
32
36
  "source",
33
37
  "system",
34
38
  "type",
35
- "grant",
36
- "grants",
37
- "siblings",
38
- "published_note",
39
39
  ]);
40
40
 
41
41
  const structure = (state = initialState, { type, payload }) => {
@@ -19,8 +19,8 @@ const pickFields = _.pick([
19
19
  "domain",
20
20
  "metadata",
21
21
  "mutable_metadata",
22
- "latest_note",
23
- "published_note",
22
+ "note",
23
+ "original_name",
24
24
  ]);
25
25
 
26
26
  const structures = (state = initialState, { type, payload }) => {
@@ -2,36 +2,36 @@ import { getSortedFields } from "..";
2
2
 
3
3
  const projects = [
4
4
  { name: "foo2", type: "project" },
5
- { name: "foo1", type: "project" }
5
+ { name: "foo1", type: "project" },
6
6
  ];
7
7
  const schemas = [
8
- { name: "bar2", type: "schema", order: 1 },
9
- { name: "bar1", type: "schema", order: 1 }
8
+ { name: "bar2", type: "schema", metadata: { order: 1 } },
9
+ { name: "bar1", type: "schema", metadata: { order: 1 } },
10
10
  ];
11
11
  const documents = [
12
12
  { name: "baz1", type: "document" },
13
- { name: "baz2", type: "document" }
13
+ { name: "baz2", type: "document" },
14
14
  ];
15
15
  const others = [
16
- { name: "bay1", type: "other", order: "0" },
17
- { name: "bay2", type: "other", order: "0" }
16
+ { name: "bay1", type: "other", metadata: { order: "0" } },
17
+ { name: "bay2", type: "other", metadata: { order: "0" } },
18
18
  ];
19
19
 
20
20
  describe("selectors: getSortedFields", () => {
21
21
  const state = {
22
- structureFields: [...documents, ...projects, ...schemas, ...others]
22
+ structureFields: [...documents, ...projects, ...schemas, ...others],
23
23
  };
24
24
  const foo = [
25
25
  ...others,
26
26
  ...[
27
- { name: "bar1", type: "schema", order: 1 },
28
- { name: "bar2", type: "schema", order: 1 }
27
+ { name: "bar1", type: "schema", metadata: { order: 1 } },
28
+ { name: "bar2", type: "schema", metadata: { order: 1 } },
29
29
  ],
30
30
  ...[
31
31
  { name: "foo1", type: "project" },
32
- { name: "foo2", type: "project" }
32
+ { name: "foo2", type: "project" },
33
33
  ],
34
- ...documents
34
+ ...documents,
35
35
  ];
36
36
  it("get fields sorted by type criteria and name", () => {
37
37
  expect(getSortedFields(state)).toEqual(foo);
@@ -1,20 +1,20 @@
1
- import _ from "lodash/fp";
2
1
  import { getStructureParent } from "..";
3
2
 
4
3
  const structureParents = [
5
4
  {
5
+ alias: "alias",
6
6
  id: "1",
7
7
  name: "structure",
8
8
  type: "structure type",
9
- published_note: { alias: "alias" },
10
9
  },
11
10
  ];
11
+
12
12
  const system = { id: "1", name: "system", type: "system" };
13
13
 
14
14
  const structure = {
15
15
  id: "1",
16
16
  name: "structure",
17
- system: _.omit(["type"])(system),
17
+ system: { id: "1", name: "system" },
18
18
  };
19
19
 
20
20
  describe("selectors: getStructureParent", () => {
@@ -24,17 +24,17 @@ describe("selectors: getStructureParent", () => {
24
24
  };
25
25
 
26
26
  it("get structure parent from state when is not empty", () => {
27
- const reply = _.flow(
28
- _.head,
29
- _.set("name", ".."),
30
- _.omit("published_note")
31
- )(structureParents);
32
- expect(getStructureParent(state)).toEqual(reply);
27
+ expect(getStructureParent(state)).toEqual({
28
+ alias: "alias",
29
+ id: "1",
30
+ name: "..",
31
+ type: "structure type",
32
+ });
33
33
  });
34
34
 
35
35
  it("get system as parent when structureParents is empty", () => {
36
36
  const state = { structureParents: [], structure };
37
- expect(getStructureParent(state)).toEqual(_.set("name", "..")(system));
37
+ expect(getStructureParent(state)).toEqual({ ...system, name: ".." });
38
38
  });
39
39
 
40
40
  it("get empty list when no parents nor structure", () => {