@truedat/dd 4.53.9 → 4.53.11
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 +7 -0
- package/package.json +7 -7
- package/src/components/EditDomainPopup.js +1 -1
- package/src/components/GrantRequest.js +1 -1
- package/src/components/GrantSelectedFilters.js +2 -1
- package/src/components/LineageForm.js +5 -5
- package/src/components/LineageGraph.js +1 -1
- package/src/components/StructureTabPaneRoutes.js +2 -5
- package/src/components/StructureTabRoutes.js +2 -2
- package/src/components/StructureTabs.js +1 -1
- package/src/components/StructuresDomainsUploadOption.js +1 -1
- package/src/components/StructuresUploadOption.js +1 -1
- package/src/components/__tests__/StructureTabPane.spec.js +3 -6
- package/src/components/__tests__/__snapshots__/StructureTabRoutes.spec.js.snap +1 -1
- package/src/components/__tests__/__snapshots__/StructureTabs.spec.js.snap +1 -1
- package/src/reducers/structure.js +1 -1
- package/src/selectors/__tests__/getActiveTab.spec.js +2 -4
- package/src/selectors/__tests__/getTabVisibility.spec.js +3 -3
- package/src/selectors/getActiveTab.js +2 -2
- package/src/selectors/getGrantsColumns.js +1 -1
- package/src/selectors/getTabVisibility.js +1 -1
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@truedat/dd",
|
|
3
|
-
"version": "4.53.
|
|
3
|
+
"version": "4.53.11",
|
|
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.4",
|
|
35
35
|
"@testing-library/react": "^12.0.0",
|
|
36
36
|
"@testing-library/user-event": "^13.2.1",
|
|
37
|
-
"@truedat/test": "4.53.
|
|
37
|
+
"@truedat/test": "4.53.11",
|
|
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,10 +87,10 @@
|
|
|
87
87
|
]
|
|
88
88
|
},
|
|
89
89
|
"dependencies": {
|
|
90
|
-
"@apollo/client": "^3.
|
|
91
|
-
"@truedat/auth": "4.53.
|
|
92
|
-
"@truedat/core": "4.53.
|
|
93
|
-
"@truedat/df": "4.53.
|
|
90
|
+
"@apollo/client": "^3.7.0",
|
|
91
|
+
"@truedat/auth": "4.53.11",
|
|
92
|
+
"@truedat/core": "4.53.11",
|
|
93
|
+
"@truedat/df": "4.53.11",
|
|
94
94
|
"lodash": "^4.17.21",
|
|
95
95
|
"path-to-regexp": "^1.7.0",
|
|
96
96
|
"prop-types": "^15.8.1",
|
|
@@ -112,5 +112,5 @@
|
|
|
112
112
|
"react-dom": ">= 16.8.6 < 17",
|
|
113
113
|
"semantic-ui-react": ">= 0.88.2 < 2.1"
|
|
114
114
|
},
|
|
115
|
-
"gitHead": "
|
|
115
|
+
"gitHead": "f0bff07f7491edcbe2195f2ff9d0ef74736edef9"
|
|
116
116
|
}
|
|
@@ -19,7 +19,8 @@ import {
|
|
|
19
19
|
const translations = (formatMessage) => ({
|
|
20
20
|
"active.raw": (v) =>
|
|
21
21
|
formatMessage({ id: `filters.active.raw.${v}`, defaultMessage: v }),
|
|
22
|
-
"execution_result_info.result_text": (v) =>
|
|
22
|
+
"execution_result_info.result_text": (v) =>
|
|
23
|
+
formatMessage({ id: v, defaultMessage: v }),
|
|
23
24
|
});
|
|
24
25
|
|
|
25
26
|
export const mapStateToProps = (state, ownProps) => {
|
|
@@ -176,12 +176,12 @@ export const LineageForm = ({
|
|
|
176
176
|
<Form.Field>
|
|
177
177
|
<Form.Radio
|
|
178
178
|
disabled={disabled}
|
|
179
|
-
name=
|
|
179
|
+
name="allLevels"
|
|
180
180
|
label={formatMessage({
|
|
181
181
|
id: "lineage.form.levels.all.label",
|
|
182
182
|
defaultMessage: "All",
|
|
183
183
|
})}
|
|
184
|
-
value=
|
|
184
|
+
value="all"
|
|
185
185
|
checked={selectLevels === "all"}
|
|
186
186
|
onChange={(e, { value }) => setSelectLevels(value)}
|
|
187
187
|
/>
|
|
@@ -189,9 +189,9 @@ export const LineageForm = ({
|
|
|
189
189
|
<Form.Field>
|
|
190
190
|
<Form.Radio
|
|
191
191
|
disabled={disabled}
|
|
192
|
-
name=
|
|
192
|
+
name="selectLevels"
|
|
193
193
|
checked={selectLevels === "select"}
|
|
194
|
-
value=
|
|
194
|
+
value="select"
|
|
195
195
|
onChange={(e, { value }) => setSelectLevels(value)}
|
|
196
196
|
label={formatMessage({
|
|
197
197
|
id: "lineage.form.levels.select.label",
|
|
@@ -212,7 +212,7 @@ export const LineageForm = ({
|
|
|
212
212
|
value={levels || ""}
|
|
213
213
|
autoComplete="off"
|
|
214
214
|
onChange={(e) => changeLevels(e)}
|
|
215
|
-
min=
|
|
215
|
+
min="1"
|
|
216
216
|
/>
|
|
217
217
|
</Form.Field>
|
|
218
218
|
<Button
|
|
@@ -109,7 +109,7 @@ export const LineageGraph = ({
|
|
|
109
109
|
<Loader size="large">
|
|
110
110
|
<FormattedMessage
|
|
111
111
|
id="lineage.graph.loading"
|
|
112
|
-
defaultMessage=
|
|
112
|
+
defaultMessage="Analyzing..."
|
|
113
113
|
/>
|
|
114
114
|
{loadingInfo?.data?.graph_hash && loadingInfo?.data?.status && (
|
|
115
115
|
<p>
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
STRUCTURE_NOTES,
|
|
13
13
|
STRUCTURE_PARENTS,
|
|
14
14
|
STRUCTURE_PROFILE,
|
|
15
|
-
|
|
15
|
+
STRUCTURE_RULES,
|
|
16
16
|
STRUCTURE_VERSION,
|
|
17
17
|
STRUCTURE_VERSIONS,
|
|
18
18
|
STRUCTURE_VERSION_VERSIONS,
|
|
@@ -30,10 +30,7 @@ export const StructureTabPaneRoutes = ({}) => (
|
|
|
30
30
|
<Route path={STRUCTURE_NOTES} component={StructureTabPane} />
|
|
31
31
|
<Route path={STRUCTURE_GRANTS} component={StructureTabPane} />
|
|
32
32
|
<Route path={STRUCTURE_METADATA} component={StructureTabPane} />
|
|
33
|
-
<Route
|
|
34
|
-
path={STRUCTURE_RULES_IMPLEMENTATIONS}
|
|
35
|
-
component={StructureTabPane}
|
|
36
|
-
/>
|
|
33
|
+
<Route path={STRUCTURE_RULES} component={StructureTabPane} />
|
|
37
34
|
<Route path={STRUCTURE_CHILDREN} component={StructureTabPane} />
|
|
38
35
|
<Route path={STRUCTURE_PARENTS} component={StructureTabPane} />
|
|
39
36
|
<Route path={STRUCTURE_LINEAGE} component={StructureTabPane} />
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
STRUCTURE_NOTES,
|
|
12
12
|
STRUCTURE_PARENTS,
|
|
13
13
|
STRUCTURE_PROFILE,
|
|
14
|
-
|
|
14
|
+
STRUCTURE_RULES,
|
|
15
15
|
STRUCTURE_VERSION,
|
|
16
16
|
STRUCTURE_VERSIONS,
|
|
17
17
|
STRUCTURE_VERSION_VERSIONS,
|
|
@@ -29,7 +29,7 @@ export const StructureTabRoutes = () => (
|
|
|
29
29
|
<Route path={STRUCTURE_EVENTS} component={StructureTabs} />
|
|
30
30
|
<Route path={STRUCTURE_METADATA} component={StructureTabs} />
|
|
31
31
|
<Route path={STRUCTURE_NOTES} component={StructureTabs} />
|
|
32
|
-
<Route path={
|
|
32
|
+
<Route path={STRUCTURE_RULES} component={StructureTabs} />
|
|
33
33
|
<Route path={STRUCTURE_LINEAGE} component={StructureTabs} />
|
|
34
34
|
<Route path={STRUCTURE_CHILDREN} component={StructureTabs} />
|
|
35
35
|
<Route path={STRUCTURE_PARENTS} component={StructureTabs} />
|
|
@@ -94,7 +94,7 @@ export const StructureTabs = ({
|
|
|
94
94
|
{
|
|
95
95
|
active: activeTab === "rules",
|
|
96
96
|
as: Link,
|
|
97
|
-
to: linkTo.
|
|
97
|
+
to: linkTo.STRUCTURE_RULES(structure),
|
|
98
98
|
content: rules ? formatMessage({ id: "tabs.dd.rules" }) : false,
|
|
99
99
|
key: "rules",
|
|
100
100
|
},
|
|
@@ -30,7 +30,7 @@ export const StructuresDomainsUploadOption = ({
|
|
|
30
30
|
content={formatMessage({
|
|
31
31
|
id: "structures.actions.uploadDomains.confirmation.content",
|
|
32
32
|
})}
|
|
33
|
-
param=
|
|
33
|
+
param="structures_domains"
|
|
34
34
|
handleSubmit={(data) =>
|
|
35
35
|
uploadStructuresDomains({
|
|
36
36
|
data,
|
|
@@ -29,7 +29,7 @@ describe("<StructureTabPane />", () => {
|
|
|
29
29
|
it("does not render profile when active tab is profile and we have any profile: ", () => {
|
|
30
30
|
const wrapper = shallow(
|
|
31
31
|
<StructureTabPane
|
|
32
|
-
activeTab=
|
|
32
|
+
activeTab="profile"
|
|
33
33
|
tabVisibility={{ profile: false }}
|
|
34
34
|
/>
|
|
35
35
|
);
|
|
@@ -40,10 +40,7 @@ describe("<StructureTabPane />", () => {
|
|
|
40
40
|
|
|
41
41
|
it("does not render grants when active tab is grants and we haven't any grant: ", () => {
|
|
42
42
|
const wrapper = shallow(
|
|
43
|
-
<StructureTabPane
|
|
44
|
-
activeTab={"grants"}
|
|
45
|
-
tabVisibility={{ grants: false }}
|
|
46
|
-
/>
|
|
43
|
+
<StructureTabPane activeTab="grants" tabVisibility={{ grants: false }} />
|
|
47
44
|
);
|
|
48
45
|
expect(wrapper.find("Connect(StructureGrants)").length).toBe(0);
|
|
49
46
|
});
|
|
@@ -51,7 +48,7 @@ describe("<StructureTabPane />", () => {
|
|
|
51
48
|
it("does render metadata component ", () => {
|
|
52
49
|
const wrapper = shallow(
|
|
53
50
|
<StructureTabPane
|
|
54
|
-
activeTab=
|
|
51
|
+
activeTab="metadata"
|
|
55
52
|
tabVisibility={{ metadata: true }}
|
|
56
53
|
/>
|
|
57
54
|
);
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
STRUCTURE_NOTES_EDIT,
|
|
11
11
|
STRUCTURE_PARENTS,
|
|
12
12
|
STRUCTURE_PROFILE,
|
|
13
|
-
|
|
13
|
+
STRUCTURE_RULES,
|
|
14
14
|
STRUCTURE_VERSION,
|
|
15
15
|
STRUCTURE_VERSIONS,
|
|
16
16
|
STRUCTURE_VERSION_VERSIONS,
|
|
@@ -55,9 +55,7 @@ describe("selectors: getActiveTab", () => {
|
|
|
55
55
|
expect(getActiveTab(tabVisibility, STRUCTURE_NOTES_EDIT)).toBe("notes");
|
|
56
56
|
expect(getActiveTab(tabVisibility, STRUCTURE_PARENTS)).toBe("parents");
|
|
57
57
|
expect(getActiveTab(tabVisibility, STRUCTURE_PROFILE)).toBe("profile");
|
|
58
|
-
expect(getActiveTab(tabVisibility,
|
|
59
|
-
"rules"
|
|
60
|
-
);
|
|
58
|
+
expect(getActiveTab(tabVisibility, STRUCTURE_RULES)).toBe("rules");
|
|
61
59
|
expect(getActiveTab(tabVisibility, STRUCTURE_LINKS)).toBe("links");
|
|
62
60
|
expect(getActiveTab(tabVisibility, STRUCTURE_LINKS_NEW)).toBe("links");
|
|
63
61
|
expect(getActiveTab(tabVisibility, STRUCTURE_VERSIONS)).toBe("versions");
|
|
@@ -138,15 +138,15 @@ describe("selectors: getTabVisibility", () => {
|
|
|
138
138
|
});
|
|
139
139
|
});
|
|
140
140
|
|
|
141
|
-
it("should include rules iff structure.
|
|
141
|
+
it("should include rules iff structure.implementation_count is greater than 0", () => {
|
|
142
142
|
expect(getTabVisibility({})).toMatchObject({ rules: false });
|
|
143
143
|
expect(
|
|
144
|
-
getTabVisibility({ structure: {
|
|
144
|
+
getTabVisibility({ structure: { implementation_count: 0 } })
|
|
145
145
|
).toMatchObject({
|
|
146
146
|
rules: false,
|
|
147
147
|
});
|
|
148
148
|
expect(
|
|
149
|
-
getTabVisibility({ structure: {
|
|
149
|
+
getTabVisibility({ structure: { implementation_count: 123 } })
|
|
150
150
|
).toMatchObject({
|
|
151
151
|
rules: true,
|
|
152
152
|
});
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
STRUCTURE_NOTES_EDIT,
|
|
9
9
|
STRUCTURE_PARENTS,
|
|
10
10
|
STRUCTURE_PROFILE,
|
|
11
|
-
|
|
11
|
+
STRUCTURE_RULES,
|
|
12
12
|
STRUCTURE_LINKS,
|
|
13
13
|
STRUCTURE_LINKS_NEW,
|
|
14
14
|
STRUCTURE_VERSIONS,
|
|
@@ -43,7 +43,7 @@ export const getActiveTab = (tabVisibility, path) => {
|
|
|
43
43
|
[_.eq(STRUCTURE_METADATA), _.constant("metadata")],
|
|
44
44
|
[_.eq(STRUCTURE_PARENTS), _.constant("parents")],
|
|
45
45
|
[_.eq(STRUCTURE_PROFILE), _.constant("profile")],
|
|
46
|
-
[_.eq(
|
|
46
|
+
[_.eq(STRUCTURE_RULES), _.constant("rules")],
|
|
47
47
|
[_.eq(STRUCTURE_LINKS), _.constant("links")],
|
|
48
48
|
[_.eq(STRUCTURE_LINKS_NEW), _.constant("links")],
|
|
49
49
|
[_.eq(STRUCTURE_VERSIONS), _.constant("versions")],
|
|
@@ -17,7 +17,7 @@ export const GrantUserDecorator = ({ authentication, user }) => {
|
|
|
17
17
|
<Header.Content>
|
|
18
18
|
{user.full_name}{" "}
|
|
19
19
|
{sameUser && (
|
|
20
|
-
<Label color="teal" size=
|
|
20
|
+
<Label color="teal" size="small">
|
|
21
21
|
{formatMessage({ id: "grant.cell.end_date.same_user" })}
|
|
22
22
|
</Label>
|
|
23
23
|
)}
|
|
@@ -36,7 +36,7 @@ const notesTabVisible = ({ templatesLoading, templates, structure }) =>
|
|
|
36
36
|
)(templates);
|
|
37
37
|
|
|
38
38
|
const versionsTabVisible = notEmptyPath("structureVersions");
|
|
39
|
-
const rulesTabVisible =
|
|
39
|
+
const rulesTabVisible = (state) => state?.structure?.implementation_count > 0;
|
|
40
40
|
const lineageTabVisible = _.anyPass([_.path("structure.degree.in")]);
|
|
41
41
|
const impactTabVisible = _.anyPass([_.path("structure.degree.out")]);
|
|
42
42
|
const parentsTabVisible = _.conformsTo({ parentRelations: notEmpty });
|