@truedat/bg 7.5.2 → 7.5.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/bg",
3
- "version": "7.5.2",
3
+ "version": "7.5.4",
4
4
  "description": "Truedat Web Business Glossary",
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": "7.5.2",
37
+ "@truedat/test": "7.5.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",
@@ -86,9 +86,9 @@
86
86
  ]
87
87
  },
88
88
  "dependencies": {
89
- "@truedat/core": "7.5.2",
90
- "@truedat/df": "7.5.2",
91
- "@truedat/lm": "7.5.2",
89
+ "@truedat/core": "7.5.4",
90
+ "@truedat/df": "7.5.4",
91
+ "@truedat/lm": "7.5.4",
92
92
  "decode-uri-component": "^0.2.2",
93
93
  "file-saver": "^2.0.5",
94
94
  "moment": "^2.29.4",
@@ -111,5 +111,5 @@
111
111
  "react-dom": ">= 16.8.6 < 17",
112
112
  "semantic-ui-react": ">= 2.0.3 < 2.2"
113
113
  },
114
- "gitHead": "ad97d87e1fbf676638c24286299a661698e2271c"
114
+ "gitHead": "e41d75322f4e11f804d9e834c21f6416c8586963"
115
115
  }
@@ -67,7 +67,7 @@ describe("<ConceptCrumbs />", () => {
67
67
  id: 456,
68
68
  },
69
69
  sidemenuGlossarySubscopes: [],
70
- templates: [{ name: "someType", subscope: "someSubscope" }],
70
+ allTemplates: [{ name: "someType", subscope: "someSubscope" }],
71
71
  },
72
72
  };
73
73
  const { container } = render(<ConceptCrumbs />, renderOpts);
@@ -85,7 +85,7 @@ describe("<ConceptCrumbs />", () => {
85
85
  id: 456,
86
86
  },
87
87
  sidemenuGlossarySubscopes: ["someSubscope"],
88
- templates: [{ name: "someType", subscope: "someSubscope" }],
88
+ allTemplates: [{ name: "someType", subscope: "someSubscope" }],
89
89
  },
90
90
  };
91
91
  const { container } = render(<ConceptCrumbs />, renderOpts);
@@ -120,7 +120,7 @@ describe("<ConceptCrumbs />", () => {
120
120
  business_concept_id: 123,
121
121
  id: 456,
122
122
  },
123
- templates: [{ name: "someType", subscope: "someSubscope" }],
123
+ allTemplates: [{ name: "someType", subscope: "someSubscope" }],
124
124
  },
125
125
  };
126
126
  const props = {
@@ -141,7 +141,7 @@ describe("<ConceptCrumbs />", () => {
141
141
  id: 456,
142
142
  },
143
143
  sidemenuGlossarySubscopes: ["someSubscope"],
144
- templates: [{ name: "someType", subscope: "someSubscope" }],
144
+ allTemplates: [{ name: "someType", subscope: "someSubscope" }],
145
145
  },
146
146
  };
147
147
  const props = {
@@ -4,7 +4,7 @@ describe("getConceptSubscope", () => {
4
4
  it("returns the subscope string if concept type matches a template", () => {
5
5
  const state = {
6
6
  concept: { id: 123, type: "someType" },
7
- templates: [{ name: "someType", subscope: "someSubscope" }],
7
+ allTemplates: [{ name: "someType", subscope: "someSubscope" }],
8
8
  };
9
9
  const result = getConceptSubscope(state);
10
10
  expect(result).toBe("someSubscope");
@@ -13,7 +13,7 @@ describe("getConceptSubscope", () => {
13
13
  it("returns null if concept exists but no template matches its type", () => {
14
14
  const state = {
15
15
  concept: { id: 123, type: "otherType" },
16
- templates: [{ name: "someType", subscope: "someSubscope" }],
16
+ allTemplates: [{ name: "someType", subscope: "someSubscope" }],
17
17
  };
18
18
  const result = getConceptSubscope(state);
19
19
  expect(result).toBeNull();
@@ -22,14 +22,14 @@ describe("getConceptSubscope", () => {
22
22
  it("returns undefined if concept is missing or has no id", () => {
23
23
  const stateA = {
24
24
  concept: undefined, // No concept at all
25
- templates: [{ name: "someType", subscope: "someSubscope" }],
25
+ allTemplates: [{ name: "someType", subscope: "someSubscope" }],
26
26
  };
27
27
  const resultA = getConceptSubscope(stateA);
28
28
  expect(resultA).toBeUndefined();
29
29
 
30
30
  const stateB = {
31
31
  concept: {}, // Concept object but no id
32
- templates: [{ name: "someType", subscope: "someSubscope" }],
32
+ allTemplates: [{ name: "someType", subscope: "someSubscope" }],
33
33
  };
34
34
  const resultB = getConceptSubscope(stateB);
35
35
  expect(resultB).toBeUndefined();
@@ -11,7 +11,7 @@ describe("getConceptVersionPath selector (no mocks)", () => {
11
11
  status: "published",
12
12
  },
13
13
  // No matching template => the sub-scope will be null
14
- templates: [{ name: "SomeOtherType", subscope: "someScope" }],
14
+ allTemplates: [{ name: "SomeOtherType", subscope: "someScope" }],
15
15
  sidemenuGlossarySubscopes: undefined,
16
16
  };
17
17
 
@@ -31,7 +31,7 @@ describe("getConceptVersionPath selector (no mocks)", () => {
31
31
  status: "published",
32
32
  // no 'id' property
33
33
  },
34
- templates: [{ name: "Foo", subscope: "myScope" }],
34
+ allTemplates: [{ name: "Foo", subscope: "myScope" }],
35
35
  sidemenuGlossarySubscopes: ["myScope"],
36
36
  };
37
37
 
@@ -53,7 +53,7 @@ describe("getConceptVersionPath selector (no mocks)", () => {
53
53
  status: "draft",
54
54
  type: "Foo",
55
55
  },
56
- templates: [{ name: "Foo", subscope: "myScope" }],
56
+ allTemplates: [{ name: "Foo", subscope: "myScope" }],
57
57
  sidemenuGlossarySubscopes: ["otherScope"],
58
58
  };
59
59
 
@@ -78,7 +78,7 @@ describe("getConceptVersionPath selector (no mocks)", () => {
78
78
  status: "deprecated",
79
79
  type: "Foo",
80
80
  },
81
- templates: [{ name: "Foo", subscope: "myScope" }],
81
+ allTemplates: [{ name: "Foo", subscope: "myScope" }],
82
82
  sidemenuGlossarySubscopes: ["anotherScope"],
83
83
  };
84
84
 
@@ -103,7 +103,7 @@ describe("getConceptVersionPath selector (no mocks)", () => {
103
103
  status: "published",
104
104
  type: "SideMenuScope",
105
105
  },
106
- templates: [{ name: "SideMenuScope", subscope: "someSubscope" }],
106
+ allTemplates: [{ name: "SideMenuScope", subscope: "someSubscope" }],
107
107
  sidemenuGlossarySubscopes: ["someSubscope"],
108
108
  };
109
109
 
@@ -125,7 +125,7 @@ describe("getConceptVersionPath selector (no mocks)", () => {
125
125
  status: "draft",
126
126
  type: "SideMenuScope",
127
127
  },
128
- templates: [{ name: "SideMenuScope", subscope: "subscopeA" }],
128
+ allTemplates: [{ name: "SideMenuScope", subscope: "subscopeA" }],
129
129
  sidemenuGlossarySubscopes: ["subscopeA"],
130
130
  };
131
131
 
@@ -149,7 +149,7 @@ describe("getConceptVersionPath selector (no mocks)", () => {
149
149
  status: "published",
150
150
  type: "SideMenuScope",
151
151
  },
152
- templates: [{ name: "SideMenuScope", subscope: "subscopeA" }],
152
+ allTemplates: [{ name: "SideMenuScope", subscope: "subscopeA" }],
153
153
  sidemenuGlossarySubscopes: ["subscopeA"],
154
154
  };
155
155
 
@@ -170,7 +170,7 @@ describe("getConceptVersionPath selector (no mocks)", () => {
170
170
  status: "published",
171
171
  type: "NoSubscope",
172
172
  },
173
- templates: [{ name: "NoSubscope", subscope: null }],
173
+ allTemplates: [{ name: "NoSubscope", subscope: null }],
174
174
  sidemenuGlossarySubscopes: ["subscopeA"],
175
175
  };
176
176
 
@@ -2,7 +2,7 @@ import { createSelector } from "reselect";
2
2
  import _ from "lodash/fp";
3
3
 
4
4
  export const getConcept = _.prop("concept");
5
- export const getTemplates = _.prop("templates");
5
+ export const getTemplates = _.prop("allTemplates");
6
6
 
7
7
  export const getConceptSubscope = createSelector(
8
8
  [getConcept, getTemplates],