@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,113 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
/* stylelint-disable scss/no-global-function-names */
|
|
3
|
+
/* bem('block', 'element', 'modifier') => 'ibiz-block__element--modifier' */
|
|
4
|
+
/**
|
|
5
|
+
* 定义 Block 块
|
|
6
|
+
* @param {String} $block - Block 块名称
|
|
7
|
+
* @example
|
|
8
|
+
* @include b('button') {
|
|
9
|
+
* padding: 10px;
|
|
10
|
+
* }
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* 定义 Element 元素
|
|
14
|
+
* @param {String|List} $element - Element 元素名称,支持单个或多个
|
|
15
|
+
* @example
|
|
16
|
+
* @include b('button') {
|
|
17
|
+
* @include e('text') {
|
|
18
|
+
* color: #000;
|
|
19
|
+
* }
|
|
20
|
+
* }
|
|
21
|
+
* // 或传入多个元素
|
|
22
|
+
* @include b('button') {
|
|
23
|
+
* @include e(('text', 'icon')) {
|
|
24
|
+
* margin: 5px;
|
|
25
|
+
* }
|
|
26
|
+
* }
|
|
27
|
+
*/
|
|
28
|
+
/**
|
|
29
|
+
* 定义 Modifier 修饰符
|
|
30
|
+
* @param {String|List} $modifier - Modifier 修饰符名称,支持单个或多个
|
|
31
|
+
* @example
|
|
32
|
+
* @include b('button') {
|
|
33
|
+
* @include m('primary') {
|
|
34
|
+
* background: blue;
|
|
35
|
+
* }
|
|
36
|
+
* }
|
|
37
|
+
* // 或传入多个修饰符
|
|
38
|
+
* @include b('button') {
|
|
39
|
+
* @include m(('primary', 'large')) {
|
|
40
|
+
* background: blue;
|
|
41
|
+
* font-size: 16px;
|
|
42
|
+
* }
|
|
43
|
+
* }
|
|
44
|
+
*/
|
|
45
|
+
/**
|
|
46
|
+
* 定义状态选择器
|
|
47
|
+
* @param {String} $state - 状态名称
|
|
48
|
+
* @example
|
|
49
|
+
* @include b('button') {
|
|
50
|
+
* @include when('disabled') {
|
|
51
|
+
* opacity: 0.5;
|
|
52
|
+
* }
|
|
53
|
+
* }
|
|
54
|
+
*/
|
|
55
|
+
/**
|
|
56
|
+
* 深色主题样式
|
|
57
|
+
* @param {String} $block - Block 块名称
|
|
58
|
+
* @example
|
|
59
|
+
* @include dark('button') {
|
|
60
|
+
* background: #333;
|
|
61
|
+
* color: #fff;
|
|
62
|
+
* }
|
|
63
|
+
*/
|
|
64
|
+
/* stylelint-disable scss/no-global-function-names */
|
|
65
|
+
.gct-relationship-diagram-config {
|
|
66
|
+
position: relative;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.gct-relationship-diagram-config-custom-overlay {
|
|
70
|
+
position: relative;
|
|
71
|
+
width: 50px;
|
|
72
|
+
height: 50px;
|
|
73
|
+
cursor: pointer;
|
|
74
|
+
}
|
|
75
|
+
.gct-relationship-diagram-config-custom-overlay .iconfont {
|
|
76
|
+
display: none;
|
|
77
|
+
width: 16px;
|
|
78
|
+
height: 16px;
|
|
79
|
+
}
|
|
80
|
+
.gct-relationship-diagram-config-custom-overlay .iconfont.delete-action:hover {
|
|
81
|
+
color: #F54547;
|
|
82
|
+
}
|
|
83
|
+
.gct-relationship-diagram-config-custom-overlay .iconfont.reverse-action:hover {
|
|
84
|
+
color: #3168EC;
|
|
85
|
+
}
|
|
86
|
+
.gct-relationship-diagram-config-custom-overlay__not-special-line .iconfont.delete-action {
|
|
87
|
+
position: absolute;
|
|
88
|
+
bottom: 9px;
|
|
89
|
+
left: 50%;
|
|
90
|
+
transform: translateX(-50%);
|
|
91
|
+
}
|
|
92
|
+
.gct-relationship-diagram-config-custom-overlay__not-special-line .iconfont.reverse-action {
|
|
93
|
+
position: absolute;
|
|
94
|
+
top: 0;
|
|
95
|
+
left: 50%;
|
|
96
|
+
transform: translateX(-50%);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.gct-relationship-diagram-config-custom-overlay.jtk-hover .iconfont {
|
|
100
|
+
display: block;
|
|
101
|
+
}
|
|
102
|
+
.gct-relationship-diagram-config-custom-overlay__special-line .iconfont.delete-action {
|
|
103
|
+
position: absolute;
|
|
104
|
+
top: 50%;
|
|
105
|
+
left: 5px;
|
|
106
|
+
transform: translateY(-50%);
|
|
107
|
+
}
|
|
108
|
+
.gct-relationship-diagram-config-custom-overlay__special-line .iconfont.reverse-action {
|
|
109
|
+
position: absolute;
|
|
110
|
+
top: 50%;
|
|
111
|
+
right: 5px;
|
|
112
|
+
transform: translateY(-50%);
|
|
113
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { RelationshipDiagramConfigController } from './relationship-diagram-config.controller';
|
|
3
|
+
import { IRelationshipDiagramNode, IRelationshipDiagramOptions } from './interface';
|
|
4
|
+
/**
|
|
5
|
+
* 关系图配置
|
|
6
|
+
*/
|
|
7
|
+
export declare const RelationshipDiagramConfig: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
8
|
+
context: {
|
|
9
|
+
type: PropType<IData>;
|
|
10
|
+
default: () => {};
|
|
11
|
+
};
|
|
12
|
+
items: {
|
|
13
|
+
type: {
|
|
14
|
+
(arrayLength: number): IRelationshipDiagramNode[];
|
|
15
|
+
(...items: IRelationshipDiagramNode[]): IRelationshipDiagramNode[];
|
|
16
|
+
new (arrayLength: number): IRelationshipDiagramNode[];
|
|
17
|
+
new (...items: IRelationshipDiagramNode[]): IRelationshipDiagramNode[];
|
|
18
|
+
isArray(arg: any): arg is any[];
|
|
19
|
+
readonly prototype: any[];
|
|
20
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
21
|
+
from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
22
|
+
from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
|
|
23
|
+
from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
24
|
+
of<T>(...items: T[]): T[];
|
|
25
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
26
|
+
fromAsync<T>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T | PromiseLike<T>> | ArrayLike<T | PromiseLike<T>>): Promise<T[]>;
|
|
27
|
+
fromAsync<T, U>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T> | ArrayLike<T>, mapFn: (value: Awaited<T>, index: number) => U, thisArg?: any): Promise<Awaited<U>[]>;
|
|
28
|
+
};
|
|
29
|
+
default: () => never[];
|
|
30
|
+
};
|
|
31
|
+
config: {
|
|
32
|
+
type: PropType<IRelationshipDiagramOptions>;
|
|
33
|
+
};
|
|
34
|
+
}>, {
|
|
35
|
+
ns: import('@gct-paas/core').Namespace;
|
|
36
|
+
elRef: import('vue').Ref<HTMLDivElement | undefined, HTMLDivElement | undefined>;
|
|
37
|
+
c: RelationshipDiagramConfigController;
|
|
38
|
+
lastId: string;
|
|
39
|
+
isEnd: (item: IRelationshipDiagramNode, i: number) => boolean;
|
|
40
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "update:items"[], "update:items", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
41
|
+
context: {
|
|
42
|
+
type: PropType<IData>;
|
|
43
|
+
default: () => {};
|
|
44
|
+
};
|
|
45
|
+
items: {
|
|
46
|
+
type: {
|
|
47
|
+
(arrayLength: number): IRelationshipDiagramNode[];
|
|
48
|
+
(...items: IRelationshipDiagramNode[]): IRelationshipDiagramNode[];
|
|
49
|
+
new (arrayLength: number): IRelationshipDiagramNode[];
|
|
50
|
+
new (...items: IRelationshipDiagramNode[]): IRelationshipDiagramNode[];
|
|
51
|
+
isArray(arg: any): arg is any[];
|
|
52
|
+
readonly prototype: any[];
|
|
53
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
54
|
+
from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
55
|
+
from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
|
|
56
|
+
from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
57
|
+
of<T>(...items: T[]): T[];
|
|
58
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
59
|
+
fromAsync<T>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T | PromiseLike<T>> | ArrayLike<T | PromiseLike<T>>): Promise<T[]>;
|
|
60
|
+
fromAsync<T, U>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T> | ArrayLike<T>, mapFn: (value: Awaited<T>, index: number) => U, thisArg?: any): Promise<Awaited<U>[]>;
|
|
61
|
+
};
|
|
62
|
+
default: () => never[];
|
|
63
|
+
};
|
|
64
|
+
config: {
|
|
65
|
+
type: PropType<IRelationshipDiagramOptions>;
|
|
66
|
+
};
|
|
67
|
+
}>> & Readonly<{
|
|
68
|
+
"onUpdate:items"?: ((...args: any[]) => any) | undefined;
|
|
69
|
+
}>, {
|
|
70
|
+
context: IData;
|
|
71
|
+
items: IRelationshipDiagramNode[];
|
|
72
|
+
}, {}, {
|
|
73
|
+
DiagramConfigItemContainer: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
74
|
+
i: {
|
|
75
|
+
type: NumberConstructor;
|
|
76
|
+
required: true;
|
|
77
|
+
};
|
|
78
|
+
id: {
|
|
79
|
+
type: StringConstructor;
|
|
80
|
+
required: true;
|
|
81
|
+
};
|
|
82
|
+
}>, {
|
|
83
|
+
ns: import('@gct-paas/core').Namespace;
|
|
84
|
+
calcPosStyle: () => {
|
|
85
|
+
top: string;
|
|
86
|
+
left: string;
|
|
87
|
+
};
|
|
88
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("mounted" | "unmounted")[], "mounted" | "unmounted", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
89
|
+
i: {
|
|
90
|
+
type: NumberConstructor;
|
|
91
|
+
required: true;
|
|
92
|
+
};
|
|
93
|
+
id: {
|
|
94
|
+
type: StringConstructor;
|
|
95
|
+
required: true;
|
|
96
|
+
};
|
|
97
|
+
}>> & Readonly<{
|
|
98
|
+
onMounted?: ((...args: any[]) => any) | undefined;
|
|
99
|
+
onUnmounted?: ((...args: any[]) => any) | undefined;
|
|
100
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
101
|
+
}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
102
|
+
export default RelationshipDiagramConfig;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { ArrowEndpointHandler } from "./plumb-plugin/arrow-endpoint.mjs";
|
|
2
|
+
import { register } from "./plumb-plugin/blank-endpoint-renderer.mjs";
|
|
3
|
+
import "./plumb-plugin/index.mjs";
|
|
4
|
+
import { ControllerTag, NodeType } from "./constant/index.mjs";
|
|
5
|
+
import { RegisterUtil } from "./utils/register/register.mjs";
|
|
6
|
+
import { RelationshipDiagramConfigController } from "./relationship-diagram-config.controller.mjs";
|
|
7
|
+
import { DiagramConfigItemContainer } from "./components/diagram-config-item-container/diagram-config-item-container.mjs";
|
|
8
|
+
import "./components/index.mjs";
|
|
9
|
+
import './relationship-diagram-config.css';/* empty css */
|
|
10
|
+
import { createVNode, defineComponent, h, onMounted, provide, reactive, ref, resolveComponent, watch } from "vue";
|
|
11
|
+
import { cloneDeep } from "lodash-es";
|
|
12
|
+
import { useNamespace } from "@gct-paas/core";
|
|
13
|
+
import { EndpointFactory, uuid } from "@jsplumb/browser-ui";
|
|
14
|
+
//#region src/modules/relationship-diagram-config/relationship-diagram-config.tsx
|
|
15
|
+
/**
|
|
16
|
+
* 关系图配置
|
|
17
|
+
*/
|
|
18
|
+
var RelationshipDiagramConfig = /* @__PURE__ */ defineComponent({
|
|
19
|
+
name: "RelationshipDiagramConfig",
|
|
20
|
+
components: { DiagramConfigItemContainer },
|
|
21
|
+
props: {
|
|
22
|
+
context: {
|
|
23
|
+
type: Object,
|
|
24
|
+
default: () => {
|
|
25
|
+
return {};
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
items: {
|
|
29
|
+
type: Array,
|
|
30
|
+
default: () => []
|
|
31
|
+
},
|
|
32
|
+
config: { type: Object }
|
|
33
|
+
},
|
|
34
|
+
emits: ["update:items"],
|
|
35
|
+
setup(props, { emit }) {
|
|
36
|
+
register();
|
|
37
|
+
EndpointFactory.registerHandler(ArrowEndpointHandler);
|
|
38
|
+
const ns = useNamespace("relationship-diagram-config");
|
|
39
|
+
const elRef = ref();
|
|
40
|
+
const lastId = uuid();
|
|
41
|
+
const { fieldModelKey } = props.context;
|
|
42
|
+
const c = new RelationshipDiagramConfigController();
|
|
43
|
+
c.state = reactive(c.state);
|
|
44
|
+
if (props.config) Object.assign(c.config, props.config);
|
|
45
|
+
provide(ControllerTag.ROOT, c);
|
|
46
|
+
watch(() => props.items, () => {
|
|
47
|
+
if (JSON.stringify(props.items) !== JSON.stringify(c.state.nodes)) {
|
|
48
|
+
c.clearAll();
|
|
49
|
+
if (props.items && props.items.length > 0) c.node.setNodes(cloneDeep(props.items));
|
|
50
|
+
}
|
|
51
|
+
}, { immediate: true });
|
|
52
|
+
watch(() => c.state.nodes, () => {
|
|
53
|
+
emit("update:items", cloneDeep(c.state.nodes));
|
|
54
|
+
}, { deep: true });
|
|
55
|
+
const isEnd = (item, i) => {
|
|
56
|
+
return item.modelKey === fieldModelKey || c.config.max && c.config.max === i + 1 || item.reverse === true;
|
|
57
|
+
};
|
|
58
|
+
onMounted(() => {
|
|
59
|
+
c.initPlumb(elRef.value);
|
|
60
|
+
c.connectAll();
|
|
61
|
+
});
|
|
62
|
+
return {
|
|
63
|
+
ns,
|
|
64
|
+
elRef,
|
|
65
|
+
c,
|
|
66
|
+
lastId,
|
|
67
|
+
isEnd
|
|
68
|
+
};
|
|
69
|
+
},
|
|
70
|
+
render() {
|
|
71
|
+
const lastNode = this.c.state.nodes[this.c.state.nodes.length - 1];
|
|
72
|
+
const lastIndex = this.c.state.nodes.length - 1;
|
|
73
|
+
const endProvider = RegisterUtil.getNode(NodeType.VIRTUAL);
|
|
74
|
+
return createVNode("div", {
|
|
75
|
+
"ref": "elRef",
|
|
76
|
+
"class": this.ns.b()
|
|
77
|
+
}, [this.c.state.nodes.map((node, i) => {
|
|
78
|
+
const provider = RegisterUtil.getNode(node.type || NodeType.DEFAULT);
|
|
79
|
+
return createVNode(DiagramConfigItemContainer, {
|
|
80
|
+
"key": node.id,
|
|
81
|
+
"i": i,
|
|
82
|
+
"id": node.id,
|
|
83
|
+
"onMounted": () => this.c.node.mounted(node.id),
|
|
84
|
+
"onUnmounted": () => this.c.node.unmounted(node.id)
|
|
85
|
+
}, { default: () => [provider ? h(resolveComponent(provider.component), {
|
|
86
|
+
key: node.id,
|
|
87
|
+
context: this.context,
|
|
88
|
+
i,
|
|
89
|
+
data: node,
|
|
90
|
+
isEnd: this.isEnd(node, i)
|
|
91
|
+
}) : `为找到节点适配器类型:${node.type}`] });
|
|
92
|
+
}), this.isEnd(lastNode, lastIndex) ? null : createVNode(DiagramConfigItemContainer, {
|
|
93
|
+
"key": lastNode.id,
|
|
94
|
+
"i": lastIndex + 1,
|
|
95
|
+
"id": this.lastId
|
|
96
|
+
}, { default: () => [endProvider ? h(resolveComponent(endProvider.component), {
|
|
97
|
+
beforeNodeId: lastNode.id,
|
|
98
|
+
i: lastIndex + 1,
|
|
99
|
+
id: this.lastId
|
|
100
|
+
}) : `为找到虚拟节点适配器`] })]);
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
//#endregion
|
|
104
|
+
export { RelationshipDiagramConfig, RelationshipDiagramConfig as default };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { IRelationshipDiagramLink, IRelationshipDiagramNode } from './interface';
|
|
2
|
+
/**
|
|
3
|
+
* 界面状态
|
|
4
|
+
*
|
|
5
|
+
* @author zhanghanrui
|
|
6
|
+
* @date 2024-06-25 10:06:07
|
|
7
|
+
* @export
|
|
8
|
+
* @class RelationshipDiagramConfigState
|
|
9
|
+
*/
|
|
10
|
+
export declare class RelationshipDiagramConfigState {
|
|
11
|
+
/**
|
|
12
|
+
* 是否已经初始化
|
|
13
|
+
*
|
|
14
|
+
* @default false
|
|
15
|
+
* @author zhanghanrui
|
|
16
|
+
* @date 2024-06-25 10:06:08
|
|
17
|
+
* @type {boolean}
|
|
18
|
+
*/
|
|
19
|
+
initialized: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* 当前已经准备完成节点数量
|
|
22
|
+
*
|
|
23
|
+
* @author zhanghanrui
|
|
24
|
+
* @date 2024-06-25 14:06:14
|
|
25
|
+
* @type {number}
|
|
26
|
+
*/
|
|
27
|
+
nodeCount: number;
|
|
28
|
+
/**
|
|
29
|
+
* 设计节点
|
|
30
|
+
*
|
|
31
|
+
* @author zhanghanrui
|
|
32
|
+
* @date 2024-06-25 10:06:59
|
|
33
|
+
* @type {IRelationshipDiagramNode[]}
|
|
34
|
+
*/
|
|
35
|
+
nodes: IRelationshipDiagramNode[];
|
|
36
|
+
/**
|
|
37
|
+
* 连线
|
|
38
|
+
*
|
|
39
|
+
* @author zhanghanrui
|
|
40
|
+
* @date 2024-06-25 10:06:09
|
|
41
|
+
* @type {IRelationshipDiagramLink[]}
|
|
42
|
+
*/
|
|
43
|
+
links: IRelationshipDiagramLink[];
|
|
44
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
//#region src/modules/relationship-diagram-config/relationship-diagram-config.state.ts
|
|
2
|
+
/**
|
|
3
|
+
* 界面状态
|
|
4
|
+
*
|
|
5
|
+
* @author zhanghanrui
|
|
6
|
+
* @date 2024-06-25 10:06:07
|
|
7
|
+
* @export
|
|
8
|
+
* @class RelationshipDiagramConfigState
|
|
9
|
+
*/
|
|
10
|
+
var RelationshipDiagramConfigState = class {
|
|
11
|
+
/**
|
|
12
|
+
* 是否已经初始化
|
|
13
|
+
*
|
|
14
|
+
* @default false
|
|
15
|
+
* @author zhanghanrui
|
|
16
|
+
* @date 2024-06-25 10:06:08
|
|
17
|
+
* @type {boolean}
|
|
18
|
+
*/
|
|
19
|
+
initialized = false;
|
|
20
|
+
/**
|
|
21
|
+
* 当前已经准备完成节点数量
|
|
22
|
+
*
|
|
23
|
+
* @author zhanghanrui
|
|
24
|
+
* @date 2024-06-25 14:06:14
|
|
25
|
+
* @type {number}
|
|
26
|
+
*/
|
|
27
|
+
nodeCount = 0;
|
|
28
|
+
/**
|
|
29
|
+
* 设计节点
|
|
30
|
+
*
|
|
31
|
+
* @author zhanghanrui
|
|
32
|
+
* @date 2024-06-25 10:06:59
|
|
33
|
+
* @type {IRelationshipDiagramNode[]}
|
|
34
|
+
*/
|
|
35
|
+
nodes = [];
|
|
36
|
+
/**
|
|
37
|
+
* 连线
|
|
38
|
+
*
|
|
39
|
+
* @author zhanghanrui
|
|
40
|
+
* @date 2024-06-25 10:06:09
|
|
41
|
+
* @type {IRelationshipDiagramLink[]}
|
|
42
|
+
*/
|
|
43
|
+
links = [];
|
|
44
|
+
};
|
|
45
|
+
//#endregion
|
|
46
|
+
export { RelationshipDiagramConfigState };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { RegisterUtil } from './register/register';
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { ILinkProvider, INodeProvider } from '../../interface';
|
|
2
|
+
/**
|
|
3
|
+
* 注册中心
|
|
4
|
+
*
|
|
5
|
+
* @author zhanghanrui
|
|
6
|
+
* @date 2024-06-25 19:06:06
|
|
7
|
+
* @export
|
|
8
|
+
* @class RegisterUtil
|
|
9
|
+
*/
|
|
10
|
+
export declare class RegisterUtil {
|
|
11
|
+
/**
|
|
12
|
+
* 连线适配器
|
|
13
|
+
*
|
|
14
|
+
* @author zhanghanrui
|
|
15
|
+
* @date 2024-06-25 19:06:55
|
|
16
|
+
* @protected
|
|
17
|
+
* @static
|
|
18
|
+
* @type {Map<string, ILinkProvider>}
|
|
19
|
+
*/
|
|
20
|
+
protected static link: Map<string, ILinkProvider>;
|
|
21
|
+
/**
|
|
22
|
+
* 节点适配器
|
|
23
|
+
*
|
|
24
|
+
* @author zhanghanrui
|
|
25
|
+
* @date 2024-06-25 20:06:35
|
|
26
|
+
* @protected
|
|
27
|
+
* @static
|
|
28
|
+
* @type {Map<string, INodeProvider>}
|
|
29
|
+
*/
|
|
30
|
+
protected static node: Map<string, INodeProvider>;
|
|
31
|
+
/**
|
|
32
|
+
* 注册连线适配器
|
|
33
|
+
*
|
|
34
|
+
* @author zhanghanrui
|
|
35
|
+
* @date 2024-06-25 19:06:11
|
|
36
|
+
* @static
|
|
37
|
+
* @param {string} key
|
|
38
|
+
* @param {ILinkProvider} link
|
|
39
|
+
*/
|
|
40
|
+
static registerLink(key: string, link: ILinkProvider): void;
|
|
41
|
+
/**
|
|
42
|
+
* 获取连线适配器
|
|
43
|
+
*
|
|
44
|
+
* @author zhanghanrui
|
|
45
|
+
* @date 2024-06-25 19:06:17
|
|
46
|
+
* @static
|
|
47
|
+
* @param {string} key
|
|
48
|
+
* @return {*} {(ILinkProvider | undefined)}
|
|
49
|
+
*/
|
|
50
|
+
static getLink(key: string): ILinkProvider | undefined;
|
|
51
|
+
/**
|
|
52
|
+
* 注册节点适配器
|
|
53
|
+
*
|
|
54
|
+
* @author zhanghanrui
|
|
55
|
+
* @date 2024-06-25 20:06:02
|
|
56
|
+
* @static
|
|
57
|
+
* @param {string} key
|
|
58
|
+
* @param {INodeProvider} node
|
|
59
|
+
*/
|
|
60
|
+
static registerNode(key: string, node: INodeProvider): void;
|
|
61
|
+
/**
|
|
62
|
+
* 获取节点适配器
|
|
63
|
+
*
|
|
64
|
+
* @author zhanghanrui
|
|
65
|
+
* @date 2024-06-25 20:06:09
|
|
66
|
+
* @static
|
|
67
|
+
* @param {string} key
|
|
68
|
+
* @return {*} {(INodeProvider | undefined)}
|
|
69
|
+
*/
|
|
70
|
+
static getNode(key: string): INodeProvider | undefined;
|
|
71
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
//#region src/modules/relationship-diagram-config/utils/register/register.ts
|
|
2
|
+
/**
|
|
3
|
+
* 注册中心
|
|
4
|
+
*
|
|
5
|
+
* @author zhanghanrui
|
|
6
|
+
* @date 2024-06-25 19:06:06
|
|
7
|
+
* @export
|
|
8
|
+
* @class RegisterUtil
|
|
9
|
+
*/
|
|
10
|
+
var RegisterUtil = class RegisterUtil {
|
|
11
|
+
/**
|
|
12
|
+
* 连线适配器
|
|
13
|
+
*
|
|
14
|
+
* @author zhanghanrui
|
|
15
|
+
* @date 2024-06-25 19:06:55
|
|
16
|
+
* @protected
|
|
17
|
+
* @static
|
|
18
|
+
* @type {Map<string, ILinkProvider>}
|
|
19
|
+
*/
|
|
20
|
+
static link = /* @__PURE__ */ new Map();
|
|
21
|
+
/**
|
|
22
|
+
* 节点适配器
|
|
23
|
+
*
|
|
24
|
+
* @author zhanghanrui
|
|
25
|
+
* @date 2024-06-25 20:06:35
|
|
26
|
+
* @protected
|
|
27
|
+
* @static
|
|
28
|
+
* @type {Map<string, INodeProvider>}
|
|
29
|
+
*/
|
|
30
|
+
static node = /* @__PURE__ */ new Map();
|
|
31
|
+
/**
|
|
32
|
+
* 注册连线适配器
|
|
33
|
+
*
|
|
34
|
+
* @author zhanghanrui
|
|
35
|
+
* @date 2024-06-25 19:06:11
|
|
36
|
+
* @static
|
|
37
|
+
* @param {string} key
|
|
38
|
+
* @param {ILinkProvider} link
|
|
39
|
+
*/
|
|
40
|
+
static registerLink(key, link) {
|
|
41
|
+
RegisterUtil.link.set(key, link);
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* 获取连线适配器
|
|
45
|
+
*
|
|
46
|
+
* @author zhanghanrui
|
|
47
|
+
* @date 2024-06-25 19:06:17
|
|
48
|
+
* @static
|
|
49
|
+
* @param {string} key
|
|
50
|
+
* @return {*} {(ILinkProvider | undefined)}
|
|
51
|
+
*/
|
|
52
|
+
static getLink(key) {
|
|
53
|
+
return RegisterUtil.link.get(key);
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* 注册节点适配器
|
|
57
|
+
*
|
|
58
|
+
* @author zhanghanrui
|
|
59
|
+
* @date 2024-06-25 20:06:02
|
|
60
|
+
* @static
|
|
61
|
+
* @param {string} key
|
|
62
|
+
* @param {INodeProvider} node
|
|
63
|
+
*/
|
|
64
|
+
static registerNode(key, node) {
|
|
65
|
+
RegisterUtil.node.set(key, node);
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* 获取节点适配器
|
|
69
|
+
*
|
|
70
|
+
* @author zhanghanrui
|
|
71
|
+
* @date 2024-06-25 20:06:09
|
|
72
|
+
* @static
|
|
73
|
+
* @param {string} key
|
|
74
|
+
* @return {*} {(INodeProvider | undefined)}
|
|
75
|
+
*/
|
|
76
|
+
static getNode(key) {
|
|
77
|
+
return RegisterUtil.node.get(key);
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
//#endregion
|
|
81
|
+
export { RegisterUtil };
|
package/es/utils/recursive.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gct-paas/core-web",
|
|
3
|
-
"version": "0.1.6-dev.
|
|
3
|
+
"version": "0.1.6-dev.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "paas 平台网页端核心包",
|
|
6
6
|
"loader": "dist/loader.esm.min.js",
|
|
@@ -33,10 +33,11 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@ant-design/icons-vue": "^6.1.0",
|
|
35
35
|
"@floating-ui/dom": "^1.7.6",
|
|
36
|
-
"@gct-paas/api": "^0.1.
|
|
36
|
+
"@gct-paas/api": "^0.1.6-dev.4",
|
|
37
37
|
"@gct-paas/flow": "0.0.1-dev.1",
|
|
38
38
|
"@gct-paas/platform-icons": "^0.0.2",
|
|
39
39
|
"@icon-park/vue-next": "^1.4.2",
|
|
40
|
+
"@jsplumb/browser-ui": "^6.2.10",
|
|
40
41
|
"@monaco-editor/loader": "^1.7.0",
|
|
41
42
|
"@vueuse/core": "^14.1.0",
|
|
42
43
|
"@wangeditor/editor": "^5.1.23",
|
|
@@ -63,18 +64,18 @@
|
|
|
63
64
|
"vxe-table": "npm:@gct-paas/vxe-table@4.6.19",
|
|
64
65
|
"wujie": "^1.0.29",
|
|
65
66
|
"wujie-vue3": "^1.0.29",
|
|
66
|
-
"@gct-paas/core": "0.1.6-dev.
|
|
67
|
-
"@gct-paas/
|
|
68
|
-
"@gct-paas/
|
|
67
|
+
"@gct-paas/core": "0.1.6-dev.6",
|
|
68
|
+
"@gct-paas/scss": "0.1.6-dev.6",
|
|
69
|
+
"@gct-paas/core-components": "0.1.6-dev.6"
|
|
69
70
|
},
|
|
70
71
|
"peerDependencies": {
|
|
71
|
-
"@gct-paas/api": "^0.1.
|
|
72
|
+
"@gct-paas/api": "^0.1.6-dev.4",
|
|
72
73
|
"@types/sortablejs": "^1.15.1",
|
|
73
74
|
"vant": ">=4",
|
|
74
75
|
"vue": ">=3",
|
|
75
|
-
"@gct-paas/core": "0.1.6-dev.
|
|
76
|
-
"@gct-paas/
|
|
77
|
-
"@gct-paas/
|
|
76
|
+
"@gct-paas/core": "0.1.6-dev.6",
|
|
77
|
+
"@gct-paas/core-components": "0.1.6-dev.6",
|
|
78
|
+
"@gct-paas/scss": "0.1.6-dev.6"
|
|
78
79
|
},
|
|
79
80
|
"devDependencies": {
|
|
80
81
|
"@types/bwip-js": "^3.2.3"
|