@truedat/dq 4.40.3 → 4.40.6

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/dq",
3
- "version": "4.40.3",
3
+ "version": "4.40.6",
4
4
  "description": "Truedat Web Data Quality Module",
5
5
  "sideEffects": false,
6
6
  "jsnext:main": "src/index.js",
@@ -31,7 +31,7 @@
31
31
  "@babel/plugin-transform-modules-commonjs": "^7.15.0",
32
32
  "@babel/preset-env": "^7.15.0",
33
33
  "@babel/preset-react": "^7.14.5",
34
- "@truedat/test": "4.40.3",
34
+ "@truedat/test": "4.40.5",
35
35
  "babel-jest": "^27.0.6",
36
36
  "babel-plugin-dynamic-import-node": "^2.3.3",
37
37
  "babel-plugin-lodash": "^3.3.4",
@@ -82,8 +82,8 @@
82
82
  },
83
83
  "dependencies": {
84
84
  "@apollo/client": "^3.4.10",
85
- "@truedat/core": "4.40.3",
86
- "@truedat/df": "4.40.3",
85
+ "@truedat/core": "4.40.5",
86
+ "@truedat/df": "4.40.5",
87
87
  "axios": "^0.19.2",
88
88
  "graphql": "^15.5.3",
89
89
  "path-to-regexp": "^1.7.0",
@@ -103,5 +103,5 @@
103
103
  "react-dom": ">= 16.8.6 < 17",
104
104
  "semantic-ui-react": ">= 0.88.2 < 2.1"
105
105
  },
106
- "gitHead": "03104a28941b568007ad53b85874ff58225eaa6a"
106
+ "gitHead": "91a3e5996af35f96c97a192f79ef6fb72d588479"
107
107
  }
@@ -9,6 +9,7 @@ import { FormattedMessage } from "react-intl";
9
9
  import {
10
10
  RULE_IMPLEMENTATION_EVENTS,
11
11
  IMPLEMENTATION_CONCEPT_LINKS,
12
+ IMPLEMENTATION_CONCEPT_LINKS_NEW,
12
13
  RULE_IMPLEMENTATION_MOVE,
13
14
  RULE_IMPLEMENTATION_RESULTS_DETAILS,
14
15
  RULE_IMPLEMENTATION_RESULTS,
@@ -16,7 +17,12 @@ import {
16
17
  linkTo,
17
18
  } from "@truedat/core/routes";
18
19
 
19
- export const RuleImplementationTabs = ({ rule, ruleImplementation, match }) => {
20
+ export const RuleImplementationTabs = ({
21
+ rule,
22
+ ruleImplementation,
23
+ match,
24
+ canCreateLink,
25
+ }) => {
20
26
  const latest_rule_id = _.flow(
21
27
  _.pathOr([], "results"),
22
28
  _.head,
@@ -39,17 +45,21 @@ export const RuleImplementationTabs = ({ rule, ruleImplementation, match }) => {
39
45
  <FormattedMessage id="tabs.dq.ruleImplementation" />
40
46
  </Menu.Item>
41
47
 
42
- <Menu.Item
43
- active={match.path === IMPLEMENTATION_CONCEPT_LINKS}
44
- as={Link}
45
- to={linkTo.IMPLEMENTATION_CONCEPT_LINKS({
46
- id: rule.id,
47
- implementation_id: ruleImplementation.id,
48
- })}
49
- >
50
- <FormattedMessage id="tabs.dq.implementation.links" />
51
- </Menu.Item>
52
-
48
+ {canCreateLink && (
49
+ <Menu.Item
50
+ active={
51
+ match.path === IMPLEMENTATION_CONCEPT_LINKS ||
52
+ match.path === IMPLEMENTATION_CONCEPT_LINKS_NEW
53
+ }
54
+ as={Link}
55
+ to={linkTo.IMPLEMENTATION_CONCEPT_LINKS({
56
+ id: rule.id,
57
+ implementation_id: ruleImplementation.id,
58
+ })}
59
+ >
60
+ <FormattedMessage id="tabs.dq.implementation.links" />
61
+ </Menu.Item>
62
+ )}
53
63
  <Menu.Item
54
64
  active={match.path === RULE_IMPLEMENTATION_RESULTS}
55
65
  as={Link}
@@ -91,11 +101,17 @@ RuleImplementationTabs.propTypes = {
91
101
  rule: PropTypes.object,
92
102
  ruleImplementation: PropTypes.object,
93
103
  match: PropTypes.object,
104
+ canCreateLink: PropTypes.bool,
94
105
  };
95
106
 
96
- const mapStateToProps = ({ rule, ruleImplementation }) => ({
107
+ const mapStateToProps = ({
108
+ rule,
109
+ ruleImplementation,
110
+ implementationActions,
111
+ }) => ({
97
112
  rule,
98
113
  ruleImplementation,
114
+ canCreateLink: _.propOr(false, "link_concept")(implementationActions),
99
115
  });
100
116
 
101
117
  export default compose(
@@ -19,7 +19,7 @@ const renderOpts = {
19
19
  };
20
20
 
21
21
  describe("<ExecutionDetails>", () => {
22
- it("matches the lastest snapshot", () => {
22
+ it("matches the latest snapshot", () => {
23
23
  const props = {
24
24
  ruleImplementation: {
25
25
  results: [{ foo: "bar", id: 100, details: { Query: "ImZvbyI=" } }],
@@ -3,11 +3,11 @@ import { shallow } from "enzyme";
3
3
  import { QualityEventError } from "../QualityEventError";
4
4
 
5
5
  describe("<QualityEventError />", () => {
6
- it("matches the lastest snapshot", async () => {
6
+ it("matches the latest snapshot", async () => {
7
7
  const props = {
8
8
  inserted_at: "2019-09-20 10:55:00",
9
9
  message: "foo",
10
- type: "FAILED"
10
+ type: "FAILED",
11
11
  };
12
12
  const wrapper = shallow(<QualityEventError {...props} />);
13
13
  expect(wrapper).toMatchSnapshot();
@@ -14,6 +14,7 @@ const state = {
14
14
  manage_quality_rule_implementations: true,
15
15
  manage_quality_rules: true,
16
16
  },
17
+ implementationActions: { link_concept: true },
17
18
  };
18
19
 
19
20
  const renderOpts = {
@@ -19,6 +19,7 @@ describe("<RuleImplementationTabs />", () => {
19
19
  rule: { id: 8 },
20
20
  ruleImplementation: { id: 1 },
21
21
  match: { path: "" },
22
+ canCreateLink: true,
22
23
  };
23
24
  it("matches the latest snapshot", () => {
24
25
  const { container } = render(
@@ -16,7 +16,7 @@ describe("<RuleRoutes>", () => {
16
16
  structuresAliasesLoading: true,
17
17
  };
18
18
 
19
- it("matches the lastest snapshot", () => {
19
+ it("matches the latest snapshot", () => {
20
20
  const { container } = render(<RuleRoutes {...props} />, {});
21
21
  expect(container).toMatchSnapshot();
22
22
  });
@@ -1,6 +1,6 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
- exports[`<ExecutionDetails> matches the lastest snapshot 1`] = `
3
+ exports[`<ExecutionDetails> matches the latest snapshot 1`] = `
4
4
  <div>
5
5
  <table
6
6
  class="ui table implementation-results medium"
@@ -1,6 +1,6 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
- exports[`<QualityEventError /> matches the lastest snapshot 1`] = `
3
+ exports[`<QualityEventError /> matches the latest snapshot 1`] = `
4
4
  <Feed
5
5
  size="large"
6
6
  >
@@ -1,3 +1,3 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
- exports[`<RuleRoutes> matches the lastest snapshot 1`] = `<div />`;
3
+ exports[`<RuleRoutes> matches the latest snapshot 1`] = `<div />`;