@truedat/dd 8.11.6 → 8.11.9

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.
Files changed (43) hide show
  1. package/package.json +4 -3
  2. package/src/components/Graphs.js +30 -4
  3. package/src/components/LineageContextMenu.js +185 -58
  4. package/src/components/LineageDownloadButton.js +16 -6
  5. package/src/components/LineageEventsPanel.js +80 -27
  6. package/src/components/LineageEventsTable.js +7 -3
  7. package/src/components/LineageGraph.js +5166 -306
  8. package/src/components/LineageGraphToolbar.js +896 -0
  9. package/src/components/LineageInspectorPanel.js +748 -0
  10. package/src/components/LineageResourceNode.js +501 -0
  11. package/src/components/LineageRoutes.js +1 -2
  12. package/src/components/LineageSelectionPanel.js +28 -12
  13. package/src/components/StructureGraph.js +8 -1
  14. package/src/components/StructureGraphView.js +14 -0
  15. package/src/components/StructureImpact.js +2 -22
  16. package/src/components/StructureLineage.js +2 -19
  17. package/src/components/StructuresUploadEventsTable.js +0 -3
  18. package/src/components/__tests__/LineageContextMenu.spec.js +42 -0
  19. package/src/components/__tests__/LineageGraph.spec.js +896 -0
  20. package/src/components/__tests__/LineageGraphLayout.spec.js +639 -0
  21. package/src/components/__tests__/LineageGraphToolbar.spec.js +366 -0
  22. package/src/components/__tests__/LineageHierarchy.spec.js +116 -0
  23. package/src/components/__tests__/LineageInspectorPanel.spec.js +364 -0
  24. package/src/components/__tests__/LineageResourceNode.spec.js +338 -0
  25. package/src/components/__tests__/LineageRoutes.spec.js +27 -9
  26. package/src/components/__tests__/__snapshots__/LineageDownloadButton.spec.js.snap +23 -3
  27. package/src/components/__tests__/__snapshots__/LineageForm.spec.js.snap +23 -3
  28. package/src/components/__tests__/lineageEventHelpers.spec.js +60 -0
  29. package/src/components/lineageEventHelpers.js +53 -17
  30. package/src/reducers/__tests__/lineageEvents.spec.js +164 -0
  31. package/src/reducers/__tests__/lineageQuery.spec.js +11 -0
  32. package/src/reducers/lineageEvents.js +68 -2
  33. package/src/reducers/lineageQuery.js +2 -6
  34. package/src/styles/LineageGraph.less +4094 -0
  35. package/src/styles/LineageGraphColors.less +105 -0
  36. package/src/styles/LineageGraphCore.less +20 -0
  37. package/src/styles/LineageResourceNode.less +711 -0
  38. package/src/utils/__tests__/lineageGraphIndex.spec.js +52 -0
  39. package/src/utils/__tests__/lineageLayout.spec.js +252 -0
  40. package/src/utils/__tests__/lineageTopology.spec.js +256 -0
  41. package/src/utils/lineageGraphIndex.js +296 -0
  42. package/src/utils/lineageLayout.js +1050 -0
  43. package/src/styles/lineageGraph.less +0 -1236
@@ -1,18 +1,5 @@
1
1
  import { connect } from "react-redux";
2
- import PropTypes from "prop-types";
3
- import StructureGraph from "./StructureGraph";
4
- import LineageDownloadButton from "./LineageDownloadButton";
5
-
6
- export const StructureLineage = (props) => {
7
- return (
8
- <div className="structure-lineage">
9
- <div className="structure-lineage__download-button">
10
- <LineageDownloadButton graph={props.graph} />
11
- </div>
12
- <StructureGraph {...props} height="100%" />
13
- </div>
14
- );
15
- };
2
+ import StructureGraphView from "./StructureGraphView";
16
3
 
17
4
  const mapStateToProps = ({
18
5
  structureLineageId: graphId,
@@ -23,8 +10,4 @@ const mapStateToProps = ({
23
10
  type: "lineage",
24
11
  });
25
12
 
26
- StructureLineage.propTypes = {
27
- graph: PropTypes.object,
28
- };
29
-
30
- export default connect(mapStateToProps)(StructureLineage);
13
+ export default connect(mapStateToProps)(StructureGraphView);
@@ -8,9 +8,6 @@ import { useIntl } from "react-intl";
8
8
  import { columnDecorator } from "@truedat/core/services";
9
9
  import { fetchStructuresUploadEvents } from "../routines";
10
10
  import { getStructuresUploadEventColumns } from "../selectors";
11
-
12
- import "../styles/structuresUploadEventColumns.less";
13
-
14
11
  export const getColumnsWithData = (ruleResults, columns) =>
15
12
  _.filter((column) =>
16
13
  _.any(_.flow(columnDecorator(column), _.negate(_.isEmpty)))(ruleResults),
@@ -0,0 +1,42 @@
1
+ import { render } from "@truedat/test/render";
2
+ import { LineageContextMenu } from "../LineageContextMenu";
3
+
4
+ describe("<LineageContextMenu />", () => {
5
+ const baseProps = {
6
+ id: "node-1",
7
+ levels: 3,
8
+ name: "fact_orders",
9
+ resource: true,
10
+ onAction: () => {},
11
+ onTogglePin: () => {},
12
+ pinned: false,
13
+ };
14
+
15
+ it("renders a link to the quality rules of the structure", () => {
16
+ const rendered = render(
17
+ <LineageContextMenu {...baseProps} structureId={42} />,
18
+ );
19
+
20
+ const link = rendered.getByRole("link", { name: /quality rules/i });
21
+
22
+ expect(link).toHaveAttribute("href", "/structures/42/rules");
23
+ });
24
+
25
+ it("does not render the quality rules link without a structureId", () => {
26
+ const rendered = render(<LineageContextMenu {...baseProps} />);
27
+
28
+ expect(
29
+ rendered.queryByRole("link", { name: /quality rules/i }),
30
+ ).not.toBeInTheDocument();
31
+ });
32
+
33
+ it("uses the unpin icon while focus is pinned", () => {
34
+ const rendered = render(<LineageContextMenu {...baseProps} pinned />);
35
+
36
+ expect(
37
+ rendered
38
+ .getByRole("button", { name: "Unpin focus" })
39
+ .querySelector(".lineage-unpin-icon"),
40
+ ).toBeInTheDocument();
41
+ });
42
+ });