@aloudata/ink-lineage 0.0.1-beta.4 → 0.0.1-beta.41
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/dist/BigDagre.d.ts +15 -0
- package/dist/BigDagre.d.ts.map +1 -0
- package/dist/BigDagre.js +102 -0
- package/dist/BigDagre.js.map +1 -0
- package/dist/assets/big/dataSourceTypeIcon.d.ts +6 -0
- package/dist/assets/big/dataSourceTypeIcon.d.ts.map +1 -1
- package/dist/assets/big/dataSourceTypeIcon.js +6 -0
- package/dist/assets/big/dataSourceTypeIcon.js.map +1 -1
- package/dist/assets/big/index.d.ts +1 -0
- package/dist/assets/big/index.d.ts.map +1 -1
- package/dist/assets/big/index.js +1 -0
- package/dist/assets/big/index.js.map +1 -1
- package/dist/assets/big/lineageIcon.d.ts +1 -0
- package/dist/assets/big/lineageIcon.d.ts.map +1 -1
- package/dist/assets/big/lineageIcon.js +1 -0
- package/dist/assets/big/lineageIcon.js.map +1 -1
- package/dist/assets/big/scheduleDataSourceTypeIcon.d.ts +2 -0
- package/dist/assets/big/scheduleDataSourceTypeIcon.d.ts.map +1 -0
- package/dist/assets/big/scheduleDataSourceTypeIcon.js +2 -0
- package/dist/assets/big/scheduleDataSourceTypeIcon.js.map +1 -0
- package/dist/components/Edges/ClickEdge.d.ts +8 -0
- package/dist/components/Edges/ClickEdge.d.ts.map +1 -0
- package/dist/components/Edges/ClickEdge.js +47 -0
- package/dist/components/Edges/ClickEdge.js.map +1 -0
- package/dist/components/Edges/DefaultEdge.d.ts +8 -9
- package/dist/components/Edges/DefaultEdge.d.ts.map +1 -1
- package/dist/components/Edges/DefaultEdge.js +23 -11
- package/dist/components/Edges/DefaultEdge.js.map +1 -1
- package/dist/components/Edges/FoldEdge.d.ts +1 -4
- package/dist/components/Edges/FoldEdge.d.ts.map +1 -1
- package/dist/components/Edges/FoldEdge.js +10 -15
- package/dist/components/Edges/FoldEdge.js.map +1 -1
- package/dist/components/Edges/LineageEdge.d.ts +1 -4
- package/dist/components/Edges/LineageEdge.d.ts.map +1 -1
- package/dist/components/Edges/LineageEdge.js +7 -11
- package/dist/components/Edges/LineageEdge.js.map +1 -1
- package/dist/components/Nodes/AssetNode.d.ts +7 -13
- package/dist/components/Nodes/AssetNode.d.ts.map +1 -1
- package/dist/components/Nodes/AssetNode.js +56 -209
- package/dist/components/Nodes/AssetNode.js.map +1 -1
- package/dist/components/Nodes/DefaultNode.d.ts +19 -12
- package/dist/components/Nodes/DefaultNode.d.ts.map +1 -1
- package/dist/components/Nodes/DefaultNode.js +62 -45
- package/dist/components/Nodes/DefaultNode.js.map +1 -1
- package/dist/components/Nodes/ScheduleTaskTableNode.d.ts +13 -0
- package/dist/components/Nodes/ScheduleTaskTableNode.d.ts.map +1 -0
- package/dist/components/Nodes/ScheduleTaskTableNode.js +50 -0
- package/dist/components/Nodes/ScheduleTaskTableNode.js.map +1 -0
- package/dist/components/Nodes/Table/AssetBaseNode.d.ts +11 -0
- package/dist/components/Nodes/Table/AssetBaseNode.d.ts.map +1 -0
- package/dist/components/Nodes/Table/AssetBaseNode.js +40 -0
- package/dist/components/Nodes/Table/AssetBaseNode.js.map +1 -0
- package/dist/components/Nodes/Table/ColumnNode.d.ts +30 -0
- package/dist/components/Nodes/Table/ColumnNode.d.ts.map +1 -0
- package/dist/components/Nodes/{ColumnNode.js → Table/ColumnNode.js} +53 -166
- package/dist/components/Nodes/Table/ColumnNode.js.map +1 -0
- package/dist/components/Nodes/Table/CustomNode.d.ts +13 -0
- package/dist/components/Nodes/Table/CustomNode.d.ts.map +1 -0
- package/dist/components/Nodes/Table/CustomNode.js +50 -0
- package/dist/components/Nodes/Table/CustomNode.js.map +1 -0
- package/dist/components/Nodes/Table/TableNode.d.ts +29 -0
- package/dist/components/Nodes/Table/TableNode.d.ts.map +1 -0
- package/dist/components/Nodes/Table/TableNode.js +141 -0
- package/dist/components/Nodes/Table/TableNode.js.map +1 -0
- package/dist/components/Nodes/Task/TaskColumnNode.d.ts +26 -0
- package/dist/components/Nodes/Task/TaskColumnNode.d.ts.map +1 -0
- package/dist/components/Nodes/Task/TaskColumnNode.js +304 -0
- package/dist/components/Nodes/Task/TaskColumnNode.js.map +1 -0
- package/dist/components/Nodes/Task/TaskTableNode.d.ts +25 -0
- package/dist/components/Nodes/Task/TaskTableNode.d.ts.map +1 -0
- package/dist/components/Nodes/Task/TaskTableNode.js +125 -0
- package/dist/components/Nodes/Task/TaskTableNode.js.map +1 -0
- package/dist/components/Nodes/index.d.ts +5 -4
- package/dist/components/Nodes/index.d.ts.map +1 -1
- package/dist/components/Nodes/index.js +5 -4
- package/dist/components/Nodes/index.js.map +1 -1
- package/dist/constant/nodeStyle.d.ts +3 -20
- package/dist/constant/nodeStyle.d.ts.map +1 -1
- package/dist/constant/nodeStyle.js +3 -36
- package/dist/constant/nodeStyle.js.map +1 -1
- package/dist/decorators/AssetBaseHeader.d.ts +10 -0
- package/dist/decorators/AssetBaseHeader.d.ts.map +1 -0
- package/dist/decorators/AssetBaseHeader.js +25 -0
- package/dist/decorators/AssetBaseHeader.js.map +1 -0
- package/dist/decorators/Column/BaseComponent.d.ts +9 -0
- package/dist/decorators/Column/BaseComponent.d.ts.map +1 -0
- package/dist/decorators/Column/BaseComponent.js +129 -0
- package/dist/decorators/Column/BaseComponent.js.map +1 -0
- package/dist/decorators/Column/TableColunm.d.ts +11 -0
- package/dist/decorators/Column/TableColunm.d.ts.map +1 -0
- package/dist/decorators/Column/TableColunm.js +31 -0
- package/dist/decorators/Column/TableColunm.js.map +1 -0
- package/dist/decorators/Column/TaskColumn.d.ts +7 -0
- package/dist/decorators/Column/TaskColumn.d.ts.map +1 -0
- package/dist/decorators/Column/TaskColumn.js +12 -0
- package/dist/decorators/Column/TaskColumn.js.map +1 -0
- package/dist/decorators/CustomHeader.d.ts +10 -0
- package/dist/decorators/CustomHeader.d.ts.map +1 -0
- package/dist/decorators/CustomHeader.js +26 -0
- package/dist/decorators/CustomHeader.js.map +1 -0
- package/dist/decorators/RenderColumn.d.ts +3 -0
- package/dist/decorators/RenderColumn.d.ts.map +1 -0
- package/dist/decorators/RenderColumn.js +30 -0
- package/dist/decorators/RenderColumn.js.map +1 -0
- package/dist/decorators/RenderContent.d.ts +3 -0
- package/dist/decorators/RenderContent.d.ts.map +1 -0
- package/dist/decorators/RenderContent.js +162 -0
- package/dist/decorators/RenderContent.js.map +1 -0
- package/dist/decorators/RenderFooter.d.ts +3 -0
- package/dist/decorators/RenderFooter.d.ts.map +1 -0
- package/dist/decorators/RenderFooter.js +150 -0
- package/dist/decorators/RenderFooter.js.map +1 -0
- package/dist/decorators/RenderHeader.d.ts +3 -0
- package/dist/decorators/RenderHeader.d.ts.map +1 -0
- package/dist/decorators/RenderHeader.js +30 -0
- package/dist/decorators/RenderHeader.js.map +1 -0
- package/dist/decorators/ScheduleTaskTableHeader.d.ts +10 -0
- package/dist/decorators/ScheduleTaskTableHeader.d.ts.map +1 -0
- package/dist/decorators/ScheduleTaskTableHeader.js +27 -0
- package/dist/decorators/ScheduleTaskTableHeader.js.map +1 -0
- package/dist/decorators/SideIcon.d.ts +8 -0
- package/dist/decorators/SideIcon.d.ts.map +1 -0
- package/dist/decorators/SideIcon.js +68 -0
- package/dist/decorators/SideIcon.js.map +1 -0
- package/dist/decorators/Table/BaseHeaderComponent.d.ts +19 -0
- package/dist/decorators/Table/BaseHeaderComponent.d.ts.map +1 -0
- package/dist/decorators/Table/BaseHeaderComponent.js +332 -0
- package/dist/decorators/Table/BaseHeaderComponent.js.map +1 -0
- package/dist/decorators/Table/TableHeader.d.ts +10 -0
- package/dist/decorators/Table/TableHeader.d.ts.map +1 -0
- package/dist/decorators/Table/TableHeader.js +27 -0
- package/dist/decorators/Table/TableHeader.js.map +1 -0
- package/dist/decorators/Table/TaskHeader.d.ts +8 -0
- package/dist/decorators/Table/TaskHeader.d.ts.map +1 -0
- package/dist/decorators/Table/TaskHeader.js +20 -0
- package/dist/decorators/Table/TaskHeader.js.map +1 -0
- package/dist/decorators/index.d.ts +6 -0
- package/dist/decorators/index.d.ts.map +1 -0
- package/dist/decorators/index.js +7 -0
- package/dist/decorators/index.js.map +1 -0
- package/dist/decorators/types.d.ts +6 -0
- package/dist/decorators/types.d.ts.map +1 -0
- package/dist/decorators/types.js +2 -0
- package/dist/decorators/types.js.map +1 -0
- package/dist/manager/BaseManager.d.ts +4 -5
- package/dist/manager/BaseManager.d.ts.map +1 -1
- package/dist/manager/BaseManager.js +2 -3
- package/dist/manager/BaseManager.js.map +1 -1
- package/dist/manager/ExpandManager.d.ts +10 -6
- package/dist/manager/ExpandManager.d.ts.map +1 -1
- package/dist/manager/ExpandManager.js +19 -34
- package/dist/manager/ExpandManager.js.map +1 -1
- package/dist/manager/FoldLineageManager.d.ts +21 -14
- package/dist/manager/FoldLineageManager.d.ts.map +1 -1
- package/dist/manager/FoldLineageManager.js +70 -14
- package/dist/manager/FoldLineageManager.js.map +1 -1
- package/dist/manager/LineageManager.d.ts +97 -31
- package/dist/manager/LineageManager.d.ts.map +1 -1
- package/dist/manager/LineageManager.js +548 -147
- package/dist/manager/LineageManager.js.map +1 -1
- package/dist/manager/SearchNodeManager.d.ts +4 -29
- package/dist/manager/SearchNodeManager.d.ts.map +1 -1
- package/dist/manager/SearchNodeManager.js +18 -50
- package/dist/manager/SearchNodeManager.js.map +1 -1
- package/dist/manager/ToolbarManager.d.ts +5 -6
- package/dist/manager/ToolbarManager.d.ts.map +1 -1
- package/dist/manager/ToolbarManager.js +16 -2
- package/dist/manager/ToolbarManager.js.map +1 -1
- package/dist/manager/dataProcessor/ScheduleDataProcessor.d.ts +21 -0
- package/dist/manager/dataProcessor/ScheduleDataProcessor.d.ts.map +1 -0
- package/dist/manager/dataProcessor/ScheduleDataProcessor.js +349 -0
- package/dist/manager/dataProcessor/ScheduleDataProcessor.js.map +1 -0
- package/dist/manager/dataProcessor/TableDataProcessor.d.ts +26 -0
- package/dist/manager/dataProcessor/TableDataProcessor.d.ts.map +1 -0
- package/dist/manager/{DataProcessor.js → dataProcessor/TableDataProcessor.js} +328 -248
- package/dist/manager/dataProcessor/TableDataProcessor.js.map +1 -0
- package/dist/manager/dataProcessor/TaskDataProcessor.d.ts +82 -0
- package/dist/manager/dataProcessor/TaskDataProcessor.d.ts.map +1 -0
- package/dist/manager/dataProcessor/TaskDataProcessor.js +307 -0
- package/dist/manager/dataProcessor/TaskDataProcessor.js.map +1 -0
- package/dist/manager/graphEventManager/BaseGraphEventManager.d.ts +10 -0
- package/dist/manager/graphEventManager/BaseGraphEventManager.d.ts.map +1 -0
- package/dist/manager/graphEventManager/BaseGraphEventManager.js +81 -0
- package/dist/manager/graphEventManager/BaseGraphEventManager.js.map +1 -0
- package/dist/manager/graphEventManager/TableGraphEventManager.d.ts +6 -0
- package/dist/manager/graphEventManager/TableGraphEventManager.d.ts.map +1 -0
- package/dist/manager/graphEventManager/TableGraphEventManager.js +32 -0
- package/dist/manager/graphEventManager/TableGraphEventManager.js.map +1 -0
- package/dist/manager/graphEventManager/TaskGraphEventManager.d.ts +6 -0
- package/dist/manager/graphEventManager/TaskGraphEventManager.d.ts.map +1 -0
- package/dist/manager/graphEventManager/TaskGraphEventManager.js +22 -0
- package/dist/manager/graphEventManager/TaskGraphEventManager.js.map +1 -0
- package/dist/manager/index.d.ts +8 -2
- package/dist/manager/index.d.ts.map +1 -1
- package/dist/manager/index.js +8 -2
- package/dist/manager/index.js.map +1 -1
- package/dist/manager/nodeManager/AssetEventManager.d.ts +4 -16
- package/dist/manager/nodeManager/AssetEventManager.d.ts.map +1 -1
- package/dist/manager/nodeManager/AssetEventManager.js +123 -107
- package/dist/manager/nodeManager/AssetEventManager.js.map +1 -1
- package/dist/manager/nodeManager/BaseColumnEventManager.d.ts +12 -0
- package/dist/manager/nodeManager/BaseColumnEventManager.d.ts.map +1 -0
- package/dist/manager/nodeManager/BaseColumnEventManager.js +77 -0
- package/dist/manager/nodeManager/BaseColumnEventManager.js.map +1 -0
- package/dist/manager/nodeManager/BaseEventManager.d.ts +13 -16
- package/dist/manager/nodeManager/BaseEventManager.d.ts.map +1 -1
- package/dist/manager/nodeManager/BaseEventManager.js +69 -23
- package/dist/manager/nodeManager/BaseEventManager.js.map +1 -1
- package/dist/manager/nodeManager/ColumnEventManager.d.ts +4 -16
- package/dist/manager/nodeManager/ColumnEventManager.d.ts.map +1 -1
- package/dist/manager/nodeManager/ColumnEventManager.js +68 -120
- package/dist/manager/nodeManager/ColumnEventManager.js.map +1 -1
- package/dist/manager/nodeManager/CustomEventManager.d.ts +3 -4
- package/dist/manager/nodeManager/CustomEventManager.d.ts.map +1 -1
- package/dist/manager/nodeManager/CustomEventManager.js +9 -4
- package/dist/manager/nodeManager/CustomEventManager.js.map +1 -1
- package/dist/manager/nodeManager/ScheduleTaskTableEventManager.d.ts +10 -0
- package/dist/manager/nodeManager/ScheduleTaskTableEventManager.d.ts.map +1 -0
- package/dist/manager/nodeManager/ScheduleTaskTableEventManager.js +145 -0
- package/dist/manager/nodeManager/ScheduleTaskTableEventManager.js.map +1 -0
- package/dist/manager/nodeManager/TableEventManager.d.ts +6 -5
- package/dist/manager/nodeManager/TableEventManager.d.ts.map +1 -1
- package/dist/manager/nodeManager/TableEventManager.js +33 -11
- package/dist/manager/nodeManager/TableEventManager.js.map +1 -1
- package/dist/manager/nodeManager/task/TaskColumnEventManager.d.ts +6 -0
- package/dist/manager/nodeManager/task/TaskColumnEventManager.d.ts.map +1 -0
- package/dist/manager/nodeManager/task/TaskColumnEventManager.js +75 -0
- package/dist/manager/nodeManager/task/TaskColumnEventManager.js.map +1 -0
- package/dist/manager/nodeManager/task/TaskTableEventManager.d.ts +13 -0
- package/dist/manager/nodeManager/task/TaskTableEventManager.d.ts.map +1 -0
- package/dist/manager/nodeManager/task/TaskTableEventManager.js +198 -0
- package/dist/manager/nodeManager/task/TaskTableEventManager.js.map +1 -0
- package/dist/manager/rightKeyMenu/BaseRightKeyMenuManager.d.ts +41 -0
- package/dist/manager/rightKeyMenu/BaseRightKeyMenuManager.d.ts.map +1 -0
- package/dist/manager/rightKeyMenu/BaseRightKeyMenuManager.js +97 -0
- package/dist/manager/rightKeyMenu/BaseRightKeyMenuManager.js.map +1 -0
- package/dist/manager/rightKeyMenu/TableRightKeyMenuManager.d.ts +10 -0
- package/dist/manager/rightKeyMenu/TableRightKeyMenuManager.d.ts.map +1 -0
- package/dist/manager/rightKeyMenu/TableRightKeyMenuManager.js +29 -0
- package/dist/manager/rightKeyMenu/TableRightKeyMenuManager.js.map +1 -0
- package/dist/manager/rightKeyMenu/TaskRightKeyMenuManager.d.ts +20 -0
- package/dist/manager/rightKeyMenu/TaskRightKeyMenuManager.d.ts.map +1 -0
- package/dist/manager/rightKeyMenu/TaskRightKeyMenuManager.js +149 -0
- package/dist/manager/rightKeyMenu/TaskRightKeyMenuManager.js.map +1 -0
- package/dist/types/eventEnum.d.ts +35 -4
- package/dist/types/eventEnum.d.ts.map +1 -1
- package/dist/types/eventEnum.js +67 -3
- package/dist/types/eventEnum.js.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +1 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/manager.d.ts +98 -1
- package/dist/types/manager.d.ts.map +1 -1
- package/dist/types/manager.js +36 -2
- package/dist/types/manager.js.map +1 -1
- package/dist/types/node.d.ts +36 -14
- package/dist/types/node.d.ts.map +1 -1
- package/dist/types/node.js +8 -11
- package/dist/types/node.js.map +1 -1
- package/dist/utils/foldNode.d.ts +4 -12
- package/dist/utils/foldNode.d.ts.map +1 -1
- package/dist/utils/foldNode.js +11 -2
- package/dist/utils/foldNode.js.map +1 -1
- package/dist/utils/getIconByType.d.ts +2 -2
- package/dist/utils/getIconByType.d.ts.map +1 -1
- package/dist/utils/getIconByType.js +14 -1
- package/dist/utils/getIconByType.js.map +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/manager.d.ts +25 -0
- package/dist/utils/manager.d.ts.map +1 -0
- package/dist/utils/manager.js +158 -0
- package/dist/utils/manager.js.map +1 -0
- package/dist/utils/node.d.ts +26 -6
- package/dist/utils/node.d.ts.map +1 -1
- package/dist/utils/node.js +173 -12
- package/dist/utils/node.js.map +1 -1
- package/package.json +5 -3
- package/dist/components/Nodes/ColumnNode.d.ts +0 -24
- package/dist/components/Nodes/ColumnNode.d.ts.map +0 -1
- package/dist/components/Nodes/ColumnNode.js.map +0 -1
- package/dist/components/Nodes/CustomNode.d.ts +0 -10
- package/dist/components/Nodes/CustomNode.d.ts.map +0 -1
- package/dist/components/Nodes/CustomNode.js +0 -59
- package/dist/components/Nodes/CustomNode.js.map +0 -1
- package/dist/components/Nodes/DowngradeNode.d.ts +0 -10
- package/dist/components/Nodes/DowngradeNode.d.ts.map +0 -1
- package/dist/components/Nodes/DowngradeNode.js +0 -49
- package/dist/components/Nodes/DowngradeNode.js.map +0 -1
- package/dist/components/Nodes/TableNode.d.ts +0 -25
- package/dist/components/Nodes/TableNode.d.ts.map +0 -1
- package/dist/components/Nodes/TableNode.js +0 -410
- package/dist/components/Nodes/TableNode.js.map +0 -1
- package/dist/manager/DataProcessor.d.ts +0 -31
- package/dist/manager/DataProcessor.d.ts.map +0 -1
- package/dist/manager/DataProcessor.js.map +0 -1
- package/dist/manager/GraphEventManager.d.ts +0 -13
- package/dist/manager/GraphEventManager.d.ts.map +0 -1
- package/dist/manager/GraphEventManager.js +0 -65
- package/dist/manager/GraphEventManager.js.map +0 -1
- package/dist/manager/RightKeyMenuManager.d.ts +0 -24
- package/dist/manager/RightKeyMenuManager.d.ts.map +0 -1
- package/dist/manager/RightKeyMenuManager.js +0 -80
- package/dist/manager/RightKeyMenuManager.js.map +0 -1
- package/dist/types/NodeConfig.d.ts +0 -67
- package/dist/types/NodeConfig.d.ts.map +0 -1
- package/dist/types/NodeConfig.js +0 -2
- package/dist/types/NodeConfig.js.map +0 -1
- package/dist/utils/downgradeNode.d.ts +0 -15
- package/dist/utils/downgradeNode.d.ts.map +0 -1
- package/dist/utils/downgradeNode.js +0 -20
- package/dist/utils/downgradeNode.js.map +0 -1
|
@@ -1,22 +1,34 @@
|
|
|
1
1
|
import { __assign, __read, __spreadArray } from "tslib";
|
|
2
|
-
import { BigLayout, Graph } from '@aloudata/ink-graph-new';
|
|
3
|
-
import {
|
|
4
|
-
import { EDirection, } from '../types';
|
|
5
|
-
import { getRelatedData } from '../utils';
|
|
6
|
-
import { SearchNodeManager,
|
|
2
|
+
import { BigLayout, Graph, isNodeVisible, } from '@aloudata/ink-graph-new';
|
|
3
|
+
import { TableDataProcessor, ExpandManager, TaskGraphEventManager, ScheduleDataProcessor, TaskDataProcessor, } from './index';
|
|
4
|
+
import { EDashType, EDirection, ELineageType, EGraphMode, EEventEnum, } from '../types';
|
|
5
|
+
import { getRelatedData, getTaskRelatedData } from '../utils';
|
|
6
|
+
import { SearchNodeManager, TableRightKeyMenuManager, FoldLineageManager, } from '.';
|
|
7
7
|
import _ from 'lodash';
|
|
8
8
|
import { ToolbarManager } from './ToolbarManager';
|
|
9
9
|
import EventEmitter from 'eventemitter3';
|
|
10
|
-
import { CustomNode,
|
|
10
|
+
import { CustomNode, TableNode, DefaultEdge, ColumnNode, TaskColumnNode, } from '../components';
|
|
11
11
|
import { DefaultNode } from '../components/Nodes/DefaultNode';
|
|
12
12
|
import { CustomEventManager, TableEventManager, ColumnEventManager, } from './nodeManager';
|
|
13
|
-
import { CUSTOM_NODE, BASE_NODE, FOLD_EDGE,
|
|
13
|
+
import { CUSTOM_NODE, BASE_NODE, FOLD_EDGE, LINEAGE_EDGE, TABLE_NODE, BASE_EDGE, TASK_TABLE_NODE, TASK_TABLE_WIDTH, SCHEDULE_TASK_TABLE_NODE, CLICK_EDGE, } from '../constant';
|
|
14
14
|
import { FoldEdge } from '../components/Edges/FoldEdge';
|
|
15
15
|
import { LineageEdge } from '../components/Edges/LineageEdge';
|
|
16
|
-
import {
|
|
16
|
+
import { TableGraphEventManager } from './graphEventManager/TableGraphEventManager';
|
|
17
|
+
import { onZoomChange, updateColumnPosition, updateNodeHeight, } from '../utils/manager';
|
|
18
|
+
import { TaskTableNode } from '../components/Nodes/Task/TaskTableNode';
|
|
19
|
+
import { TaskTableEventManager } from './nodeManager/task/TaskTableEventManager';
|
|
20
|
+
import { TaskColumnEventManager } from './nodeManager/task/TaskColumnEventManager';
|
|
21
|
+
import { TaskRightKeyMenuManager } from './rightKeyMenu/TaskRightKeyMenuManager';
|
|
22
|
+
import { mat4, vec3 } from 'gl-matrix';
|
|
23
|
+
import { BigDagre } from '../BigDagre';
|
|
24
|
+
import { AssetBaseNode } from '../components/Nodes/Table/AssetBaseNode';
|
|
25
|
+
import { ScheduleTaskTableNode } from '../components/Nodes/ScheduleTaskTableNode';
|
|
26
|
+
import { ScheduleTaskTableEventManager } from './nodeManager/ScheduleTaskTableEventManager';
|
|
27
|
+
import { ClickEdge } from '../components/Edges/ClickEdge';
|
|
17
28
|
var InkLineageManager = /** @class */ (function () {
|
|
18
29
|
function InkLineageManager(data, config) {
|
|
19
30
|
this.emitter = new EventEmitter();
|
|
31
|
+
this.activeEdges = [];
|
|
20
32
|
this.activeNodes = [];
|
|
21
33
|
this.relatedNodes = [];
|
|
22
34
|
this.relatedEdges = [];
|
|
@@ -25,6 +37,10 @@ var InkLineageManager = /** @class */ (function () {
|
|
|
25
37
|
this.childrenColumnsMap = new Map();
|
|
26
38
|
this.relatedColumnsMap = new Map();
|
|
27
39
|
this.edgesMap = new Map();
|
|
40
|
+
this.layoutControl = {
|
|
41
|
+
shouldGroupNodes: true,
|
|
42
|
+
shouldLayout: true,
|
|
43
|
+
};
|
|
28
44
|
this.config = config;
|
|
29
45
|
this.canvasDomRoot = _.isString(config.root)
|
|
30
46
|
? document.getElementById(config.root)
|
|
@@ -33,58 +49,116 @@ var InkLineageManager = /** @class */ (function () {
|
|
|
33
49
|
// 初始化managers
|
|
34
50
|
this.initManagers();
|
|
35
51
|
this.initGraph();
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
this.
|
|
39
|
-
this.searchNodeManager.init(this.graph);
|
|
40
|
-
this.rightKeyMenuManager.init(this.graph);
|
|
41
|
-
this.toolbarManager.init(this.graph);
|
|
42
|
-
this.expandManager.init(this.graph);
|
|
43
|
-
this.graphEventManager.init(this.graph);
|
|
52
|
+
this.graphEventManager.init();
|
|
53
|
+
if ([ELineageType.TABLE, ELineageType.SCHEDULE].includes(this.config.lineageType)) {
|
|
54
|
+
this.expandManager.init();
|
|
44
55
|
}
|
|
45
56
|
}
|
|
57
|
+
Object.defineProperty(InkLineageManager.prototype, "isExpanding", {
|
|
58
|
+
get: function () {
|
|
59
|
+
var _a;
|
|
60
|
+
return (_a = this.expandManager) === null || _a === void 0 ? void 0 : _a.isExpanding;
|
|
61
|
+
},
|
|
62
|
+
enumerable: false,
|
|
63
|
+
configurable: true
|
|
64
|
+
});
|
|
65
|
+
InkLineageManager.prototype.initManagers = function () {
|
|
66
|
+
this.searchNodeManager = new SearchNodeManager(this);
|
|
67
|
+
if (this.config.lineageType === ELineageType.TABLE) {
|
|
68
|
+
this.tableEventManager = new TableEventManager(this);
|
|
69
|
+
this.customEventManager = new CustomEventManager(this);
|
|
70
|
+
this.columnEventManager = new ColumnEventManager(this);
|
|
71
|
+
this.graphEventManager = new TableGraphEventManager(this);
|
|
72
|
+
this.dataProcessor = new TableDataProcessor(this);
|
|
73
|
+
this.foldLineageManager = new FoldLineageManager(this);
|
|
74
|
+
this.rightKeyMenuManager = new TableRightKeyMenuManager(this);
|
|
75
|
+
this.toolbarManager = new ToolbarManager(this);
|
|
76
|
+
this.expandManager = new ExpandManager(this);
|
|
77
|
+
}
|
|
78
|
+
else if (this.config.lineageType === ELineageType.TASK) {
|
|
79
|
+
this.tableEventManager = new TaskTableEventManager(this);
|
|
80
|
+
this.columnEventManager = new TaskColumnEventManager(this);
|
|
81
|
+
this.graphEventManager = new TaskGraphEventManager(this);
|
|
82
|
+
this.dataProcessor = new TaskDataProcessor(this);
|
|
83
|
+
this.rightKeyMenuManager = new TaskRightKeyMenuManager(this);
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
this.scheduleTaskTableEventManager = new ScheduleTaskTableEventManager(this);
|
|
87
|
+
this.graphEventManager = new TableGraphEventManager(this);
|
|
88
|
+
this.dataProcessor = new ScheduleDataProcessor(this);
|
|
89
|
+
this.rightKeyMenuManager = new TaskRightKeyMenuManager(this);
|
|
90
|
+
this.expandManager = new ExpandManager(this);
|
|
91
|
+
}
|
|
92
|
+
};
|
|
46
93
|
InkLineageManager.prototype.initGraph = function () {
|
|
47
|
-
|
|
94
|
+
var _this = this;
|
|
95
|
+
var _a = this.config, root = _a.root, cullingConfig = _a.cullingConfig, layoutConfig = _a.layoutConfig, zoomConfig = _a.zoomConfig;
|
|
48
96
|
var graph = new Graph({
|
|
49
|
-
root:
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
},
|
|
97
|
+
root: root,
|
|
98
|
+
culling: cullingConfig,
|
|
99
|
+
layout: layoutConfig,
|
|
100
|
+
minimap: { enable: this.parsedData.nodes.length > 0 },
|
|
53
101
|
tools: {
|
|
54
|
-
zoom: {
|
|
55
|
-
|
|
56
|
-
|
|
102
|
+
zoom: __assign(__assign({}, zoomConfig), { onZoomChange: function (mode) {
|
|
103
|
+
if (_this.config.lineageType === ELineageType.TABLE) {
|
|
104
|
+
onZoomChange(mode, _this);
|
|
105
|
+
}
|
|
106
|
+
} }),
|
|
107
|
+
resetViewport: {
|
|
108
|
+
visible: true,
|
|
109
|
+
onResetViewportChange: function () {
|
|
110
|
+
_this.update({ shouldGroupNodes: false });
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
canvasCallback: {
|
|
115
|
+
onDrop: function () {
|
|
116
|
+
var _a, _b, _c, _d;
|
|
117
|
+
if (((_b = (_a = _this.config) === null || _a === void 0 ? void 0 : _a.cullingConfig) === null || _b === void 0 ? void 0 : _b.auto) &&
|
|
118
|
+
_this.parsedData.nodes.length > ((_d = (_c = _this.config) === null || _c === void 0 ? void 0 : _c.cullingConfig) === null || _d === void 0 ? void 0 : _d.max)) {
|
|
119
|
+
_this.update({ shouldGroupNodes: false });
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
onWheel: function () {
|
|
123
|
+
var _a, _b, _c, _d;
|
|
124
|
+
if (((_b = (_a = _this.config) === null || _a === void 0 ? void 0 : _a.cullingConfig) === null || _b === void 0 ? void 0 : _b.auto) &&
|
|
125
|
+
_this.parsedData.nodes.length > ((_d = (_c = _this.config) === null || _c === void 0 ? void 0 : _c.cullingConfig) === null || _d === void 0 ? void 0 : _d.max)) {
|
|
126
|
+
_this.update({ shouldGroupNodes: false });
|
|
127
|
+
}
|
|
57
128
|
},
|
|
58
129
|
},
|
|
59
|
-
culling: __assign({}, this.config.cullingConfig),
|
|
60
|
-
baseNodeHeight: this.config.baseNodeHeight,
|
|
61
130
|
});
|
|
62
131
|
this.graph = graph;
|
|
63
132
|
// register custom node
|
|
64
|
-
|
|
133
|
+
if (this.config.lineageType === ELineageType.TASK) {
|
|
134
|
+
graph.registerNode(BASE_NODE, TaskTableNode);
|
|
135
|
+
graph.registerEdge(BASE_EDGE, LineageEdge);
|
|
136
|
+
}
|
|
137
|
+
else {
|
|
138
|
+
graph.registerNode(BASE_NODE, AssetBaseNode);
|
|
139
|
+
}
|
|
65
140
|
graph.registerNode(TABLE_NODE, TableNode);
|
|
141
|
+
graph.registerNode(TASK_TABLE_NODE, TaskTableNode);
|
|
66
142
|
graph.registerNode(CUSTOM_NODE, CustomNode);
|
|
143
|
+
graph.registerNode(SCHEDULE_TASK_TABLE_NODE, ScheduleTaskTableNode);
|
|
67
144
|
graph.registerEdge(FOLD_EDGE, FoldEdge);
|
|
68
145
|
graph.registerEdge(LINEAGE_EDGE, LineageEdge);
|
|
146
|
+
graph.registerEdge(CLICK_EDGE, ClickEdge);
|
|
69
147
|
DefaultNode.lineageManager = this;
|
|
70
148
|
DefaultEdge.lineageManager = this;
|
|
71
|
-
this.
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
this.
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
this.
|
|
84
|
-
};
|
|
85
|
-
InkLineageManager.prototype.updateData = function (data) {
|
|
86
|
-
this.setData(data);
|
|
87
|
-
this.update();
|
|
149
|
+
if (this.config.lineageType === ELineageType.TASK) {
|
|
150
|
+
TaskTableNode.lineageManager = this;
|
|
151
|
+
TaskColumnNode.lineageManager = this;
|
|
152
|
+
}
|
|
153
|
+
else if (this.config.lineageType === ELineageType.SCHEDULE) {
|
|
154
|
+
ScheduleTaskTableNode.lineageManager = this;
|
|
155
|
+
}
|
|
156
|
+
else {
|
|
157
|
+
TableNode.lineageManager = this;
|
|
158
|
+
CustomNode.lineageManager = this;
|
|
159
|
+
ColumnNode.lineageManager = this;
|
|
160
|
+
}
|
|
161
|
+
this.render(false, true);
|
|
88
162
|
};
|
|
89
163
|
InkLineageManager.prototype.on = function (type, listener) {
|
|
90
164
|
this.emitter.on(type, listener);
|
|
@@ -98,39 +172,121 @@ var InkLineageManager = /** @class */ (function () {
|
|
|
98
172
|
InkLineageManager.prototype.off = function (type, listener) {
|
|
99
173
|
this.emitter.off(type, listener);
|
|
100
174
|
};
|
|
101
|
-
InkLineageManager.prototype.
|
|
175
|
+
InkLineageManager.prototype.layout = function (nodes, edges) {
|
|
176
|
+
var _a, _b, _c;
|
|
177
|
+
if (nodes === void 0) { nodes = this.parsedData.nodes; }
|
|
178
|
+
if (edges === void 0) { edges = this.parsedData.edges; }
|
|
179
|
+
var layoutData;
|
|
180
|
+
if (this.config.lineageType === ELineageType.TABLE) {
|
|
181
|
+
layoutData = BigLayout(nodes, edges, this.canvasDomRoot, {
|
|
182
|
+
shouldGroupNodes: this.layoutControl.shouldGroupNodes,
|
|
183
|
+
sortConfig: (_c = (_b = (_a = this.config) === null || _a === void 0 ? void 0 : _a.layoutConfig) === null || _b === void 0 ? void 0 : _b.sortRules) !== null && _c !== void 0 ? _c : [],
|
|
184
|
+
mode: this.graph.mode,
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
else {
|
|
188
|
+
layoutData = BigDagre(nodes, edges, this.getCanvas(), {
|
|
189
|
+
rankdir: 'LR',
|
|
190
|
+
excludeIndirectEdges: true,
|
|
191
|
+
ranksep: 80,
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
return layoutData || { nodes: [], edges: [] };
|
|
195
|
+
};
|
|
196
|
+
InkLineageManager.prototype.getState = function () {
|
|
102
197
|
var _a;
|
|
103
|
-
|
|
104
|
-
return;
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
198
|
+
return {
|
|
199
|
+
activeNodesId: this.activeNodes.map(function (item) { return item.id; }),
|
|
200
|
+
relatedNodesId: this.relatedNodes.map(function (item) { return item.id; }),
|
|
201
|
+
relatedEdgesId: this.relatedEdges.map(function (item) { return item.id; }),
|
|
202
|
+
cachedRelatedNodeConfigId: (_a = this.cachedRelatedNodeConfig) === null || _a === void 0 ? void 0 : _a.id,
|
|
203
|
+
parsedData: this.parsedData,
|
|
204
|
+
expandManager: this.expandManager.getState(),
|
|
205
|
+
toolbarManager: this.toolbarManager.getState(),
|
|
206
|
+
rightKeyMenuManager: this.rightKeyMenuManager.getState(),
|
|
207
|
+
foldLineageManager: this.foldLineageManager.getState(),
|
|
208
|
+
};
|
|
209
|
+
};
|
|
210
|
+
InkLineageManager.prototype.updateState = function (data) {
|
|
211
|
+
var _this = this;
|
|
212
|
+
var activeNodesId = data.activeNodesId, relatedNodesId = data.relatedNodesId, relatedEdgesId = data.relatedEdgesId, cachedRelatedNodeConfigId = data.cachedRelatedNodeConfigId, expandManager = data.expandManager, toolbarManager = data.toolbarManager, rightKeyMenuManager = data.rightKeyMenuManager, foldLineageManager = data.foldLineageManager;
|
|
213
|
+
this.activeNodes = activeNodesId.map(function (id) { return _this.getNodeConfigById(id); });
|
|
214
|
+
this.relatedNodes = relatedNodesId.map(function (id) { return _this.getNodeConfigById(id); });
|
|
215
|
+
this.relatedEdges = relatedEdgesId.map(function (id) { return _this.getEdgeConfigById(id); });
|
|
216
|
+
this.cachedRelatedNodeConfig = this.getNodeConfigById(cachedRelatedNodeConfigId);
|
|
217
|
+
this.expandManager.updateState(expandManager);
|
|
218
|
+
this.toolbarManager.updateState(toolbarManager);
|
|
219
|
+
this.rightKeyMenuManager.updateState(rightKeyMenuManager);
|
|
220
|
+
this.foldLineageManager.updateState(foldLineageManager);
|
|
221
|
+
this.update();
|
|
112
222
|
};
|
|
113
|
-
InkLineageManager.prototype.
|
|
114
|
-
var _a, _b;
|
|
223
|
+
InkLineageManager.prototype.render = function (isUpdate, isInit) {
|
|
224
|
+
var _a, _b, _c, _d;
|
|
225
|
+
if (isUpdate === void 0) { isUpdate = false; }
|
|
115
226
|
if (!this.parsedData)
|
|
116
227
|
return;
|
|
117
|
-
var _c = this.parsedData, nodes = _c.nodes, edges = _c.edges;
|
|
118
228
|
this.refreshExtraStatus();
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
229
|
+
if (this.layoutControl.shouldLayout) {
|
|
230
|
+
var _e = this.parsedData, nodes = _e.nodes, edges = _e.edges;
|
|
231
|
+
var visibleNodes = nodes.filter(function (node) { return node.visible; });
|
|
232
|
+
var visibleEdges = edges.filter(function (edge) { return edge.visible; });
|
|
233
|
+
var layoutData = this.layout(visibleNodes, visibleEdges);
|
|
234
|
+
// this.updateDataMaps(layoutData); // 布局完之后的节点需要更新到map中,这样节点才有偏移,合并链路才符合预期
|
|
235
|
+
var data = this.handleCulling(layoutData);
|
|
236
|
+
this.graph.setData(data);
|
|
237
|
+
}
|
|
238
|
+
// 表血缘有环的情况下,icon的显隐判断,需要根据坐标判断
|
|
239
|
+
if (this.config.lineageType === ELineageType.TABLE) {
|
|
240
|
+
(_b = (_a = this.dataProcessor) === null || _a === void 0 ? void 0 : _a.updateSideIconVisible) === null || _b === void 0 ? void 0 : _b.call(_a, this.parsedData);
|
|
241
|
+
}
|
|
242
|
+
if (isUpdate) {
|
|
243
|
+
(_c = this.graph) === null || _c === void 0 ? void 0 : _c.update();
|
|
244
|
+
}
|
|
245
|
+
else {
|
|
246
|
+
(_d = this.graph) === null || _d === void 0 ? void 0 : _d.render();
|
|
247
|
+
}
|
|
248
|
+
if (this.config.lineageType === ELineageType.TASK && isInit) {
|
|
249
|
+
this.taskTranslate();
|
|
250
|
+
}
|
|
251
|
+
this.resetLayoutControl();
|
|
252
|
+
};
|
|
253
|
+
InkLineageManager.prototype.taskTranslate = function () {
|
|
254
|
+
var _this = this;
|
|
255
|
+
var _a, _b, _c, _d, _e, _f;
|
|
256
|
+
var rightNode = '';
|
|
257
|
+
(_b = (_a = this.graph) === null || _a === void 0 ? void 0 : _a.nodes) === null || _b === void 0 ? void 0 : _b.forEach(function (node) {
|
|
258
|
+
var _a, _b, _c;
|
|
259
|
+
if (!node.config.visible)
|
|
260
|
+
return;
|
|
261
|
+
var target = node.bgRect;
|
|
262
|
+
var _d = __read(target.getPosition(), 1), x = _d[0];
|
|
263
|
+
var curRightNodeX = (_c = (_b = (_a = _this.graph.nodes) === null || _a === void 0 ? void 0 : _a.get(rightNode)) === null || _b === void 0 ? void 0 : _b.getPosition) === null || _c === void 0 ? void 0 : _c.call(_b)[0];
|
|
264
|
+
if (rightNode === '' || x > curRightNodeX)
|
|
265
|
+
rightNode = node === null || node === void 0 ? void 0 : node.id;
|
|
124
266
|
});
|
|
125
|
-
|
|
267
|
+
if (!rightNode)
|
|
268
|
+
return;
|
|
269
|
+
var canvasW = (_c = this.graph) === null || _c === void 0 ? void 0 : _c.getWidth();
|
|
270
|
+
var canvasH = (_d = this.graph) === null || _d === void 0 ? void 0 : _d.getHeight();
|
|
271
|
+
var target = (_e = this.graph.nodes) === null || _e === void 0 ? void 0 : _e.get(rightNode);
|
|
272
|
+
var _g = __read(target.getPosition(), 2), x = _g[0], y = _g[1];
|
|
273
|
+
var _h = target.getBBox(), height = _h.height, width = _h.width;
|
|
274
|
+
var innerWidth = window.innerWidth, innerHeight = window.innerHeight;
|
|
275
|
+
var offsetX = (-200 * innerWidth) / 1920;
|
|
276
|
+
var offsetY = (100 * innerHeight) / 1080;
|
|
277
|
+
(_f = this.graph) === null || _f === void 0 ? void 0 : _f.translate(x - canvasW / 2 + width / 2 + offsetX, y - canvasH / 2 + height / 2 + offsetY);
|
|
278
|
+
};
|
|
279
|
+
InkLineageManager.prototype.update = function (layoutControl) {
|
|
280
|
+
if (layoutControl) {
|
|
281
|
+
this.layoutControl = __assign(__assign({}, this.layoutControl), layoutControl);
|
|
282
|
+
}
|
|
283
|
+
this.render(true);
|
|
126
284
|
};
|
|
127
|
-
InkLineageManager.prototype.
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
false, null, this.graph.mode);
|
|
133
|
-
return layoutedData;
|
|
285
|
+
InkLineageManager.prototype.resetLayoutControl = function () {
|
|
286
|
+
this.layoutControl = {
|
|
287
|
+
shouldGroupNodes: true,
|
|
288
|
+
shouldLayout: true,
|
|
289
|
+
};
|
|
134
290
|
};
|
|
135
291
|
InkLineageManager.prototype.destroy = function () {
|
|
136
292
|
var _a;
|
|
@@ -138,17 +294,84 @@ var InkLineageManager = /** @class */ (function () {
|
|
|
138
294
|
this.graph = null;
|
|
139
295
|
};
|
|
140
296
|
InkLineageManager.prototype.setData = function (data) {
|
|
297
|
+
// if (
|
|
298
|
+
// this.getMode() === 'SIMPLE' &&
|
|
299
|
+
// this.config.lineageType === ELineageType.TABLE
|
|
300
|
+
// ) {
|
|
301
|
+
// data.edges.forEach((edge) => {
|
|
302
|
+
// if (hideEdgeTypes.includes(edge.data.relationTypeCode)) {
|
|
303
|
+
// edge.visible = false;
|
|
304
|
+
// edge.canBeFold = true;
|
|
305
|
+
// edge.isFolded = true;
|
|
306
|
+
// }
|
|
307
|
+
// });
|
|
308
|
+
// }
|
|
141
309
|
this.parsedData = data;
|
|
142
310
|
this.updateDataMaps(this.parsedData);
|
|
143
311
|
};
|
|
144
|
-
InkLineageManager.prototype.
|
|
145
|
-
|
|
146
|
-
|
|
312
|
+
InkLineageManager.prototype.updateData = function (data) {
|
|
313
|
+
this.setData(data);
|
|
314
|
+
this.update();
|
|
315
|
+
};
|
|
316
|
+
// 裁剪逻辑
|
|
317
|
+
InkLineageManager.prototype.handleCulling = function (data) {
|
|
318
|
+
var _this = this;
|
|
319
|
+
var _a, _b;
|
|
320
|
+
var _c = ((_a = this.config) === null || _a === void 0 ? void 0 : _a.cullingConfig) || { auto: false, max: 0 }, auto = _c.auto, max = _c.max;
|
|
321
|
+
var culling = auto && this.parsedData.nodes.length > max;
|
|
322
|
+
var nodesConfig = data.nodes;
|
|
323
|
+
var edgesConfig = data.edges;
|
|
324
|
+
if (culling) {
|
|
325
|
+
var orthoMatrix_1 = this.getCanvas().getCamera().getOrthoMatrix();
|
|
326
|
+
// set nodes & edges
|
|
327
|
+
var nodesConfigMap_1 = new Map();
|
|
328
|
+
nodesConfig = (_b = data === null || data === void 0 ? void 0 : data.nodes) === null || _b === void 0 ? void 0 : _b.filter(function (node) {
|
|
329
|
+
var isVisible = isNodeVisible(node, _this.canvasDomRoot.clientWidth, _this.canvasDomRoot.clientHeight, orthoMatrix_1);
|
|
330
|
+
if (isVisible) {
|
|
331
|
+
nodesConfigMap_1.set(node.id, node);
|
|
332
|
+
}
|
|
333
|
+
return isVisible;
|
|
334
|
+
});
|
|
335
|
+
}
|
|
336
|
+
return {
|
|
337
|
+
nodes: nodesConfig,
|
|
338
|
+
edges: edgesConfig,
|
|
339
|
+
};
|
|
340
|
+
};
|
|
341
|
+
InkLineageManager.prototype.scheduleRefreshExtraStatus = function () {
|
|
342
|
+
var _a, _b, _c;
|
|
343
|
+
(_a = this.dataProcessor) === null || _a === void 0 ? void 0 : _a.updateNodesAndEdgesVisible(this.parsedData);
|
|
344
|
+
(_b = this.dataProcessor) === null || _b === void 0 ? void 0 : _b.refreshRelatedNodesAndEdges(this.relatedNodes, this.relatedEdges);
|
|
345
|
+
(_c = this.dataProcessor) === null || _c === void 0 ? void 0 : _c.updateSideIconVisible(this.parsedData);
|
|
346
|
+
};
|
|
347
|
+
InkLineageManager.prototype.taskRefreshExtraStatus = function () {
|
|
348
|
+
var _a, _b, _c, _d, _e;
|
|
349
|
+
(_a = this.dataProcessor) === null || _a === void 0 ? void 0 : _a.updateNodesAndEdgesVisible(this.parsedData, (_b = this.rightKeyMenuManager) === null || _b === void 0 ? void 0 : _b.edgeDashVisible, (_c = this.rightKeyMenuManager) === null || _c === void 0 ? void 0 : _c.onlyShowRelated);
|
|
147
350
|
// 刷新相关节点和边的高亮样式(如果打开了间接血缘按钮,那这些间接血缘也需要高亮)
|
|
148
|
-
(
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
(
|
|
351
|
+
if (((_d = this.rightKeyMenuManager) === null || _d === void 0 ? void 0 : _d.exploreState.mode) === EGraphMode.NORMAL) {
|
|
352
|
+
(_e = this.dataProcessor) === null || _e === void 0 ? void 0 : _e.refreshRelatedNodesAndEdges(this.relatedNodes, this.relatedEdges);
|
|
353
|
+
}
|
|
354
|
+
updateNodeHeight(this.parsedData);
|
|
355
|
+
updateColumnPosition(this.parsedData);
|
|
356
|
+
};
|
|
357
|
+
InkLineageManager.prototype.refreshExtraStatus = function () {
|
|
358
|
+
var _a, _b, _c, _d, _e;
|
|
359
|
+
if (this.config.lineageType === ELineageType.TASK) {
|
|
360
|
+
this.taskRefreshExtraStatus();
|
|
361
|
+
}
|
|
362
|
+
else if (this.config.lineageType === ELineageType.SCHEDULE) {
|
|
363
|
+
this.scheduleRefreshExtraStatus();
|
|
364
|
+
}
|
|
365
|
+
else {
|
|
366
|
+
(_a = this.dataProcessor) === null || _a === void 0 ? void 0 : _a.updateNodesAndEdgesVisible(this.parsedData, (_b = this.rightKeyMenuManager) === null || _b === void 0 ? void 0 : _b.edgeDashVisible, (_c = this.rightKeyMenuManager) === null || _c === void 0 ? void 0 : _c.onlyShowRelated, (_d = this.foldLineageManager) === null || _d === void 0 ? void 0 : _d.isFoldChecked);
|
|
367
|
+
// 刷新相关节点和边的高亮样式(如果打开了间接血缘按钮,那这些间接血缘也需要高亮)
|
|
368
|
+
(_e = this.dataProcessor) === null || _e === void 0 ? void 0 : _e.refreshRelatedNodesAndEdges(this.relatedNodes, this.relatedEdges);
|
|
369
|
+
// (
|
|
370
|
+
// this.dataProcessor as TableDataProcessor<TTableData, TColumnData>
|
|
371
|
+
// )?.updateSideIconVisible(this.parsedData);
|
|
372
|
+
updateNodeHeight(this.parsedData);
|
|
373
|
+
updateColumnPosition(this.parsedData);
|
|
374
|
+
}
|
|
152
375
|
};
|
|
153
376
|
InkLineageManager.prototype.updateActiveNodes = function (nodes) {
|
|
154
377
|
var _a, _b;
|
|
@@ -180,8 +403,9 @@ var InkLineageManager = /** @class */ (function () {
|
|
|
180
403
|
var _a, _b, _c;
|
|
181
404
|
if (needUpdate === void 0) { needUpdate = true; }
|
|
182
405
|
// reset prev related nodes
|
|
406
|
+
var activeNodeIds = this.activeNodes.map(function (n) { return n === null || n === void 0 ? void 0 : n.id; }) || [];
|
|
183
407
|
(_a = this.relatedNodes) === null || _a === void 0 ? void 0 : _a.forEach(function (n) {
|
|
184
|
-
if (!n)
|
|
408
|
+
if (!n || activeNodeIds.includes(n.id))
|
|
185
409
|
return;
|
|
186
410
|
n.isRelated = false;
|
|
187
411
|
n.style.stroke = '#B1B1B1';
|
|
@@ -196,13 +420,11 @@ var InkLineageManager = /** @class */ (function () {
|
|
|
196
420
|
}
|
|
197
421
|
});
|
|
198
422
|
// reset prev related edges
|
|
199
|
-
(_b = this.relatedEdges) === null || _b === void 0 ? void 0 : _b.forEach(function (
|
|
200
|
-
|
|
201
|
-
|
|
423
|
+
(_b = this.relatedEdges) === null || _b === void 0 ? void 0 : _b.forEach(function (edge) {
|
|
424
|
+
var isFold = edge.inFoldLink && _this.foldLineageManager.isFoldChecked;
|
|
425
|
+
if (isFold || edge.isExtraFoldEdge)
|
|
202
426
|
return;
|
|
203
|
-
|
|
204
|
-
e.style.lineWidth = 1;
|
|
205
|
-
e.style.zIndex = -1;
|
|
427
|
+
_this.resetEdgeStyle(edge);
|
|
206
428
|
});
|
|
207
429
|
// update new related nodes
|
|
208
430
|
this.relatedNodes = nodes;
|
|
@@ -223,18 +445,23 @@ var InkLineageManager = /** @class */ (function () {
|
|
|
223
445
|
});
|
|
224
446
|
// update new related edges
|
|
225
447
|
this.relatedEdges = edges;
|
|
226
|
-
this.relatedEdges.forEach(function (
|
|
227
|
-
|
|
228
|
-
|
|
448
|
+
this.relatedEdges.forEach(function (edge) {
|
|
449
|
+
var isFold = edge.inFoldLink && _this.foldLineageManager.isFoldChecked;
|
|
450
|
+
if (isFold || edge.isExtraFoldEdge)
|
|
229
451
|
return;
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
452
|
+
edge.style.stroke = '#3271C9';
|
|
453
|
+
edge.style.lineWidth = 1.5;
|
|
454
|
+
edge.style.zIndex = 1;
|
|
233
455
|
});
|
|
234
456
|
if (needUpdate) {
|
|
235
|
-
this.update();
|
|
457
|
+
this.update({ shouldLayout: false });
|
|
236
458
|
}
|
|
237
459
|
};
|
|
460
|
+
InkLineageManager.prototype.resetEdgeStyle = function (edge) {
|
|
461
|
+
edge.style.stroke = '#B1B1B1';
|
|
462
|
+
edge.style.lineWidth = 1;
|
|
463
|
+
edge.style.zIndex = -1;
|
|
464
|
+
};
|
|
238
465
|
InkLineageManager.prototype.resetRelatedNodes = function (needUpdate) {
|
|
239
466
|
if (needUpdate === void 0) { needUpdate = true; }
|
|
240
467
|
this.updateRelatedNodes([], [], needUpdate);
|
|
@@ -246,19 +473,7 @@ var InkLineageManager = /** @class */ (function () {
|
|
|
246
473
|
prevHighlightNodeConfig.style.stroke = '#E8E8E8';
|
|
247
474
|
prevHighlightNodeConfig.style.fill = '#FFF';
|
|
248
475
|
}
|
|
249
|
-
this.update();
|
|
250
|
-
};
|
|
251
|
-
InkLineageManager.prototype.getNodeInstanceById = function (id) {
|
|
252
|
-
var _a;
|
|
253
|
-
return (_a = this.graph) === null || _a === void 0 ? void 0 : _a.getNodeById(id);
|
|
254
|
-
};
|
|
255
|
-
InkLineageManager.prototype.getNodeOrColumnInstanceById = function (id) {
|
|
256
|
-
var _a;
|
|
257
|
-
return (_a = this.graph) === null || _a === void 0 ? void 0 : _a.getAnchorNodeById(id);
|
|
258
|
-
};
|
|
259
|
-
InkLineageManager.prototype.getEdgeInstanceById = function (id) {
|
|
260
|
-
var _a;
|
|
261
|
-
return (_a = this.graph) === null || _a === void 0 ? void 0 : _a.getEdgeById(id);
|
|
476
|
+
this.update({ shouldLayout: false });
|
|
262
477
|
};
|
|
263
478
|
InkLineageManager.prototype.getNodeConfigById = function (id) {
|
|
264
479
|
var tableNodeConfig = this.getTableNodeConfigById(id);
|
|
@@ -278,14 +493,56 @@ var InkLineageManager = /** @class */ (function () {
|
|
|
278
493
|
InkLineageManager.prototype.getChildrenColumnConfigById = function (id) {
|
|
279
494
|
return this.childrenColumnsMap.get(id);
|
|
280
495
|
};
|
|
496
|
+
InkLineageManager.prototype.setTaskRelatedNodesAndEdges = function (nodeConfig, needUpdate, direction) {
|
|
497
|
+
if (needUpdate === void 0) { needUpdate = true; }
|
|
498
|
+
if (direction === void 0) { direction = EDirection.BOTH; }
|
|
499
|
+
this.cachedRelatedNodeConfig = nodeConfig;
|
|
500
|
+
var edgeDashVisible = this.rightKeyMenuManager.edgeDashVisible;
|
|
501
|
+
if (!nodeConfig)
|
|
502
|
+
return;
|
|
503
|
+
var relatedNodes = [];
|
|
504
|
+
var relatedEdges = [];
|
|
505
|
+
if (direction === EDirection.BOTH) {
|
|
506
|
+
// update related ui
|
|
507
|
+
// 获取与点击节点相关的节点/边(包含自己在内)
|
|
508
|
+
var relatedInputs = getTaskRelatedData(nodeConfig, this.parsedData.nodes, this.parsedData.edges, EDirection.INPUT, edgeDashVisible);
|
|
509
|
+
var relatedOutputs = getTaskRelatedData(nodeConfig, this.parsedData.nodes, this.parsedData.edges, EDirection.OUTPUT, edgeDashVisible);
|
|
510
|
+
// 高亮是把点击节点的上下游节点/边都高亮,所以要去重
|
|
511
|
+
relatedNodes = _.uniqBy(__spreadArray(__spreadArray([], __read(relatedInputs.relatedNodes), false), __read(relatedOutputs.relatedNodes), false), 'id');
|
|
512
|
+
relatedEdges = _.uniqBy(__spreadArray(__spreadArray([], __read(relatedInputs.relatedEdges), false), __read(relatedOutputs.relatedEdges), false), 'id');
|
|
513
|
+
}
|
|
514
|
+
else if (direction === EDirection.INPUT ||
|
|
515
|
+
direction === EDirection.OUTPUT) {
|
|
516
|
+
var relatedInputsOrOutputs = getTaskRelatedData(nodeConfig, this.parsedData.nodes, this.parsedData.edges, direction, edgeDashVisible);
|
|
517
|
+
var _relatedNodes = relatedInputsOrOutputs.relatedNodes, _relatedEdges = relatedInputsOrOutputs.relatedEdges;
|
|
518
|
+
if (
|
|
519
|
+
// 间接血缘开关已打开就不需要进行此判断
|
|
520
|
+
edgeDashVisible === EDashType.DIRECT &&
|
|
521
|
+
_relatedEdges.every(function (e) { return e.relationType === EDashType.INDIRECT; })) {
|
|
522
|
+
// 清空上一次探索的相关列
|
|
523
|
+
this.clearRelatedColumns();
|
|
524
|
+
// 取消之前点击节点的相关节点的高亮状态;间接血缘从开到关的情况下相关表应当取消高亮
|
|
525
|
+
// 该探索节点只有间接血缘导致没有其相关节点被高亮,但此时已经进入了探索模式,所以仍需要取消之前的高亮状态
|
|
526
|
+
this.resetRelatedNodes(true);
|
|
527
|
+
return this.emit(EEventEnum.NOTIFICATION_TIPS, {
|
|
528
|
+
message: '当前字段只有间接血缘,请打开间接血缘开关后查看',
|
|
529
|
+
});
|
|
530
|
+
}
|
|
531
|
+
relatedNodes = _relatedNodes;
|
|
532
|
+
relatedEdges = _relatedEdges;
|
|
533
|
+
}
|
|
534
|
+
// 设置点击节点的上下游节点/边的高亮样式并进行最终的图形更新
|
|
535
|
+
this.updateRelatedNodes(relatedNodes, relatedEdges, needUpdate);
|
|
536
|
+
};
|
|
281
537
|
InkLineageManager.prototype.setRelatedNodesAndEdges = function (nodeConfig, needUpdate) {
|
|
282
538
|
if (needUpdate === void 0) { needUpdate = true; }
|
|
283
539
|
this.cachedRelatedNodeConfig = nodeConfig;
|
|
284
540
|
if (!nodeConfig)
|
|
285
541
|
return;
|
|
542
|
+
var edgeDashVisible = this.rightKeyMenuManager.edgeDashVisible;
|
|
286
543
|
// update related ui
|
|
287
|
-
var relatedInputs = getRelatedData(nodeConfig, this.parsedData.nodes, this.parsedData.edges, EDirection.INPUT);
|
|
288
|
-
var relatedOutputs = getRelatedData(nodeConfig, this.parsedData.nodes, this.parsedData.edges, EDirection.OUTPUT);
|
|
544
|
+
var relatedInputs = getRelatedData(nodeConfig, this.parsedData.nodes, this.parsedData.edges, EDirection.INPUT, edgeDashVisible);
|
|
545
|
+
var relatedOutputs = getRelatedData(nodeConfig, this.parsedData.nodes, this.parsedData.edges, EDirection.OUTPUT, edgeDashVisible);
|
|
289
546
|
var relatedNodes = _.uniqBy(__spreadArray(__spreadArray([], __read(relatedInputs.relatedNodes), false), __read(relatedOutputs.relatedNodes), false), 'id');
|
|
290
547
|
var relatedEdges = _.uniqBy(__spreadArray(__spreadArray([], __read(relatedInputs.relatedEdges), false), __read(relatedOutputs.relatedEdges), false), 'id');
|
|
291
548
|
this.updateRelatedNodes(relatedNodes, relatedEdges, needUpdate);
|
|
@@ -294,15 +551,21 @@ var InkLineageManager = /** @class */ (function () {
|
|
|
294
551
|
return this.edgesMap.get(id);
|
|
295
552
|
};
|
|
296
553
|
InkLineageManager.prototype.resetToolConfig = function () {
|
|
297
|
-
|
|
554
|
+
var _a;
|
|
555
|
+
(_a = this.foldLineageManager) === null || _a === void 0 ? void 0 : _a.resetFoldCheck();
|
|
298
556
|
this.rightKeyMenuManager.resetEdgeDashVisible();
|
|
299
557
|
this.rightKeyMenuManager.resetOnlyShowRelated();
|
|
300
558
|
};
|
|
559
|
+
InkLineageManager.prototype.setChildrenColumnsMap = function (id, column) {
|
|
560
|
+
this.childrenColumnsMap.set(id, column);
|
|
561
|
+
};
|
|
301
562
|
// Add method to update the maps
|
|
302
563
|
InkLineageManager.prototype.updateDataMaps = function (data) {
|
|
303
564
|
var _this = this;
|
|
304
565
|
// Clear existing maps
|
|
305
566
|
this.nodesMap.clear();
|
|
567
|
+
this.relatedColumnsMap.clear();
|
|
568
|
+
this.childrenColumnsMap.clear();
|
|
306
569
|
this.edgesMap.clear();
|
|
307
570
|
// Populate node map
|
|
308
571
|
data.nodes.forEach(function (node) {
|
|
@@ -331,33 +594,16 @@ var InkLineageManager = /** @class */ (function () {
|
|
|
331
594
|
});
|
|
332
595
|
}
|
|
333
596
|
};
|
|
334
|
-
|
|
335
|
-
InkLineageManager.prototype.resetPosition = function () {
|
|
336
|
-
if (this.graph.mode === 'NORMAL') {
|
|
337
|
-
this.graph.resetPosition();
|
|
338
|
-
}
|
|
339
|
-
};
|
|
340
|
-
Object.defineProperty(InkLineageManager.prototype, "isExpanding", {
|
|
341
|
-
/**************************************** 扩展 *******************************/
|
|
342
|
-
get: function () {
|
|
343
|
-
var _a;
|
|
344
|
-
return (_a = this.expandManager) === null || _a === void 0 ? void 0 : _a.isExpanding;
|
|
345
|
-
},
|
|
346
|
-
enumerable: false,
|
|
347
|
-
configurable: true
|
|
348
|
-
});
|
|
597
|
+
/**************************************** 扩展 *******************************/
|
|
349
598
|
InkLineageManager.prototype.showExpandLoading = function (target, direction) {
|
|
350
|
-
|
|
351
|
-
(_a = this.expandManager) === null || _a === void 0 ? void 0 : _a.showExpandLoading(target, direction);
|
|
599
|
+
this.expandManager.showExpandLoading(target, direction);
|
|
352
600
|
};
|
|
353
601
|
InkLineageManager.prototype.hideExpandLoading = function () {
|
|
354
|
-
|
|
355
|
-
(_a = this.expandManager) === null || _a === void 0 ? void 0 : _a.hideExpandLoading();
|
|
602
|
+
this.expandManager.hideExpandLoading();
|
|
356
603
|
};
|
|
357
604
|
/**************************************** 全局搜索 *******************************/
|
|
358
605
|
InkLineageManager.prototype.searchNode = function (input) {
|
|
359
|
-
|
|
360
|
-
(_a = this.searchNodeManager) === null || _a === void 0 ? void 0 : _a.searchNode(input);
|
|
606
|
+
this.searchNodeManager.searchNode(input);
|
|
361
607
|
};
|
|
362
608
|
/**************************************** 工具栏 *******************************/
|
|
363
609
|
InkLineageManager.prototype.refreshToolbarRelatedStatus = function (nodeConfig) {
|
|
@@ -367,47 +613,162 @@ var InkLineageManager = /** @class */ (function () {
|
|
|
367
613
|
/**************************************** 右键菜单 *******************************/
|
|
368
614
|
// update overview info
|
|
369
615
|
InkLineageManager.prototype.setOverview = function (data) {
|
|
370
|
-
|
|
371
|
-
(_a = this.rightKeyMenuManager) === null || _a === void 0 ? void 0 : _a.setOverview(data);
|
|
616
|
+
this.rightKeyMenuManager.setOverview(data);
|
|
372
617
|
};
|
|
373
618
|
// show context menu
|
|
374
619
|
InkLineageManager.prototype.showContextMenu = function (data) {
|
|
375
|
-
|
|
376
|
-
(_a = this.rightKeyMenuManager) === null || _a === void 0 ? void 0 : _a.showContextMenu(data);
|
|
620
|
+
this.rightKeyMenuManager.showContextMenu(data);
|
|
377
621
|
};
|
|
378
622
|
// hide context menu
|
|
379
623
|
InkLineageManager.prototype.hideContextMenu = function () {
|
|
380
|
-
|
|
381
|
-
(_a = this.rightKeyMenuManager) === null || _a === void 0 ? void 0 : _a.hideContextMenu();
|
|
624
|
+
this.rightKeyMenuManager.hideContextMenu();
|
|
382
625
|
};
|
|
383
626
|
// show hotspot modal
|
|
384
627
|
InkLineageManager.prototype.updateHotspotModalState = function (data) {
|
|
385
628
|
this.rightKeyMenuManager.updateHotspotModalState(data);
|
|
386
629
|
};
|
|
630
|
+
InkLineageManager.prototype.updateAggregationTableModalState = function (data) {
|
|
631
|
+
this.rightKeyMenuManager.updateAggregationTableModalState(data);
|
|
632
|
+
};
|
|
633
|
+
InkLineageManager.prototype.getAggregationTableModalState = function () {
|
|
634
|
+
return this.rightKeyMenuManager.aggregationTableModalState;
|
|
635
|
+
};
|
|
636
|
+
InkLineageManager.prototype.updateRelationConditionState = function (data) {
|
|
637
|
+
var _a, _b;
|
|
638
|
+
(_b = (_a = this.rightKeyMenuManager) === null || _a === void 0 ? void 0 : _a.updateRelationConditionState) === null || _b === void 0 ? void 0 : _b.call(_a, data);
|
|
639
|
+
};
|
|
640
|
+
InkLineageManager.prototype.getRelationConditionState = function () {
|
|
641
|
+
return this.rightKeyMenuManager.relationConditionState;
|
|
642
|
+
};
|
|
387
643
|
// update direct & indirect table visible
|
|
388
644
|
InkLineageManager.prototype.updateEdgeDashVisible = function (edgeDashVisible) {
|
|
389
|
-
|
|
390
|
-
(_a = this.rightKeyMenuManager) === null || _a === void 0 ? void 0 : _a.updateEdgeDashVisible(edgeDashVisible);
|
|
645
|
+
this.rightKeyMenuManager.updateEdgeDashVisible(edgeDashVisible);
|
|
391
646
|
};
|
|
392
647
|
InkLineageManager.prototype.getHotspotModalState = function () {
|
|
393
|
-
|
|
394
|
-
return (_a = this.rightKeyMenuManager) === null || _a === void 0 ? void 0 : _a.hotspotModalState;
|
|
648
|
+
return this.rightKeyMenuManager.hotspotModalState;
|
|
395
649
|
};
|
|
396
650
|
InkLineageManager.prototype.getContextMenuState = function () {
|
|
397
|
-
|
|
398
|
-
return (_a = this.rightKeyMenuManager) === null || _a === void 0 ? void 0 : _a.contextMenuState;
|
|
651
|
+
return this.rightKeyMenuManager.contextMenuState;
|
|
399
652
|
};
|
|
400
653
|
InkLineageManager.prototype.getHotspotTipState = function () {
|
|
401
|
-
|
|
402
|
-
return (_a = this.rightKeyMenuManager) === null || _a === void 0 ? void 0 : _a.hotspotTipState;
|
|
654
|
+
return this.rightKeyMenuManager.hotspotTipState;
|
|
403
655
|
};
|
|
404
656
|
InkLineageManager.prototype.getOverviewState = function () {
|
|
405
|
-
|
|
406
|
-
|
|
657
|
+
return this.rightKeyMenuManager.overviewState;
|
|
658
|
+
};
|
|
659
|
+
InkLineageManager.prototype.setExploreState = function (data) {
|
|
660
|
+
this.rightKeyMenuManager.setExploreState(data);
|
|
661
|
+
};
|
|
662
|
+
InkLineageManager.prototype.getExploreState = function () {
|
|
663
|
+
return this.rightKeyMenuManager.exploreState;
|
|
407
664
|
};
|
|
408
665
|
InkLineageManager.prototype.getToolbarState = function () {
|
|
409
666
|
var _a;
|
|
410
|
-
return (_a = this.toolbarManager) === null || _a === void 0 ? void 0 : _a.state;
|
|
667
|
+
return (_a = this === null || this === void 0 ? void 0 : this.toolbarManager) === null || _a === void 0 ? void 0 : _a.state;
|
|
668
|
+
};
|
|
669
|
+
InkLineageManager.prototype.setOnlyShowRelatedData = function (onlyShowRelated, onlyShowRelatedDisable) {
|
|
670
|
+
this.rightKeyMenuManager.onlyShowRelatedDisable = onlyShowRelatedDisable;
|
|
671
|
+
this.rightKeyMenuManager.onlyShowRelated = onlyShowRelated;
|
|
672
|
+
this.emit(EEventEnum.ONLY_SHOW_RELATED_DATA_CHANGE);
|
|
673
|
+
};
|
|
674
|
+
InkLineageManager.prototype.getOnlyShowRelatedData = function () {
|
|
675
|
+
return {
|
|
676
|
+
onlyShowRelated: this.rightKeyMenuManager.onlyShowRelated,
|
|
677
|
+
onlyShowRelatedDisable: this.rightKeyMenuManager.onlyShowRelatedDisable,
|
|
678
|
+
};
|
|
679
|
+
};
|
|
680
|
+
// 任务
|
|
681
|
+
InkLineageManager.prototype.clearRelatedColumns = function () {
|
|
682
|
+
this.parsedData.nodes.forEach(function (n) { return (n.relatedColumns = []); });
|
|
683
|
+
};
|
|
684
|
+
// 任务
|
|
685
|
+
InkLineageManager.prototype.updateHighlightEdges = function (edges) {
|
|
686
|
+
var _this = this;
|
|
687
|
+
this.activeEdges.forEach(function (e) {
|
|
688
|
+
var _a;
|
|
689
|
+
var edge = (_a = _this.graph) === null || _a === void 0 ? void 0 : _a.edges.get(e.id);
|
|
690
|
+
if (!edge)
|
|
691
|
+
return;
|
|
692
|
+
edge.config.style.stroke = '#B1B1B1';
|
|
693
|
+
edge.config.style.lineWidth = 1;
|
|
694
|
+
edge.config.style.zIndex = -1;
|
|
695
|
+
});
|
|
696
|
+
// update new active edges
|
|
697
|
+
this.activeEdges = edges;
|
|
698
|
+
this.activeEdges.forEach(function (e) {
|
|
699
|
+
var _a;
|
|
700
|
+
var edge = (_a = _this.graph) === null || _a === void 0 ? void 0 : _a.edges.get(e.id);
|
|
701
|
+
if (!edge)
|
|
702
|
+
return;
|
|
703
|
+
edge.config.style.stroke = '#FFC04D';
|
|
704
|
+
edge.config.style.lineWidth = 1;
|
|
705
|
+
edge.config.style.zIndex = -1;
|
|
706
|
+
});
|
|
707
|
+
};
|
|
708
|
+
// 任务
|
|
709
|
+
InkLineageManager.prototype.highlightRelatedNodesByStatus = function () {
|
|
710
|
+
var _this = this;
|
|
711
|
+
this.relatedNodes.forEach(function (n) {
|
|
712
|
+
if (!n)
|
|
713
|
+
return;
|
|
714
|
+
if (_this.currentClickId.includes(n.id)) {
|
|
715
|
+
n.style.stroke = '#FFC04D';
|
|
716
|
+
n.style.fill = '#FFD180';
|
|
717
|
+
n.style.zIndex = 3;
|
|
718
|
+
}
|
|
719
|
+
else if (n.isActive) {
|
|
720
|
+
n.isActive = true;
|
|
721
|
+
n.style.stroke = '#3271C9';
|
|
722
|
+
n.style.fill = '#A9CFFB';
|
|
723
|
+
n.style.zIndex = 3;
|
|
724
|
+
}
|
|
725
|
+
else {
|
|
726
|
+
n.isRelated = true;
|
|
727
|
+
n.style.stroke = '#3271C9';
|
|
728
|
+
if (!n.isActive) {
|
|
729
|
+
n.style.fill = '#E4EFFF';
|
|
730
|
+
}
|
|
731
|
+
n.style.zIndex = 3;
|
|
732
|
+
}
|
|
733
|
+
});
|
|
734
|
+
};
|
|
735
|
+
// 任务
|
|
736
|
+
InkLineageManager.prototype.collapseAllNodes = function () {
|
|
737
|
+
this.parsedData.nodes.forEach(function (node) { return (node.isOpen = false); });
|
|
738
|
+
};
|
|
739
|
+
// 任务
|
|
740
|
+
InkLineageManager.prototype.determineNodeIsInView = function (node) {
|
|
741
|
+
var _a, _b;
|
|
742
|
+
if (!node)
|
|
743
|
+
return;
|
|
744
|
+
var target = node.bgRect;
|
|
745
|
+
var _c = target.getBBox(), height = _c.height, width = _c.width;
|
|
746
|
+
var _d = __read(target.getPosition(), 2), x = _d[0], y = _d[1];
|
|
747
|
+
// 画布的宽高
|
|
748
|
+
var wrapperWidth = this.graph.getWidth();
|
|
749
|
+
var wrapperHeight = this.graph.getHeight();
|
|
750
|
+
var camera = this.graph.canvas.getCamera();
|
|
751
|
+
if (this.rightKeyMenuManager.exploreState.mode === EGraphMode.EXPLORE) {
|
|
752
|
+
var sidebarWidth = 650;
|
|
753
|
+
wrapperWidth = wrapperWidth - sidebarWidth;
|
|
754
|
+
}
|
|
755
|
+
var _e = __read(mat4.getTranslation(vec3.create(), camera.getOrthoMatrix()), 2), rootX = _e[0], rootY = _e[1];
|
|
756
|
+
var zoom = this.graph.getZoom();
|
|
757
|
+
// const zoom = camera.getZoom();
|
|
758
|
+
var xCenter = (rootX + x + width / 2) * zoom;
|
|
759
|
+
var yCenter = (rootY + y + height / 2) * zoom;
|
|
760
|
+
var isVisible = xCenter > 0 &&
|
|
761
|
+
xCenter < wrapperWidth &&
|
|
762
|
+
yCenter > 0 &&
|
|
763
|
+
yCenter < wrapperHeight;
|
|
764
|
+
if (target.isCulled() || !isVisible) {
|
|
765
|
+
// this.searchNodeManager.moveTargetToCenter(target);
|
|
766
|
+
var canvasW = this.graph.getWidth();
|
|
767
|
+
var canvasH = this.graph.getHeight();
|
|
768
|
+
(_a = this.graph) === null || _a === void 0 ? void 0 : _a.resetPosition();
|
|
769
|
+
// this.graph.canvas.getCamera().resetPosition();
|
|
770
|
+
(_b = this.graph) === null || _b === void 0 ? void 0 : _b.translate(x - canvasW / 2 + TASK_TABLE_WIDTH + width / 2, y - canvasH / 2 + height / 2);
|
|
771
|
+
}
|
|
411
772
|
};
|
|
412
773
|
/**************************************** 合并链路 *******************************/
|
|
413
774
|
InkLineageManager.prototype.updateFoldStatus = function (checked) {
|
|
@@ -424,9 +785,49 @@ var InkLineageManager = /** @class */ (function () {
|
|
|
424
785
|
};
|
|
425
786
|
// update related & unrelated table visible
|
|
426
787
|
InkLineageManager.prototype.updateRelatedTableVisible = function (onlyShowRelated, needUpdate) {
|
|
427
|
-
var _a;
|
|
428
788
|
if (needUpdate === void 0) { needUpdate = true; }
|
|
429
|
-
|
|
789
|
+
this.rightKeyMenuManager.updateRelatedTableVisible(onlyShowRelated, needUpdate);
|
|
790
|
+
};
|
|
791
|
+
/**************************************** graph *******************************/
|
|
792
|
+
InkLineageManager.prototype.moveTargetToCenter = function (nodeId) {
|
|
793
|
+
this.graph.moveTargetToCenter(nodeId);
|
|
794
|
+
};
|
|
795
|
+
InkLineageManager.prototype.appendChild = function (child) {
|
|
796
|
+
this.graph.canvas.appendChild(child);
|
|
797
|
+
};
|
|
798
|
+
InkLineageManager.prototype.getMode = function () {
|
|
799
|
+
var _a;
|
|
800
|
+
return ((_a = this === null || this === void 0 ? void 0 : this.graph) === null || _a === void 0 ? void 0 : _a.mode) || 'NORMAL';
|
|
801
|
+
};
|
|
802
|
+
InkLineageManager.prototype.canvasResize = function (clientWidth, clientHeight) {
|
|
803
|
+
this.graph.canvas.resize(clientWidth, clientHeight);
|
|
804
|
+
};
|
|
805
|
+
InkLineageManager.prototype.getCanvas = function () {
|
|
806
|
+
return this.graph.canvas;
|
|
807
|
+
};
|
|
808
|
+
InkLineageManager.prototype.getNodeInstanceById = function (id) {
|
|
809
|
+
return this.graph.getNodeById(id);
|
|
810
|
+
};
|
|
811
|
+
InkLineageManager.prototype.getNodeOrColumnInstanceById = function (id) {
|
|
812
|
+
return this.graph.getAnchorNodeById(id);
|
|
813
|
+
};
|
|
814
|
+
InkLineageManager.prototype.getEdgeInstanceById = function (id) {
|
|
815
|
+
return this.graph.getEdgeById(id);
|
|
816
|
+
};
|
|
817
|
+
InkLineageManager.prototype.resetPosition = function () {
|
|
818
|
+
this.graph.resetPosition();
|
|
819
|
+
};
|
|
820
|
+
InkLineageManager.prototype.graphUpdate = function () {
|
|
821
|
+
this.graph.update();
|
|
822
|
+
};
|
|
823
|
+
InkLineageManager.prototype.graphRender = function () {
|
|
824
|
+
this.graph.render();
|
|
825
|
+
};
|
|
826
|
+
InkLineageManager.prototype.getGraph = function () {
|
|
827
|
+
return this.graph;
|
|
828
|
+
};
|
|
829
|
+
InkLineageManager.prototype.setGraphData = function (data) {
|
|
830
|
+
this.graph.setData(data);
|
|
430
831
|
};
|
|
431
832
|
return InkLineageManager;
|
|
432
833
|
}());
|