@truedat/dd 5.4.1 → 5.4.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [5.4.2] 2023-03-27
4
+
5
+ ## Fixed
6
+
7
+ - [TD-5644] Some data is not displayed in structures with dataStructureVersion
8
+ v2 endpoint
9
+
3
10
  ## [5.4.0] 2023-03-21
4
11
 
5
12
  ### Added
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@truedat/dd",
3
- "version": "5.4.1",
3
+ "version": "5.4.2",
4
4
  "description": "Truedat Web Data Dictionary",
5
5
  "sideEffects": false,
6
6
  "jsnext:main": "src/index.js",
@@ -87,9 +87,9 @@
87
87
  },
88
88
  "dependencies": {
89
89
  "@apollo/client": "^3.7.1",
90
- "@truedat/auth": "5.4.1",
91
- "@truedat/core": "5.4.1",
92
- "@truedat/df": "5.4.1",
90
+ "@truedat/auth": "5.4.2",
91
+ "@truedat/core": "5.4.2",
92
+ "@truedat/df": "5.4.2",
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": "9fe624f3a1f5366c03d532c68e741622e8356608"
117
+ "gitHead": "09ddfaaacecfd66661249fe1f2009794cc5e4362"
118
118
  }
@@ -410,10 +410,26 @@ export const DATA_STRUCTURE_VERSION_QUERY = gql`
410
410
  classes
411
411
  data_structure_id
412
412
  deleted_at
413
+ description
414
+ degree {
415
+ in
416
+ out
417
+ }
418
+ links
413
419
  id
414
420
  metadata
415
421
  name
416
422
  type
423
+ profile {
424
+ max
425
+ min
426
+ most_frequent
427
+ null_count
428
+ patterns
429
+ total_count
430
+ unique_count
431
+ value
432
+ }
417
433
  note(select_fields: $note_fields)
418
434
  }
419
435
  relations {
@@ -424,9 +440,6 @@ export const DATA_STRUCTURE_VERSION_QUERY = gql`
424
440
  data_structure_id
425
441
  name
426
442
  type
427
- structure_type {
428
- translation
429
- }
430
443
  }
431
444
  relation_type {
432
445
  name
@@ -440,14 +453,12 @@ export const DATA_STRUCTURE_VERSION_QUERY = gql`
440
453
  data_structure_id
441
454
  name
442
455
  type
443
- structure_type {
444
- translation
445
- }
446
456
  }
447
457
  relation_type {
448
458
  name
449
459
  description
450
460
  }
461
+ links
451
462
  }
452
463
  }
453
464
 
@@ -128,16 +128,28 @@ describe("selectors: getTabVisibility", () => {
128
128
  });
129
129
  });
130
130
 
131
- it("should include events iff structureVersion is empty", () => {
132
- expect(getTabVisibility({})).toMatchObject({ events: true });
131
+ it("should not include events iff structureVersion is empty", () => {
132
+ expect(getTabVisibility({})).toMatchObject({ events: false });
133
133
  expect(getTabVisibility({ structureVersion: {} })).toMatchObject({
134
- events: true,
134
+ events: false,
135
135
  });
136
136
  expect(getTabVisibility({ structureVersion: "whatever" })).toMatchObject({
137
137
  events: false,
138
138
  });
139
139
  });
140
140
 
141
+ it("should not include events iff structureVersion is not latest", () => {
142
+ expect(getTabVisibility({ structureVersion: "whatever" })).toMatchObject({
143
+ events: false,
144
+ });
145
+ });
146
+
147
+ it("should include events iff structureVersion is latest", () => {
148
+ expect(getTabVisibility({ structureVersion: "latest" })).toMatchObject({
149
+ events: true,
150
+ });
151
+ });
152
+
141
153
  it("should include rules iff structure.implementation_count is greater than 0", () => {
142
154
  expect(getTabVisibility({})).toMatchObject({ rules: false });
143
155
  expect(
@@ -44,7 +44,10 @@ const lineageTabVisible = _.anyPass([_.path("structure.degree.in")]);
44
44
  const impactTabVisible = _.anyPass([_.path("structure.degree.out")]);
45
45
  const parentsTabVisible = _.conformsTo({ parentRelations: notEmpty });
46
46
  const childrenTabVisible = _.conformsTo({ childrenRelations: notEmpty });
47
- const eventsTabVisible = _.flow(_.prop("structureVersion"), _.isEmpty);
47
+ const eventsTabVisible = _.flow(
48
+ _.prop("structureVersion"),
49
+ _.isEqual("latest")
50
+ );
48
51
  const grantsTabVisible = _.flow(_.path("structure.grants"), notEmpty);
49
52
 
50
53
  export const getTabVisibility = (state) => ({