@gct-paas/core-web 0.1.6-dev.5 → 0.1.6-dev.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/dist/ColorPicker-DGQQb8I7.js +1 -0
- package/dist/{_plugin-vue_export-helper-59SbqtUR.js → _plugin-vue_export-helper-C9hXqKoS.js} +1 -1
- package/dist/{de_DE-BnwOalCV.js → de_DE-B3f8kAv-.js} +1 -1
- package/dist/diagram-config-item-C5Ha2XJq.js +1 -0
- package/dist/diagram-config-item-reverse-ChoxnW-Z.js +1 -0
- package/dist/diagram-config-item-virtual-Cbmggfwt.js +1 -0
- package/dist/{en_US-6Hw6WWah.js → en_US-BSG3Kz6v.js} +1 -1
- package/dist/{es_ES-tAqXFGrR.js → es_ES-BGP8IOmQ.js} +1 -1
- package/dist/{fr_FR-BkDgVS_P.js → fr_FR-Y-6CzjUq.js} +1 -1
- package/dist/hooks-yX21uJ6d.js +1 -0
- package/dist/index.min.css +1 -1
- package/dist/{ja_JP-AsmV92nC.js → ja_JP-CDlH1v8M.js} +1 -1
- package/dist/loader.esm.min.js +1 -1
- package/dist/{monaco-editor-CgESUPw_.js → monaco-editor-BTqXEIZI.js} +1 -1
- package/dist/{pt_PT-CCVWOJzE.js → pt_PT-N-iIoE2_.js} +1 -1
- package/dist/relationship-diagram-config-DstwwXCO.js +1 -0
- package/dist/{ru_RU-w4sUgbzL.js → ru_RU--ESLRHrj.js} +1 -1
- package/dist/template-1ZQd8Z1w.js +1 -0
- package/dist/{tr_TR-CGZch3eB.js → tr_TR-BOIykdZO.js} +1 -1
- package/dist/{vi_VN-DONxIDR7.js → vi_VN-CmVoM2Rw.js} +1 -1
- package/dist/{zh_CN-BxdD8hqG.js → zh_CN-DhsO5Qwx.js} +1 -1
- package/dist/{zh_TW-D5Y8j-oG.js → zh_TW-DWdp2kVo.js} +1 -1
- package/es/components/UserPick/src/user-pick.vue_vue_type_script_setup_true_lang.mjs +2 -2
- package/es/components/base-button/base-button.vue.mjs +1 -1
- package/es/components/field-cascader/src/hooks.d.ts +1 -0
- package/es/components/label-design/modal/template.vue_vue_type_script_setup_true_lang.mjs +2 -2
- package/es/components/label-design/panels/modals/diff-modal.vue_vue_type_script_setup_true_lang.mjs +2 -2
- package/es/components/label-design/panels/panel.vue_vue_type_script_setup_true_lang.mjs +1 -1
- package/es/components/label-design/panels/widget/controls/ImageData.vue.mjs +2 -2
- package/es/components/label-design/panels/widget/controls/ImageData.vue_vue_type_script_setup_true_name_image-data_lang.mjs +2 -2
- package/es/components/label-design/panels/widget/controls/ImageData.vue_vue_type_style_index_0_scoped_9232a443_lang.css +3 -0
- package/es/components/label-design/stage/stage.vue.d.ts +9 -0
- package/es/components/label-design/stage/stage.vue.mjs +2 -2
- package/es/components/label-design/stage/stage.vue_vue_type_script_setup_true_lang.mjs +2 -1
- package/es/components/label-design/stage/{stage.vue_vue_type_style_index_0_scoped_53b1f897_lang.css → stage.vue_vue_type_style_index_0_scoped_9275e9fb_lang.css} +8 -8
- package/es/components/layout/view-container/view-container.d.ts +1 -11
- package/es/components/layout/view-container/view-container.mjs +10 -14
- package/es/create-app-vue.mjs +4 -2
- package/es/index.d.ts +3 -2
- package/es/index.mjs +25 -24
- package/es/modules/color-picker/src/color-editor.vue.mjs +1 -1
- package/es/modules/gct-form/controller/form-item-basic/form-item-basic.controller.mjs +2 -0
- package/es/modules/gct-form/controller/gct-form/gct-form.controller.mjs +1 -0
- package/es/modules/gct-table/controller/gct-table/gct-table.controller.mjs +1 -0
- package/es/modules/gct-table/controller/table-item/table-item.controller.mjs +2 -0
- package/es/modules/gct-table/controller/table-row/table-row.controller.mjs +3 -0
- package/es/modules/global-modal/src/components/ModalWrapper.vue_vue_type_script_lang.mjs +1 -4
- package/es/modules/print-tmpl/print-tmpl-modal.vue_vue_type_script_setup_true_name_print-tmpl-modal_lang.mjs +2 -2
- package/es/modules/relationship-diagram-config/cache.controller.d.ts +70 -0
- package/es/modules/relationship-diagram-config/cache.controller.mjs +128 -0
- package/es/modules/relationship-diagram-config/components/diagram-config-item/diagram-config-item.css +123 -0
- package/es/modules/relationship-diagram-config/components/diagram-config-item/diagram-config-item.d.ts +381 -0
- package/es/modules/relationship-diagram-config/components/diagram-config-item/diagram-config-item.mjs +98 -0
- package/es/modules/relationship-diagram-config/components/diagram-config-item-container/diagram-config-item-container.css +71 -0
- package/es/modules/relationship-diagram-config/components/diagram-config-item-container/diagram-config-item-container.d.ts +28 -0
- package/es/modules/relationship-diagram-config/components/diagram-config-item-container/diagram-config-item-container.mjs +53 -0
- package/es/modules/relationship-diagram-config/components/diagram-config-item-info/diagram-config-item-info.d.ts +27 -0
- package/es/modules/relationship-diagram-config/components/diagram-config-item-info/diagram-config-item-info.mjs +2 -0
- package/es/modules/relationship-diagram-config/components/diagram-config-item-reverse/diagram-config-item-reverse.css +107 -0
- package/es/modules/relationship-diagram-config/components/diagram-config-item-reverse/diagram-config-item-reverse.d.ts +34 -0
- package/es/modules/relationship-diagram-config/components/diagram-config-item-reverse/diagram-config-item-reverse.mjs +198 -0
- package/es/modules/relationship-diagram-config/components/diagram-config-item-virtual/diagram-config-item-virtual.css +68 -0
- package/es/modules/relationship-diagram-config/components/diagram-config-item-virtual/diagram-config-item-virtual.d.ts +31 -0
- package/es/modules/relationship-diagram-config/components/diagram-config-item-virtual/diagram-config-item-virtual.mjs +53 -0
- package/es/modules/relationship-diagram-config/components/index.d.ts +5 -0
- package/es/modules/relationship-diagram-config/components/index.mjs +5 -0
- package/es/modules/relationship-diagram-config/constant/index.d.ts +72 -0
- package/es/modules/relationship-diagram-config/constant/index.mjs +70 -0
- package/es/modules/relationship-diagram-config/hooks/index.d.ts +10 -0
- package/es/modules/relationship-diagram-config/hooks/index.mjs +19 -0
- package/es/modules/relationship-diagram-config/index.d.ts +6 -0
- package/es/modules/relationship-diagram-config/index.mjs +28 -0
- package/es/modules/relationship-diagram-config/interface/i-link-provider/i-link-provider.d.ts +57 -0
- package/es/modules/relationship-diagram-config/interface/i-node-provider/i-node-provider.d.ts +18 -0
- package/es/modules/relationship-diagram-config/interface/i-relationship-diagram-link/i-relationship-diagram-link.d.ts +80 -0
- package/es/modules/relationship-diagram-config/interface/i-relationship-diagram-node/i-relationship-diagram-node.d.ts +82 -0
- package/es/modules/relationship-diagram-config/interface/i-relationship-diagram-options/i-relationship-diagram-options.d.ts +51 -0
- package/es/modules/relationship-diagram-config/interface/i-rule-config/i-rule-config.d.ts +135 -0
- package/es/modules/relationship-diagram-config/interface/index.d.ts +6 -0
- package/es/modules/relationship-diagram-config/link.controller.d.ts +75 -0
- package/es/modules/relationship-diagram-config/link.controller.mjs +121 -0
- package/es/modules/relationship-diagram-config/node.controller.d.ts +102 -0
- package/es/modules/relationship-diagram-config/node.controller.mjs +189 -0
- package/es/modules/relationship-diagram-config/plumb-plugin/arrow-endpoint.d.ts +23 -0
- package/es/modules/relationship-diagram-config/plumb-plugin/arrow-endpoint.mjs +33 -0
- package/es/modules/relationship-diagram-config/plumb-plugin/blank-endpoint-renderer.d.ts +1 -0
- package/es/modules/relationship-diagram-config/plumb-plugin/blank-endpoint-renderer.mjs +27 -0
- package/es/modules/relationship-diagram-config/plumb-plugin/index.d.ts +3 -0
- package/es/modules/relationship-diagram-config/plumb-plugin/index.mjs +2 -0
- package/es/modules/relationship-diagram-config/providers/default-link-provider/default-link-provider.css +132 -0
- package/es/modules/relationship-diagram-config/providers/default-link-provider/default-link-provider.d.ts +21 -0
- package/es/modules/relationship-diagram-config/providers/default-link-provider/default-link-provider.mjs +184 -0
- package/es/modules/relationship-diagram-config/providers/default-node-provider/default-node-provider.d.ts +14 -0
- package/es/modules/relationship-diagram-config/providers/default-node-provider/default-node-provider.mjs +17 -0
- package/es/modules/relationship-diagram-config/providers/index.d.ts +5 -0
- package/es/modules/relationship-diagram-config/providers/index.mjs +5 -0
- package/es/modules/relationship-diagram-config/providers/reverse-node-provider/reverse-node-provider.d.ts +14 -0
- package/es/modules/relationship-diagram-config/providers/reverse-node-provider/reverse-node-provider.mjs +17 -0
- package/es/modules/relationship-diagram-config/providers/virtual-link-provider/virtual-link-provider.d.ts +16 -0
- package/es/modules/relationship-diagram-config/providers/virtual-link-provider/virtual-link-provider.mjs +26 -0
- package/es/modules/relationship-diagram-config/providers/virtual-node-provider/virtual-node-provider.d.ts +14 -0
- package/es/modules/relationship-diagram-config/providers/virtual-node-provider/virtual-node-provider.mjs +17 -0
- package/es/modules/relationship-diagram-config/relationship-diagram-config.controller.d.ts +119 -0
- package/es/modules/relationship-diagram-config/relationship-diagram-config.controller.mjs +199 -0
- package/es/modules/relationship-diagram-config/relationship-diagram-config.css +113 -0
- package/es/modules/relationship-diagram-config/relationship-diagram-config.d.ts +102 -0
- package/es/modules/relationship-diagram-config/relationship-diagram-config.mjs +104 -0
- package/es/modules/relationship-diagram-config/relationship-diagram-config.state.d.ts +44 -0
- package/es/modules/relationship-diagram-config/relationship-diagram-config.state.mjs +46 -0
- package/es/modules/relationship-diagram-config/utils/index.d.ts +1 -0
- package/es/modules/relationship-diagram-config/utils/register/register.d.ts +71 -0
- package/es/modules/relationship-diagram-config/utils/register/register.mjs +81 -0
- package/es/utils/recursive.mjs +1 -0
- package/package.json +10 -9
- package/dist/components-Dw_doMp_.js +0 -1
- package/dist/template-tzWsbHZE.js +0 -1
- package/es/components/label-design/panels/widget/controls/ImageData.vue_vue_type_style_index_0_scoped_3c4a9733_lang.css +0 -3
- /package/dist/{JsBarcode-DlXSdlvD.js → JsBarcode-DY53cVJ6.js} +0 -0
- /package/dist/{cropper-tw7tUDDe.js → cropper-DK_hFgpO.js} +0 -0
- /package/dist/{icon-next-picker-B_S_yInJ.js → icon-next-picker-DYiHqnNR.js} +0 -0
- /package/dist/{objectSpread2-DxfE1S3_.js → objectSpread2-DARadIQB.js} +0 -0
- /package/dist/{overlayscrollbars-vue-DtKFrHnA.js → overlayscrollbars-vue-Df-3wShc.js} +0 -0
- /package/dist/{rich-editor-K2Pv0Uja.js → rich-editor-DVOriJH0.js} +0 -0
- /package/dist/{useMonacoEditor-BO2ALW-7.js → useMonacoEditor-DqSQTg7b.js} +0 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
//#region src/modules/relationship-diagram-config/constant/index.ts
|
|
2
|
+
/**
|
|
3
|
+
* 连线方向
|
|
4
|
+
*
|
|
5
|
+
* @author zhanghanrui
|
|
6
|
+
* @date 2024-06-30 13:06:37
|
|
7
|
+
* @export
|
|
8
|
+
*/
|
|
9
|
+
var ConnectionDirection = {
|
|
10
|
+
/**
|
|
11
|
+
* 正向
|
|
12
|
+
*/
|
|
13
|
+
FORWARD: "forward",
|
|
14
|
+
/**
|
|
15
|
+
* 反向
|
|
16
|
+
*/
|
|
17
|
+
REVERSE: "reverse"
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* 控制器标识
|
|
21
|
+
*
|
|
22
|
+
* @author zhanghanrui
|
|
23
|
+
* @date 2024-06-25 09:06:57
|
|
24
|
+
* @export
|
|
25
|
+
*/
|
|
26
|
+
var ControllerTag = {
|
|
27
|
+
/**
|
|
28
|
+
* 根节点控制器标识
|
|
29
|
+
*/
|
|
30
|
+
ROOT: "root-controller" };
|
|
31
|
+
/**
|
|
32
|
+
* 连线类型
|
|
33
|
+
*
|
|
34
|
+
* @author zhanghanrui
|
|
35
|
+
* @date 2024-06-25 19:06:26
|
|
36
|
+
* @export
|
|
37
|
+
*/
|
|
38
|
+
var LinkType = {
|
|
39
|
+
/**
|
|
40
|
+
* 默认连线
|
|
41
|
+
*/
|
|
42
|
+
DEFAULT: "default",
|
|
43
|
+
/**
|
|
44
|
+
* 虚拟连线
|
|
45
|
+
*/
|
|
46
|
+
VIRTUAL: "virtual"
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* 节点类型
|
|
50
|
+
*
|
|
51
|
+
* @author zhanghanrui
|
|
52
|
+
* @date 2024-06-25 20:06:44
|
|
53
|
+
* @export
|
|
54
|
+
*/
|
|
55
|
+
var NodeType = {
|
|
56
|
+
/**
|
|
57
|
+
* 默认节点
|
|
58
|
+
*/
|
|
59
|
+
DEFAULT: "default",
|
|
60
|
+
/**
|
|
61
|
+
* 虚拟节点
|
|
62
|
+
*/
|
|
63
|
+
VIRTUAL: "virtual",
|
|
64
|
+
/**
|
|
65
|
+
* 反转节点
|
|
66
|
+
*/
|
|
67
|
+
REVERSE: "reverse"
|
|
68
|
+
};
|
|
69
|
+
//#endregion
|
|
70
|
+
export { ConnectionDirection, ControllerTag, LinkType, NodeType };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { RelationshipDiagramConfigController } from '../relationship-diagram-config.controller';
|
|
2
|
+
/**
|
|
3
|
+
* 获取根控制器实例
|
|
4
|
+
*
|
|
5
|
+
* @author zhanghanrui
|
|
6
|
+
* @date 2024-06-25 09:06:08
|
|
7
|
+
* @export
|
|
8
|
+
* @return {*} {RelationshipDiagramConfigController}
|
|
9
|
+
*/
|
|
10
|
+
export declare function useRootController(): RelationshipDiagramConfigController;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ControllerTag } from "../constant/index.mjs";
|
|
2
|
+
import "../relationship-diagram-config.controller.mjs";
|
|
3
|
+
import { inject } from "vue";
|
|
4
|
+
//#region src/modules/relationship-diagram-config/hooks/index.ts
|
|
5
|
+
/**
|
|
6
|
+
* 获取根控制器实例
|
|
7
|
+
*
|
|
8
|
+
* @author zhanghanrui
|
|
9
|
+
* @date 2024-06-25 09:06:08
|
|
10
|
+
* @export
|
|
11
|
+
* @return {*} {RelationshipDiagramConfigController}
|
|
12
|
+
*/
|
|
13
|
+
function useRootController() {
|
|
14
|
+
const rootController = inject(ControllerTag.ROOT);
|
|
15
|
+
if (!rootController) throw new Error("root controller not found");
|
|
16
|
+
return rootController;
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
export { useRootController };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { LinkType, NodeType } from "./constant/index.mjs";
|
|
2
|
+
import { RegisterUtil } from "./utils/register/register.mjs";
|
|
3
|
+
import { DefaultLinkProvider } from "./providers/default-link-provider/default-link-provider.mjs";
|
|
4
|
+
import { DefaultNodeProvider } from "./providers/default-node-provider/default-node-provider.mjs";
|
|
5
|
+
import { ReverseNodeProvider } from "./providers/reverse-node-provider/reverse-node-provider.mjs";
|
|
6
|
+
import { VirtualLinkProvider } from "./providers/virtual-link-provider/virtual-link-provider.mjs";
|
|
7
|
+
import { VirtualNodeProvider } from "./providers/virtual-node-provider/virtual-node-provider.mjs";
|
|
8
|
+
import "./providers/index.mjs";
|
|
9
|
+
import { DiagramConfigItem } from "./components/diagram-config-item/diagram-config-item.mjs";
|
|
10
|
+
import { DiagramConfigItemReverse } from "./components/diagram-config-item-reverse/diagram-config-item-reverse.mjs";
|
|
11
|
+
import { DiagramConfigItemVirtual } from "./components/diagram-config-item-virtual/diagram-config-item-virtual.mjs";
|
|
12
|
+
import "./components/index.mjs";
|
|
13
|
+
import { RelationshipDiagramConfig } from "./relationship-diagram-config.mjs";
|
|
14
|
+
import { defineAsyncComponent } from "vue";
|
|
15
|
+
//#region src/modules/relationship-diagram-config/index.ts
|
|
16
|
+
var relationship_diagram_config_default = { install(app) {
|
|
17
|
+
RegisterUtil.registerLink(LinkType.DEFAULT, new DefaultLinkProvider());
|
|
18
|
+
RegisterUtil.registerLink(LinkType.VIRTUAL, new VirtualLinkProvider());
|
|
19
|
+
RegisterUtil.registerNode(NodeType.DEFAULT, new DefaultNodeProvider());
|
|
20
|
+
RegisterUtil.registerNode(NodeType.VIRTUAL, new VirtualNodeProvider());
|
|
21
|
+
RegisterUtil.registerNode(NodeType.REVERSE, new ReverseNodeProvider());
|
|
22
|
+
app.component(RelationshipDiagramConfig.name, defineAsyncComponent(() => import("./relationship-diagram-config.mjs")));
|
|
23
|
+
app.component(DiagramConfigItem.name, defineAsyncComponent(() => import("./components/diagram-config-item/diagram-config-item.mjs")));
|
|
24
|
+
app.component(DiagramConfigItemVirtual.name, defineAsyncComponent(() => import("./components/diagram-config-item-virtual/diagram-config-item-virtual.mjs")));
|
|
25
|
+
app.component(DiagramConfigItemReverse.name, defineAsyncComponent(() => import("./components/diagram-config-item-reverse/diagram-config-item-reverse.mjs")));
|
|
26
|
+
} };
|
|
27
|
+
//#endregion
|
|
28
|
+
export { relationship_diagram_config_default as default };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { ConnectParams } from '@jsplumb/browser-ui';
|
|
2
|
+
import { IRelationshipDiagramLink } from '../i-relationship-diagram-link/i-relationship-diagram-link';
|
|
3
|
+
import { RelationshipDiagramConfigController } from '../../relationship-diagram-config.controller';
|
|
4
|
+
/**
|
|
5
|
+
* 连线适配器
|
|
6
|
+
*
|
|
7
|
+
* @author zhanghanrui
|
|
8
|
+
* @date 2024-06-25 19:06:57
|
|
9
|
+
* @export
|
|
10
|
+
* @interface ILinkProvider
|
|
11
|
+
*/
|
|
12
|
+
export interface ILinkProvider {
|
|
13
|
+
/**
|
|
14
|
+
* 连线类型
|
|
15
|
+
*
|
|
16
|
+
* @author zhanghanrui
|
|
17
|
+
* @date 2024-06-25 20:06:56
|
|
18
|
+
* @type {string}
|
|
19
|
+
*/
|
|
20
|
+
type: string;
|
|
21
|
+
/**
|
|
22
|
+
* 连线起始元素,填写 class name
|
|
23
|
+
*
|
|
24
|
+
* @author zhanghanrui
|
|
25
|
+
* @date 2024-06-25 19:06:54
|
|
26
|
+
* @type {string}
|
|
27
|
+
*/
|
|
28
|
+
sourceHandle?: string;
|
|
29
|
+
/**
|
|
30
|
+
* 连线结束元素,填写 class name
|
|
31
|
+
*
|
|
32
|
+
* @author zhanghanrui
|
|
33
|
+
* @date 2024-06-25 19:06:15
|
|
34
|
+
* @type {string}
|
|
35
|
+
*/
|
|
36
|
+
targetHandle?: string;
|
|
37
|
+
/**
|
|
38
|
+
* 计算连线配置
|
|
39
|
+
*
|
|
40
|
+
* @author zhanghanrui
|
|
41
|
+
* @date 2024-06-26 10:06:44
|
|
42
|
+
* @param {RelationshipDiagramConfigController} c
|
|
43
|
+
* @param {number} i
|
|
44
|
+
* @param {IRelationshipDiagramLink} link
|
|
45
|
+
* @return {*} {ConnectParams<Element>}
|
|
46
|
+
*/
|
|
47
|
+
options(c: RelationshipDiagramConfigController, link: IRelationshipDiagramLink): ConnectParams<Element>;
|
|
48
|
+
/**
|
|
49
|
+
* 连线点击事件
|
|
50
|
+
*
|
|
51
|
+
* @author zhanghanrui
|
|
52
|
+
* @date 2024-08-08 17:08:02
|
|
53
|
+
* @param {RelationshipDiagramConfigController} c
|
|
54
|
+
* @param {IRelationshipDiagramLink} link
|
|
55
|
+
*/
|
|
56
|
+
click?(c: RelationshipDiagramConfigController, link: IRelationshipDiagramLink): void;
|
|
57
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface INodeProvider {
|
|
2
|
+
/**
|
|
3
|
+
* 类型
|
|
4
|
+
*
|
|
5
|
+
* @author zhanghanrui
|
|
6
|
+
* @date 2024-06-25 20:06:31
|
|
7
|
+
* @type {string}
|
|
8
|
+
*/
|
|
9
|
+
type: string;
|
|
10
|
+
/**
|
|
11
|
+
* 节点绘制组件
|
|
12
|
+
*
|
|
13
|
+
* @author zhanghanrui
|
|
14
|
+
* @date 2024-06-25 20:06:11
|
|
15
|
+
* @type {string}
|
|
16
|
+
*/
|
|
17
|
+
component: string;
|
|
18
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 连线
|
|
3
|
+
*
|
|
4
|
+
* @author zhanghanrui
|
|
5
|
+
* @date 2024-06-25 10:06:46
|
|
6
|
+
* @export
|
|
7
|
+
* @interface IRelationshipDiagramLink
|
|
8
|
+
*/
|
|
9
|
+
export interface IRelationshipDiagramLink {
|
|
10
|
+
/**
|
|
11
|
+
* 连线唯一标识
|
|
12
|
+
*
|
|
13
|
+
* @author zhanghanrui
|
|
14
|
+
* @date 2024-06-25 13:06:08
|
|
15
|
+
* @type {string}
|
|
16
|
+
*/
|
|
17
|
+
id: string;
|
|
18
|
+
/**
|
|
19
|
+
* 第几条连线
|
|
20
|
+
*
|
|
21
|
+
* @author zhanghanrui
|
|
22
|
+
* @date 2024-06-27 13:06:00
|
|
23
|
+
* @type {number}
|
|
24
|
+
*/
|
|
25
|
+
i: number;
|
|
26
|
+
/**
|
|
27
|
+
* 连线类型
|
|
28
|
+
*
|
|
29
|
+
* @author zhanghanrui
|
|
30
|
+
* @date 2024-06-25 13:06:52
|
|
31
|
+
* @type {string}
|
|
32
|
+
*/
|
|
33
|
+
type: string;
|
|
34
|
+
/**
|
|
35
|
+
* 起始节点标识
|
|
36
|
+
*
|
|
37
|
+
* @author zhanghanrui
|
|
38
|
+
* @date 2024-06-25 14:06:31
|
|
39
|
+
* @type {string}
|
|
40
|
+
*/
|
|
41
|
+
source: string;
|
|
42
|
+
/**
|
|
43
|
+
* 目标节点标识
|
|
44
|
+
*
|
|
45
|
+
* @author zhanghanrui
|
|
46
|
+
* @date 2024-06-25 14:06:38
|
|
47
|
+
* @type {string}
|
|
48
|
+
*/
|
|
49
|
+
target: string;
|
|
50
|
+
/**
|
|
51
|
+
* 是否为反向连线
|
|
52
|
+
*
|
|
53
|
+
* @author zhanghanrui
|
|
54
|
+
* @date 2024-06-25 16:06:07
|
|
55
|
+
* @type {boolean}
|
|
56
|
+
*/
|
|
57
|
+
reverse?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* 是否为换行连线
|
|
60
|
+
*
|
|
61
|
+
* @author zhanghanrui
|
|
62
|
+
* @date 2024-06-25 16:06:07
|
|
63
|
+
* @type {boolean}
|
|
64
|
+
*/
|
|
65
|
+
return?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* 是否为虚线
|
|
68
|
+
*
|
|
69
|
+
* @type {boolean}
|
|
70
|
+
*/
|
|
71
|
+
dashed?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* 从第几行开始画线
|
|
74
|
+
*
|
|
75
|
+
* @author zhanghanrui
|
|
76
|
+
* @date 2024-06-25 16:06:04
|
|
77
|
+
* @type {number}
|
|
78
|
+
*/
|
|
79
|
+
startLine: number;
|
|
80
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 节点
|
|
3
|
+
*
|
|
4
|
+
* @author zhanghanrui
|
|
5
|
+
* @date 2024-06-25 10:06:53
|
|
6
|
+
* @export
|
|
7
|
+
* @interface IRelationshipDiagramNode
|
|
8
|
+
*/
|
|
9
|
+
export interface IRelationshipDiagramNode {
|
|
10
|
+
/**
|
|
11
|
+
* 节点唯一标识
|
|
12
|
+
*
|
|
13
|
+
* @author zhanghanrui
|
|
14
|
+
* @date 2024-06-25 13:06:35
|
|
15
|
+
* @type {string}
|
|
16
|
+
*/
|
|
17
|
+
id: string;
|
|
18
|
+
/**
|
|
19
|
+
* 字段唯一标识
|
|
20
|
+
*
|
|
21
|
+
* @author zhanghanrui
|
|
22
|
+
* @date 2024-07-05 10:07:11
|
|
23
|
+
* @type {string | null}
|
|
24
|
+
*/
|
|
25
|
+
id_: string | null;
|
|
26
|
+
/**
|
|
27
|
+
* 节点类型
|
|
28
|
+
*
|
|
29
|
+
* @author zhanghanrui
|
|
30
|
+
* @date 2024-06-25 13:06:44
|
|
31
|
+
* @type {string}
|
|
32
|
+
*/
|
|
33
|
+
type: string;
|
|
34
|
+
/**
|
|
35
|
+
* 当前模型标识
|
|
36
|
+
*
|
|
37
|
+
* @author zhanghanrui
|
|
38
|
+
* @date 2024-06-26 16:06:15
|
|
39
|
+
* @type {string | null}
|
|
40
|
+
*/
|
|
41
|
+
modelKey: string | null;
|
|
42
|
+
/**
|
|
43
|
+
* 模型类型
|
|
44
|
+
*
|
|
45
|
+
* @author zhanghanrui
|
|
46
|
+
* @date 2024-06-26 16:06:30
|
|
47
|
+
* @type {string | null}
|
|
48
|
+
*/
|
|
49
|
+
modelCategory: string | null;
|
|
50
|
+
/**
|
|
51
|
+
* 属性key
|
|
52
|
+
*
|
|
53
|
+
* @author zhanghanrui
|
|
54
|
+
* @date 2024-06-26 16:06:46
|
|
55
|
+
* @type {string | null}
|
|
56
|
+
*/
|
|
57
|
+
value: string | null;
|
|
58
|
+
/**
|
|
59
|
+
* 属性文本
|
|
60
|
+
*
|
|
61
|
+
* @author zhanghanrui
|
|
62
|
+
* @date 2024-06-26 16:06:56
|
|
63
|
+
* @type {string | null}
|
|
64
|
+
*/
|
|
65
|
+
label: string | null;
|
|
66
|
+
/**
|
|
67
|
+
* 是否为反向节点
|
|
68
|
+
*
|
|
69
|
+
* @author zhanghanrui
|
|
70
|
+
* @date 2024-06-28 15:06:46
|
|
71
|
+
* @type {boolean}
|
|
72
|
+
*/
|
|
73
|
+
reverse?: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* 禁止选择属性
|
|
76
|
+
*
|
|
77
|
+
* @author zhanghanrui
|
|
78
|
+
* @date 2024-06-28 13:06:52
|
|
79
|
+
* @type {boolean}
|
|
80
|
+
*/
|
|
81
|
+
noSelectField?: boolean;
|
|
82
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 组件参数配置
|
|
3
|
+
*
|
|
4
|
+
* @author zhanghanrui
|
|
5
|
+
* @date 2024-06-28 14:06:53
|
|
6
|
+
* @export
|
|
7
|
+
* @interface IRelationshipDiagramOptions
|
|
8
|
+
*/
|
|
9
|
+
export interface IRelationshipDiagramOptions {
|
|
10
|
+
/**
|
|
11
|
+
* 一行显示多少个节点,默认一行显示三个
|
|
12
|
+
*
|
|
13
|
+
* @default 3
|
|
14
|
+
* @author zhanghanrui
|
|
15
|
+
* @date 2024-06-28 14:06:00
|
|
16
|
+
* @type {number}
|
|
17
|
+
*/
|
|
18
|
+
lineCount: number;
|
|
19
|
+
/**
|
|
20
|
+
* 从第几个节点开始可以反转,默认不限制
|
|
21
|
+
*
|
|
22
|
+
* @author zhanghanrui
|
|
23
|
+
* @date 2024-06-28 15:06:06
|
|
24
|
+
* @type {number}
|
|
25
|
+
*/
|
|
26
|
+
reverseCount?: number;
|
|
27
|
+
/**
|
|
28
|
+
* 最多可以建立多少个节点,默认不限制
|
|
29
|
+
*
|
|
30
|
+
* @author zhanghanrui
|
|
31
|
+
* @date 2024-06-28 15:06:13
|
|
32
|
+
* @type {number}
|
|
33
|
+
*/
|
|
34
|
+
max?: number;
|
|
35
|
+
/**
|
|
36
|
+
* 是否为单方向绘制,默认不限制
|
|
37
|
+
*
|
|
38
|
+
* @author zhanghanrui
|
|
39
|
+
* @date 2024-06-28 15:06:10
|
|
40
|
+
* @type {boolean}
|
|
41
|
+
*/
|
|
42
|
+
oneDirection?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* 可以有几个反转节点,默认不限制
|
|
45
|
+
*
|
|
46
|
+
* @author zhanghanrui
|
|
47
|
+
* @date 2024-06-28 15:06:02
|
|
48
|
+
* @type {number}
|
|
49
|
+
*/
|
|
50
|
+
reverseMax?: number;
|
|
51
|
+
}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { IRelationshipDiagramNode } from '../i-relationship-diagram-node/i-relationship-diagram-node';
|
|
2
|
+
/**
|
|
3
|
+
* 设计 json
|
|
4
|
+
*
|
|
5
|
+
* @author zhanghanrui
|
|
6
|
+
* @date 2024-06-29 17:06:51
|
|
7
|
+
* @export
|
|
8
|
+
* @interface IDesignJson
|
|
9
|
+
*/
|
|
10
|
+
export interface IDesignJson {
|
|
11
|
+
/**
|
|
12
|
+
* 前置信息
|
|
13
|
+
*
|
|
14
|
+
* @author zhanghanrui
|
|
15
|
+
* @date 2024-06-29 17:06:58
|
|
16
|
+
* @type {IData}
|
|
17
|
+
*/
|
|
18
|
+
before?: IData;
|
|
19
|
+
/**
|
|
20
|
+
* 节点信息
|
|
21
|
+
*
|
|
22
|
+
* @author zhanghanrui
|
|
23
|
+
* @date 2024-06-29 17:06:10
|
|
24
|
+
* @type {IRelationshipDiagramNode[]}
|
|
25
|
+
*/
|
|
26
|
+
nodes: IRelationshipDiagramNode[];
|
|
27
|
+
/**
|
|
28
|
+
* 后置信息
|
|
29
|
+
*
|
|
30
|
+
* @author zhanghanrui
|
|
31
|
+
* @date 2024-06-29 17:06:08
|
|
32
|
+
* @type {IData}
|
|
33
|
+
*/
|
|
34
|
+
after?: IData;
|
|
35
|
+
}
|
|
36
|
+
export interface INodeData {
|
|
37
|
+
/**
|
|
38
|
+
* 模型标识
|
|
39
|
+
*
|
|
40
|
+
* @author zhanghanrui
|
|
41
|
+
* @date 2024-06-29 17:06:38
|
|
42
|
+
* @type {string}
|
|
43
|
+
*/
|
|
44
|
+
modelKey: string;
|
|
45
|
+
/**
|
|
46
|
+
* 模型类型
|
|
47
|
+
*
|
|
48
|
+
* @author zhanghanrui
|
|
49
|
+
* @date 2024-06-29 17:06:06
|
|
50
|
+
* @type {string}
|
|
51
|
+
*/
|
|
52
|
+
modelCategory: string;
|
|
53
|
+
/**
|
|
54
|
+
* 属性标识
|
|
55
|
+
*
|
|
56
|
+
* @author zhanghanrui
|
|
57
|
+
* @date 2024-06-29 17:06:42
|
|
58
|
+
* @type {string}
|
|
59
|
+
*/
|
|
60
|
+
fieldKey: string;
|
|
61
|
+
/**
|
|
62
|
+
* 节点方向
|
|
63
|
+
*
|
|
64
|
+
* @author zhanghanrui
|
|
65
|
+
* @date 2024-06-29 17:06:47
|
|
66
|
+
* @type {('forward' | 'backward' | '')}
|
|
67
|
+
*/
|
|
68
|
+
direction: 'forward' | 'backward' | '';
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* 数据联动 ruleConfig 配置清单
|
|
72
|
+
*
|
|
73
|
+
* @author zhanghanrui
|
|
74
|
+
* @date 2024-06-29 17:06:29
|
|
75
|
+
* @export
|
|
76
|
+
* @interface IRuleConfig
|
|
77
|
+
*/
|
|
78
|
+
export interface IRuleConfig {
|
|
79
|
+
/**
|
|
80
|
+
* 设计 json 配置
|
|
81
|
+
*
|
|
82
|
+
* @author zhanghanrui
|
|
83
|
+
* @date 2024-06-29 17:06:31
|
|
84
|
+
* @type {IDesignJson}
|
|
85
|
+
*/
|
|
86
|
+
designJson: IDesignJson;
|
|
87
|
+
/**
|
|
88
|
+
* 是否强依赖
|
|
89
|
+
*
|
|
90
|
+
* @author zhanghanrui
|
|
91
|
+
* @date 2024-09-02 15:09:15
|
|
92
|
+
* @type {boolean}
|
|
93
|
+
*/
|
|
94
|
+
strongDependence: boolean;
|
|
95
|
+
/**
|
|
96
|
+
* 主查字段名称
|
|
97
|
+
*
|
|
98
|
+
* @author zhanghanrui
|
|
99
|
+
* @date 2024-06-29 19:06:48
|
|
100
|
+
* @type {string}
|
|
101
|
+
*/
|
|
102
|
+
modelKey: string;
|
|
103
|
+
/**
|
|
104
|
+
* 属性标识(不是所有场景都有)
|
|
105
|
+
*
|
|
106
|
+
* @author zhanghanrui
|
|
107
|
+
* @date 2024-07-05 11:07:25
|
|
108
|
+
* @type {string}
|
|
109
|
+
*/
|
|
110
|
+
fieldId?: string;
|
|
111
|
+
/**
|
|
112
|
+
* 属性标识(不是所有场景都有)
|
|
113
|
+
*
|
|
114
|
+
* @author zhanghanrui
|
|
115
|
+
* @date 2024-06-29 17:06:47
|
|
116
|
+
* @type {string}
|
|
117
|
+
*/
|
|
118
|
+
fieldKey?: string;
|
|
119
|
+
/**
|
|
120
|
+
* 属性名称
|
|
121
|
+
*
|
|
122
|
+
* @author zhanghanrui
|
|
123
|
+
* @date 2024-06-29 19:06:24
|
|
124
|
+
* @type {string}
|
|
125
|
+
*/
|
|
126
|
+
fieldLabel?: string;
|
|
127
|
+
/**
|
|
128
|
+
* 给后台使用的 nodes 清单
|
|
129
|
+
*
|
|
130
|
+
* @author zhanghanrui
|
|
131
|
+
* @date 2024-06-29 17:06:41
|
|
132
|
+
* @type {INodeData[]}
|
|
133
|
+
*/
|
|
134
|
+
nodes: INodeData[];
|
|
135
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export type { ILinkProvider } from './i-link-provider/i-link-provider';
|
|
2
|
+
export type { INodeProvider } from './i-node-provider/i-node-provider';
|
|
3
|
+
export type { IRelationshipDiagramLink } from './i-relationship-diagram-link/i-relationship-diagram-link';
|
|
4
|
+
export type { IRelationshipDiagramNode } from './i-relationship-diagram-node/i-relationship-diagram-node';
|
|
5
|
+
export type { IRelationshipDiagramOptions } from './i-relationship-diagram-options/i-relationship-diagram-options';
|
|
6
|
+
export type { IRuleConfig } from './i-rule-config/i-rule-config';
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { IRelationshipDiagramLink } from './interface';
|
|
2
|
+
import { RelationshipDiagramConfigController } from './relationship-diagram-config.controller';
|
|
3
|
+
/**
|
|
4
|
+
* 连线控制器
|
|
5
|
+
*
|
|
6
|
+
* @author zhanghanrui
|
|
7
|
+
* @date 2024-06-25 14:06:19
|
|
8
|
+
* @export
|
|
9
|
+
* @class LinkController
|
|
10
|
+
*/
|
|
11
|
+
export declare class LinkController {
|
|
12
|
+
protected readonly c: RelationshipDiagramConfigController;
|
|
13
|
+
constructor(c: RelationshipDiagramConfigController);
|
|
14
|
+
/**
|
|
15
|
+
* 创建连线
|
|
16
|
+
*
|
|
17
|
+
* @author zhanghanrui
|
|
18
|
+
* @date 2024-06-26 16:06:24
|
|
19
|
+
* @param {IData} data
|
|
20
|
+
* @return {*} {IRelationshipDiagramLink}
|
|
21
|
+
*/
|
|
22
|
+
create(data: IData): IRelationshipDiagramLink;
|
|
23
|
+
/**
|
|
24
|
+
* 更新连线数据
|
|
25
|
+
*
|
|
26
|
+
* @author zhanghanrui
|
|
27
|
+
* @date 2024-06-25 14:06:51
|
|
28
|
+
* @param {IRelationshipDiagramLink} link
|
|
29
|
+
*/
|
|
30
|
+
update(link: IRelationshipDiagramLink): void;
|
|
31
|
+
/**
|
|
32
|
+
* 获取连线数据
|
|
33
|
+
*
|
|
34
|
+
* @author zhanghanrui
|
|
35
|
+
* @date 2024-06-25 14:06:43
|
|
36
|
+
* @param {string} id
|
|
37
|
+
* @return {*} {(IRelationshipDiagramLink | null)}
|
|
38
|
+
*/
|
|
39
|
+
get(id: string): IRelationshipDiagramLink | null;
|
|
40
|
+
/**
|
|
41
|
+
* 根据起始节点查找连线
|
|
42
|
+
*
|
|
43
|
+
* @author zhanghanrui
|
|
44
|
+
* @date 2024-06-25 14:06:19
|
|
45
|
+
* @param {string} source
|
|
46
|
+
* @return {*} {(IRelationshipDiagramLink | null)}
|
|
47
|
+
*/
|
|
48
|
+
getBySource(source: string): IRelationshipDiagramLink | null;
|
|
49
|
+
/**
|
|
50
|
+
* 根据结束节点查找连线
|
|
51
|
+
*
|
|
52
|
+
* @author zhanghanrui
|
|
53
|
+
* @date 2024-06-25 14:06:50
|
|
54
|
+
* @param {string} target
|
|
55
|
+
* @return {*} {(IRelationshipDiagramLink | null)}
|
|
56
|
+
*/
|
|
57
|
+
getByTarget(target: string): IRelationshipDiagramLink | null;
|
|
58
|
+
/**
|
|
59
|
+
* 删除连线数据,删除当前指定连线后所有数据
|
|
60
|
+
*
|
|
61
|
+
* @author zhanghanrui
|
|
62
|
+
* @date 2024-06-25 14:06:48
|
|
63
|
+
* @param {string} id
|
|
64
|
+
*/
|
|
65
|
+
delete(id: string): void;
|
|
66
|
+
/**
|
|
67
|
+
* 清除已经绘制的连线
|
|
68
|
+
*
|
|
69
|
+
* @author zhanghanrui
|
|
70
|
+
* @date 2024-06-27 13:06:08
|
|
71
|
+
* @protected
|
|
72
|
+
* @param {IRelationshipDiagramLink[]} links
|
|
73
|
+
*/
|
|
74
|
+
protected clearLinks(links: IRelationshipDiagramLink[]): void;
|
|
75
|
+
}
|