@truedat/dd 5.6.5 → 5.7.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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@truedat/dd",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.7.0",
|
|
4
4
|
"description": "Truedat Web Data Dictionary",
|
|
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.6.
|
|
37
|
+
"@truedat/test": "5.6.6",
|
|
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,9 +87,9 @@
|
|
|
87
87
|
},
|
|
88
88
|
"dependencies": {
|
|
89
89
|
"@apollo/client": "^3.7.1",
|
|
90
|
-
"@truedat/auth": "5.6.
|
|
91
|
-
"@truedat/core": "5.6.
|
|
92
|
-
"@truedat/df": "5.6.
|
|
90
|
+
"@truedat/auth": "5.6.6",
|
|
91
|
+
"@truedat/core": "5.6.6",
|
|
92
|
+
"@truedat/df": "5.6.6",
|
|
93
93
|
"lodash": "^4.17.21",
|
|
94
94
|
"moment": "^2.29.4",
|
|
95
95
|
"path-to-regexp": "^1.7.0",
|
|
@@ -114,5 +114,5 @@
|
|
|
114
114
|
"react-dom": ">= 16.8.6 < 17",
|
|
115
115
|
"semantic-ui-react": ">= 2.0.3 < 2.2"
|
|
116
116
|
},
|
|
117
|
-
"gitHead": "
|
|
117
|
+
"gitHead": "cf0b90c6409291b1b345dd0279b6f2c76bf8416d"
|
|
118
118
|
}
|
|
@@ -133,6 +133,11 @@ exports[`<StructuresGrantRequestView /> Clicking a grant request button triggers
|
|
|
133
133
|
>
|
|
134
134
|
System
|
|
135
135
|
</th>
|
|
136
|
+
<th
|
|
137
|
+
class="one wide ascending sorted disabled"
|
|
138
|
+
>
|
|
139
|
+
Relation Type
|
|
140
|
+
</th>
|
|
136
141
|
<th
|
|
137
142
|
class="one wide ascending sorted disabled"
|
|
138
143
|
>
|
|
@@ -172,6 +177,9 @@ exports[`<StructuresGrantRequestView /> Clicking a grant request button triggers
|
|
|
172
177
|
<td
|
|
173
178
|
class=""
|
|
174
179
|
/>
|
|
180
|
+
<td
|
|
181
|
+
class=""
|
|
182
|
+
/>
|
|
175
183
|
<td
|
|
176
184
|
class=""
|
|
177
185
|
>
|
|
@@ -213,6 +221,9 @@ exports[`<StructuresGrantRequestView /> Clicking a grant request button triggers
|
|
|
213
221
|
<td
|
|
214
222
|
class=""
|
|
215
223
|
/>
|
|
224
|
+
<td
|
|
225
|
+
class=""
|
|
226
|
+
/>
|
|
216
227
|
<td
|
|
217
228
|
class=""
|
|
218
229
|
>
|
|
@@ -254,6 +265,9 @@ exports[`<StructuresGrantRequestView /> Clicking a grant request button triggers
|
|
|
254
265
|
<td
|
|
255
266
|
class=""
|
|
256
267
|
/>
|
|
268
|
+
<td
|
|
269
|
+
class=""
|
|
270
|
+
/>
|
|
257
271
|
<td
|
|
258
272
|
class=""
|
|
259
273
|
>
|
|
@@ -173,6 +173,20 @@ describe("selectors: getParsedEvents", () => {
|
|
|
173
173
|
service: "My invented service 14",
|
|
174
174
|
};
|
|
175
175
|
|
|
176
|
+
const r15 = {
|
|
177
|
+
event: "structure_note_updated",
|
|
178
|
+
id: 15,
|
|
179
|
+
payload: [
|
|
180
|
+
{
|
|
181
|
+
action: "note_updated",
|
|
182
|
+
field: "",
|
|
183
|
+
value: "",
|
|
184
|
+
},
|
|
185
|
+
],
|
|
186
|
+
resource_id: 15,
|
|
187
|
+
service: "My invented service 15",
|
|
188
|
+
};
|
|
189
|
+
|
|
176
190
|
const events = [
|
|
177
191
|
{
|
|
178
192
|
id: 1,
|
|
@@ -261,7 +275,7 @@ describe("selectors: getParsedEvents", () => {
|
|
|
261
275
|
service: "My invented service 13",
|
|
262
276
|
event: "structure_note_updated",
|
|
263
277
|
resource_id: 13,
|
|
264
|
-
payload: { content: {
|
|
278
|
+
payload: { content: { added: { field_1: { id: 1, name: "foo" } } } },
|
|
265
279
|
},
|
|
266
280
|
{
|
|
267
281
|
id: 14,
|
|
@@ -270,11 +284,18 @@ describe("selectors: getParsedEvents", () => {
|
|
|
270
284
|
resource_id: 14,
|
|
271
285
|
payload: { content: { changed: { field_1: { id: 1, name: "foo" } } } },
|
|
272
286
|
},
|
|
287
|
+
{
|
|
288
|
+
id: 15,
|
|
289
|
+
service: "My invented service 15",
|
|
290
|
+
event: "structure_note_updated",
|
|
291
|
+
resource_id: 15,
|
|
292
|
+
payload: {},
|
|
293
|
+
},
|
|
273
294
|
];
|
|
274
295
|
|
|
275
296
|
it("should return all the events with the new payload", () => {
|
|
276
297
|
const res = getParsedEvents({ events, templates, structure });
|
|
277
|
-
expect(res).toHaveLength(
|
|
298
|
+
expect(res).toHaveLength(15);
|
|
278
299
|
expect(res).toEqual(
|
|
279
300
|
expect.arrayContaining([
|
|
280
301
|
r1,
|
|
@@ -291,6 +312,7 @@ describe("selectors: getParsedEvents", () => {
|
|
|
291
312
|
r12,
|
|
292
313
|
r13,
|
|
293
314
|
r14,
|
|
315
|
+
r15,
|
|
294
316
|
])
|
|
295
317
|
);
|
|
296
318
|
});
|
|
@@ -12,6 +12,8 @@ const transformFieldFormat = (field) =>
|
|
|
12
12
|
_.isBoolean(field) ? _.toString(field) : field;
|
|
13
13
|
|
|
14
14
|
const transformNotesPayloadFormat = (payload) => {
|
|
15
|
+
if (_.isEmpty(payload.content)) return "";
|
|
16
|
+
|
|
15
17
|
const addedFields = payload.content.added
|
|
16
18
|
? payload.content.added
|
|
17
19
|
: payload.content.changed;
|
|
@@ -15,6 +15,14 @@ const dateDecorator = (date) => (
|
|
|
15
15
|
<Moment locale="es" date={date} format="YYYY-MM-DD HH:mm" />
|
|
16
16
|
);
|
|
17
17
|
|
|
18
|
+
const relationTypeDecorator = _.map((relationTag) => (
|
|
19
|
+
<FormattedMessage
|
|
20
|
+
key={relationTag}
|
|
21
|
+
id={`conceptRelations.relationType.${relationTag}`}
|
|
22
|
+
defaultMessage={relationTag}
|
|
23
|
+
/>
|
|
24
|
+
));
|
|
25
|
+
|
|
18
26
|
export const defaultStructureColumns = [
|
|
19
27
|
{
|
|
20
28
|
name: "name",
|
|
@@ -33,6 +41,12 @@ export const defaultStructureColumns = [
|
|
|
33
41
|
sort: { name: "system.name.sort" },
|
|
34
42
|
width: 1,
|
|
35
43
|
},
|
|
44
|
+
{
|
|
45
|
+
name: "relation.relation_type_name",
|
|
46
|
+
fieldSelector: _.path("tags"),
|
|
47
|
+
fieldDecorator: relationTypeDecorator,
|
|
48
|
+
width: 1,
|
|
49
|
+
},
|
|
36
50
|
{ name: "group", width: 1 },
|
|
37
51
|
{
|
|
38
52
|
name: "updated_at",
|