@truedat/bg 4.52.0 → 4.52.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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [4.52.3] 2022-09-22
4
+
5
+ ### Changed
6
+
7
+ - [TD-5184] Removed `ImplementationLinksAction` component which was never being
8
+ rendered
9
+
3
10
  ## [4.51.3] 2022-09-16
4
11
 
5
12
  ### Changed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@truedat/bg",
3
- "version": "4.52.0",
3
+ "version": "4.52.4",
4
4
  "description": "Truedat Web Business Glossary",
5
5
  "sideEffects": false,
6
6
  "jsnext:main": "src/index.js",
@@ -86,8 +86,8 @@
86
86
  ]
87
87
  },
88
88
  "dependencies": {
89
- "@truedat/core": "4.52.0",
90
- "@truedat/df": "4.52.0",
89
+ "@truedat/core": "4.52.4",
90
+ "@truedat/df": "4.52.4",
91
91
  "file-saver": "^2.0.5",
92
92
  "moment": "^2.24.0",
93
93
  "path-to-regexp": "^1.7.0",
@@ -107,5 +107,5 @@
107
107
  "react-dom": ">= 16.8.6 < 17",
108
108
  "semantic-ui-react": ">= 0.88.2 < 2.1"
109
109
  },
110
- "gitHead": "1d43cb9b9b8531eb6c054c7f430741976d59f592"
110
+ "gitHead": "c8fb8bfae18f39f7925c46e45b7818d02a5bc070"
111
111
  }
@@ -2,70 +2,44 @@ import _ from "lodash/fp";
2
2
  import React from "react";
3
3
  import PropTypes from "prop-types";
4
4
  import { connect } from "react-redux";
5
- import { Segment, Header, Table } from "semantic-ui-react";
5
+ import { Segment, Header } from "semantic-ui-react";
6
6
  import { FormattedMessage } from "react-intl";
7
7
  import { getConceptImplementationLinks } from "../selectors";
8
- import { conceptLinkAction } from "../routines";
9
- import ImplementationLinksAction from "./ImplementationLinksAction";
10
8
 
11
9
  const RuleImplementationsTable = React.lazy(() =>
12
10
  import("@truedat/dq/components/RuleImplementationsTable")
13
11
  );
14
12
 
15
- export const ConceptImplementationLinks = ({ groups, conceptLinkAction }) => {
16
- const doDelete = (action) => {
17
- conceptLinkAction(action);
18
- };
19
- const [additionalColumns, additionalCells] = [
20
- [<Table.HeaderCell key={"status"} width={1} />],
21
- [
22
- {
23
- style: { textAlign: "center", padding: "1px" },
24
- className: "pointer",
25
- props: { doDelete },
26
- content: ImplementationLinksAction,
27
- },
28
- ],
29
- ];
30
-
31
- return (
32
- <Segment attached="bottom">
33
- {groups.map(([tag, implementations], key) =>
34
- _.isEmpty(implementations) ? null : (
35
- <Segment vertical key={key}>
36
- <Header as="h3">
37
- {tag === "deleted" ? (
38
- <FormattedMessage
39
- id={"implementationDeletedRelation.table.title"}
40
- />
41
- ) : tag === "\uffee" ? (
42
- <FormattedMessage id={"implementationRelation.table.title"} />
43
- ) : (
44
- tag
45
- )}
46
- </Header>
47
- <RuleImplementationsTable
48
- ruleImplementations={implementations}
49
- withoutColumns={["business_concept"]}
50
- additionalColumns={additionalColumns}
51
- additionalCells={additionalCells}
52
- />
53
- </Segment>
54
- )
55
- )}
56
- </Segment>
57
- );
58
- };
13
+ export const ConceptImplementationLinks = ({ groups }) => (
14
+ <Segment attached="bottom">
15
+ {groups.map(([tag, implementations], key) =>
16
+ _.isEmpty(implementations) ? null : (
17
+ <Segment vertical key={key}>
18
+ <Header as="h3">
19
+ {tag === "deleted" ? (
20
+ <FormattedMessage id="implementationDeletedRelation.table.title" />
21
+ ) : tag === "\uffee" ? (
22
+ <FormattedMessage id="implementationRelation.table.title" />
23
+ ) : (
24
+ tag
25
+ )}
26
+ </Header>
27
+ <RuleImplementationsTable
28
+ ruleImplementations={implementations}
29
+ withoutColumns={["business_concept"]}
30
+ />
31
+ </Segment>
32
+ )
33
+ )}
34
+ </Segment>
35
+ );
59
36
 
60
37
  ConceptImplementationLinks.propTypes = {
61
38
  groups: PropTypes.array,
62
- conceptLinkAction: PropTypes.object,
63
39
  };
64
40
 
65
41
  const mapStateToProps = (state) => ({
66
42
  groups: getConceptImplementationLinks(state),
67
43
  });
68
44
 
69
- export default connect(mapStateToProps, {
70
- conceptLinkAction,
71
- })(ConceptImplementationLinks);
45
+ export default connect(mapStateToProps)(ConceptImplementationLinks);
@@ -1,35 +0,0 @@
1
- import _ from "lodash/fp";
2
- import React from "react";
3
- import PropTypes from "prop-types";
4
- import { useIntl } from "react-intl";
5
- import { Icon } from "semantic-ui-react";
6
- import { ConfirmModal } from "@truedat/core/components";
7
-
8
- export const ImplementationLinksAction = ({ _actions: actions, doDelete }) => {
9
- const { formatMessage } = useIntl();
10
- const deleteAction = _.prop("delete")(actions);
11
- return deleteAction ? (
12
- <>
13
- <ConfirmModal
14
- icon="trash"
15
- trigger={<Icon name="trash alternate outline" color="red" />}
16
- header={formatMessage({
17
- id: `conceptRelation.implementation.actions.delete.confirmation.header`,
18
- })}
19
- content={formatMessage({
20
- id: `conceptRelation.implementation.actions.delete.confirmation.content`,
21
- })}
22
- onConfirm={() => doDelete(deleteAction)}
23
- onOpen={(e) => e.stopPropagation()}
24
- onClose={(e) => e.stopPropagation()}
25
- />
26
- </>
27
- ) : null;
28
- };
29
-
30
- ImplementationLinksAction.propTypes = {
31
- doDelete: PropTypes.func,
32
- _actions: PropTypes.object,
33
- };
34
-
35
- export default ImplementationLinksAction;
@@ -1,31 +0,0 @@
1
- import _ from "lodash/fp";
2
- import React, { Suspense } from "react";
3
- import { render } from "@truedat/test/render";
4
- import { ImplementationLinksAction } from "../ImplementationLinksAction";
5
-
6
- describe("<ImplementationLinksAction />", () => {
7
- const renderOpts = {
8
- messages: {
9
- en: {
10
- "conceptRelation.implementation.actions.delete.confirmation.header":
11
- "Delete Link Implementation",
12
- "conceptRelation.implementation.actions.delete.confirmation.content":
13
- "You are going to delete this link. Are you sure?",
14
- },
15
- },
16
- };
17
- const props = {
18
- id: 1,
19
- _actions: { delete: { foo: "bar" } },
20
- doDelete: jest.fn(),
21
- };
22
- it("matches the latest snapshot", () => {
23
- const { container } = render(
24
- <Suspense fallback={null}>
25
- <ImplementationLinksAction {...props} />
26
- </Suspense>,
27
- renderOpts
28
- );
29
- expect(container).toMatchSnapshot();
30
- });
31
- });
@@ -1,10 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`<ImplementationLinksAction /> matches the latest snapshot 1`] = `
4
- <div>
5
- <i
6
- aria-hidden="true"
7
- class="red trash alternate outline icon"
8
- />
9
- </div>
10
- `;