@yugu-ui/flow-ui 0.1.16 → 0.1.17
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/README.md +2 -1
- package/dist/config/FlowConfigFlow/composables/usePersonDict.d.ts +3 -0
- package/dist/config/FlowConfigFlow/composables/useRemoteOptions.d.ts +7 -0
- package/dist/config/FlowConfigFlow/graph/buttons.d.ts +4 -0
- package/dist/config/FlowConfigFlow/graph/cellFactory.d.ts +115 -0
- package/dist/config/FlowConfigFlow/graph/conditionGroup.d.ts +12 -0
- package/dist/config/FlowConfigFlow/graph/constants.d.ts +21 -0
- package/dist/config/FlowConfigFlow/graph/dataConvert.d.ts +17 -0
- package/dist/config/FlowConfigFlow/graph/flowGraphUtil.d.ts +39 -0
- package/dist/config/FlowConfigFlow/graph/layout.d.ts +2 -0
- package/dist/config/FlowConfigFlow/graph/nodeOps.d.ts +8 -0
- package/dist/config/FlowConfigFlow/graph/zoom.d.ts +2 -0
- package/dist/index.js +166 -64
- package/dist/person-selector/composables/useSelection.d.ts +2 -0
- package/dist/person-selector/index.d.ts +2 -0
- package/dist/style.css +265 -251
- package/dist/timeline/FlowLayout.d.ts +2 -2
- package/dist/timeline/timeline-mapping.d.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -48,7 +48,8 @@ pnpm add @vue-office/pdf @vue-office/docx @vue-office/excel @vue-office/pptx
|
|
|
48
48
|
|
|
49
49
|
未安装时文档类预览自动降级为「不支持预览该文件,请下载后查看」并保留下载按钮,不影响其他功能。
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
<!-- Developed collaboratively with vscode - 改动代码行数: 1行(预览 URL 行为变更:线上直连文件域名(CORS 白名单已放行线上环境域名);仅 localhost 开发环境改写 /download-proxy 走 vite 同域代理) -->
|
|
52
|
+
> 跨域说明:文档类预览 URL 若属于 `https://download.yugu8.com` 域,**线上环境直接请求完整文件域名**(该域名 CORS 白名单已放行线上环境域名,无需 nginx 反代);仅 localhost 开发环境(CORS 白名单不含 localhost)会被改写为 `/download-proxy/...` 同域路径,由 vite proxy 转发。
|
|
52
53
|
|
|
53
54
|
## 快速开始
|
|
54
55
|
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// Developed collaboratively with vscode - 改动代码行数: 4行
|
|
2
|
+
// useRemoteOptions.js 的类型声明:纯 JS 模块,导出成员放宽为 any,供 SFC(vue-tsc)通过命名导入的类型检查
|
|
3
|
+
export declare const remoteOptionsMap: any;
|
|
4
|
+
export declare function isRemoteField(...args: any[]): any;
|
|
5
|
+
export declare function loadRemoteOptions(...args: any[]): any;
|
|
6
|
+
// Developed collaboratively with vscode - 新增1行(同步新增 getRemoteOptions 类型声明)
|
|
7
|
+
export declare function getRemoteOptions(...args: any[]): any;
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
export function nodeOptions(n: any): {
|
|
2
|
+
id: any;
|
|
3
|
+
shape: string;
|
|
4
|
+
x: any;
|
|
5
|
+
y: any;
|
|
6
|
+
width: number;
|
|
7
|
+
height: number;
|
|
8
|
+
zIndex: number;
|
|
9
|
+
data: {
|
|
10
|
+
type: any;
|
|
11
|
+
name: any;
|
|
12
|
+
active: boolean;
|
|
13
|
+
branchGroup: any;
|
|
14
|
+
branchIndex: any;
|
|
15
|
+
config: any;
|
|
16
|
+
isDefault: boolean;
|
|
17
|
+
};
|
|
18
|
+
ports: {
|
|
19
|
+
groups: {
|
|
20
|
+
in: {
|
|
21
|
+
position: string;
|
|
22
|
+
attrs: {
|
|
23
|
+
circle: Record<string, any>;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
out: {
|
|
27
|
+
position: string;
|
|
28
|
+
attrs: {
|
|
29
|
+
circle: Record<string, any>;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
items: {
|
|
34
|
+
id: string;
|
|
35
|
+
group: string;
|
|
36
|
+
}[];
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
export function edgeOptions(source: any, target: any): {
|
|
40
|
+
shape: string;
|
|
41
|
+
source: {
|
|
42
|
+
cell: any;
|
|
43
|
+
port: string;
|
|
44
|
+
};
|
|
45
|
+
target: {
|
|
46
|
+
cell: any;
|
|
47
|
+
port: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
export function defaultNodes(): {
|
|
51
|
+
id: string;
|
|
52
|
+
name: string;
|
|
53
|
+
type: string;
|
|
54
|
+
x: number;
|
|
55
|
+
y: number;
|
|
56
|
+
}[];
|
|
57
|
+
export function defaultEdges(): {
|
|
58
|
+
source: string;
|
|
59
|
+
target: string;
|
|
60
|
+
}[];
|
|
61
|
+
export function genId(): string;
|
|
62
|
+
export function centerXOf(node: any): any;
|
|
63
|
+
export function getTypeLabel(type: any): string;
|
|
64
|
+
export function getDefaultConfig(type: any, isExternal: any): {
|
|
65
|
+
range: string;
|
|
66
|
+
members: never[];
|
|
67
|
+
assigneeType?: undefined;
|
|
68
|
+
approvers?: undefined;
|
|
69
|
+
mode?: undefined;
|
|
70
|
+
empty?: undefined;
|
|
71
|
+
receivers?: undefined;
|
|
72
|
+
conditionGroups?: undefined;
|
|
73
|
+
} | {
|
|
74
|
+
assigneeType: string;
|
|
75
|
+
approvers: never[];
|
|
76
|
+
mode: string;
|
|
77
|
+
empty: string;
|
|
78
|
+
range?: undefined;
|
|
79
|
+
members?: undefined;
|
|
80
|
+
receivers?: undefined;
|
|
81
|
+
conditionGroups?: undefined;
|
|
82
|
+
} | {
|
|
83
|
+
receivers: never[];
|
|
84
|
+
range?: undefined;
|
|
85
|
+
members?: undefined;
|
|
86
|
+
assigneeType?: undefined;
|
|
87
|
+
approvers?: undefined;
|
|
88
|
+
mode?: undefined;
|
|
89
|
+
empty?: undefined;
|
|
90
|
+
conditionGroups?: undefined;
|
|
91
|
+
} | {
|
|
92
|
+
conditionGroups: {
|
|
93
|
+
rules: {
|
|
94
|
+
field: string;
|
|
95
|
+
operator: string;
|
|
96
|
+
value: string;
|
|
97
|
+
}[];
|
|
98
|
+
}[];
|
|
99
|
+
range?: undefined;
|
|
100
|
+
members?: undefined;
|
|
101
|
+
assigneeType?: undefined;
|
|
102
|
+
approvers?: undefined;
|
|
103
|
+
mode?: undefined;
|
|
104
|
+
empty?: undefined;
|
|
105
|
+
receivers?: undefined;
|
|
106
|
+
} | {
|
|
107
|
+
range?: undefined;
|
|
108
|
+
members?: undefined;
|
|
109
|
+
assigneeType?: undefined;
|
|
110
|
+
approvers?: undefined;
|
|
111
|
+
mode?: undefined;
|
|
112
|
+
empty?: undefined;
|
|
113
|
+
receivers?: undefined;
|
|
114
|
+
conditionGroups?: undefined;
|
|
115
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export function findConditionGroups(graph: any): {
|
|
2
|
+
sourceId: any;
|
|
3
|
+
conditionIds: any[];
|
|
4
|
+
convergeId: any;
|
|
5
|
+
}[];
|
|
6
|
+
export function getConditionBranchSubtree(graph: Graph, condId: string, convergeId: string | null): string[];
|
|
7
|
+
export function validateFlowDetails(graph: Graph): {
|
|
8
|
+
errors: string[];
|
|
9
|
+
errorNodeIds: string[];
|
|
10
|
+
};
|
|
11
|
+
export function validateFlow(graph: any): string[];
|
|
12
|
+
export function markInvalidNodes(graph: any, errorNodeIds?: any[]): void;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// Developed collaboratively with vscode - 改动代码行数: 21行(新增 constants.js 类型声明:常量统一后 constants.js 被 4 个 lang="ts" 组件引用,缺失声明导致 vue-tsc TS7016/TS7031;照 useRemoteOptions.d.ts 惯例补同名声明文件,CONDITION_OPERATORS 给精确元素类型以消除 FlowNodeCard 解构隐式 any)
|
|
2
|
+
// graph/constants.js 的类型声明:供 SFC(vue-tsc)通过命名导入的类型检查
|
|
3
|
+
export declare const NODE_TYPE: Record<string, string>;
|
|
4
|
+
export declare const NODE_TYPE_OPTIONS: { value: string; label: string; icon: string; desc: string }[];
|
|
5
|
+
export declare const NODE_TYPES: { value: string; label: string; icon: string; desc: string }[];
|
|
6
|
+
export declare const NODE_W: number;
|
|
7
|
+
export declare const NODE_H: number;
|
|
8
|
+
export declare const NODE_GAP: number;
|
|
9
|
+
export declare const BASE_X: number;
|
|
10
|
+
export declare const TOP_PADDING: number;
|
|
11
|
+
export declare const TOP_Y: number;
|
|
12
|
+
export declare const BRANCH_GAP: number;
|
|
13
|
+
export declare const MERGE_DROP: number;
|
|
14
|
+
export declare const CONVERGE_EXTRA_GAP: number;
|
|
15
|
+
export declare const FORK_STUB: number;
|
|
16
|
+
export declare const portAttrs: Record<string, any>;
|
|
17
|
+
export declare const CONDITION_OPERATORS: { label: string; value: string }[];
|
|
18
|
+
export declare const INITIATOR_FIELD_KEY: string;
|
|
19
|
+
export declare const INITIATOR_FIELD_LABEL: string;
|
|
20
|
+
export declare const APPROVE_MODE_TEXT: Record<string, string>;
|
|
21
|
+
export declare const APPROVE_MODE_SHORT: Record<string, string>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export function treeToFlatData(tree: Object): {
|
|
2
|
+
nodes: Array<{
|
|
3
|
+
id: any;
|
|
4
|
+
name: any;
|
|
5
|
+
type: any;
|
|
6
|
+
}>;
|
|
7
|
+
edges: Array<{
|
|
8
|
+
source: any;
|
|
9
|
+
target: any;
|
|
10
|
+
}>;
|
|
11
|
+
};
|
|
12
|
+
export function loadFromData(graph: any, data: any): void;
|
|
13
|
+
export function graphToProcessData(graph: Graph): Object | null;
|
|
14
|
+
export function processDataToFlatData(processData: Object): {
|
|
15
|
+
nodes: any[];
|
|
16
|
+
edges: any[];
|
|
17
|
+
} | null;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// Developed collaboratively with vscode - 改动代码行数: 28行
|
|
2
|
+
// flowGraphUtil.js 的类型声明:纯 JS 工具模块(原样复制自 yugu-flow),
|
|
3
|
+
// 导出成员统一放宽为 any,供 SFC(vue-tsc)通过命名导入的类型检查
|
|
4
|
+
export declare const NODE_TYPE: any;
|
|
5
|
+
export declare const NODE_TYPE_OPTIONS: any;
|
|
6
|
+
export declare const NODE_TYPES: any;
|
|
7
|
+
export declare const NODE_W: any;
|
|
8
|
+
export declare const NODE_H: any;
|
|
9
|
+
export declare const NODE_GAP: any;
|
|
10
|
+
export declare const BASE_X: any;
|
|
11
|
+
export declare const TOP_PADDING: any;
|
|
12
|
+
export declare const nodeOptions: any;
|
|
13
|
+
export declare const edgeOptions: any;
|
|
14
|
+
export declare const defaultNodes: any;
|
|
15
|
+
export declare const defaultEdges: any;
|
|
16
|
+
export declare function initGraph(...args: any[]): any;
|
|
17
|
+
export declare function attachWheelZoom(...args: any[]): any;
|
|
18
|
+
export declare function detachWheelZoom(...args: any[]): any;
|
|
19
|
+
export declare function fitStartToTop(...args: any[]): any;
|
|
20
|
+
export declare function treeToFlatData(...args: any[]): any;
|
|
21
|
+
export declare function loadFromData(...args: any[]): any;
|
|
22
|
+
// Developed collaboratively with vscode - 改动代码行数: 2行
|
|
23
|
+
// resolveNames 迁至 usePersonDict(usePersonDict.d.ts 单独声明);新增批量删除声明
|
|
24
|
+
export declare function removeNodesByIds(...args: any[]): any;
|
|
25
|
+
export declare function graphToProcessData(...args: any[]): any;
|
|
26
|
+
export declare function processDataToFlatData(...args: any[]): any;
|
|
27
|
+
export declare function addEdgeButton(...args: any[]): any;
|
|
28
|
+
export declare function refreshButtons(...args: any[]): any;
|
|
29
|
+
export declare function autoLayout(...args: any[]): any;
|
|
30
|
+
export declare function findConditionGroups(...args: any[]): any;
|
|
31
|
+
export declare function getConditionBranchSubtree(...args: any[]): any;
|
|
32
|
+
export declare function addConditionToGroup(...args: any[]): any;
|
|
33
|
+
export declare function insertNodeBetween(...args: any[]): any;
|
|
34
|
+
// Developed collaboratively with vscode - 改动代码行数: 1行
|
|
35
|
+
// validateFlow 自 index.vue 移入 conditionGroup.js 并经中枢 re-export
|
|
36
|
+
export declare function validateFlow(...args: any[]): any;
|
|
37
|
+
// Developed collaboratively with vscode - 改动代码行数: 2行(校验标红新增导出:validateFlowDetails 返回 { errors, errorNodeIds },markInvalidNodes 给失败节点写 data.invalid 驱动卡片红边框;缺失时 TS bundler 解析优先命中本 d.ts 报 TS2305)
|
|
38
|
+
export declare function validateFlowDetails(...args: any[]): any;
|
|
39
|
+
export declare function markInvalidNodes(...args: any[]): any;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export function addConditionToGroup(graph: Graph, sourceId: string, convergeId: string): void;
|
|
2
|
+
export function removeNodesByIds(graph: Graph, nodeIds: string[], { onChanged }?: {
|
|
3
|
+
onChanged?: () => void;
|
|
4
|
+
}): void;
|
|
5
|
+
export function insertNodeBetween(graph: Graph, sourceId: string, targetId: string, type: string, options?: {
|
|
6
|
+
afterGroup?: boolean;
|
|
7
|
+
isExternal?: number;
|
|
8
|
+
}): void;
|