@huanban/rulego-editor-vue 1.0.15 → 1.1.2

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.
@@ -0,0 +1,60 @@
1
+ import type { AIAssistantOpenOptions, HuanbanRulegoEditor } from '@huanban/rulego-editor-core';
2
+ type __VLS_Props = {
3
+ editor?: HuanbanRulegoEditor | null;
4
+ options?: AIAssistantOpenOptions;
5
+ iconOnly?: boolean;
6
+ label?: string;
7
+ className?: string;
8
+ customStyle?: Record<string, string | number>;
9
+ disabled?: boolean;
10
+ };
11
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
12
+ editor: null;
13
+ options: () => {};
14
+ iconOnly: boolean;
15
+ label: string;
16
+ className: string;
17
+ customStyle: () => {};
18
+ disabled: boolean;
19
+ }>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
20
+ open: () => void;
21
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
22
+ editor: null;
23
+ options: () => {};
24
+ iconOnly: boolean;
25
+ label: string;
26
+ className: string;
27
+ customStyle: () => {};
28
+ disabled: boolean;
29
+ }>>> & Readonly<{
30
+ onOpen?: (() => any) | undefined;
31
+ }>, {
32
+ options: AIAssistantOpenOptions;
33
+ className: string;
34
+ customStyle: Record<string, string | number>;
35
+ label: string;
36
+ disabled: boolean;
37
+ editor: HuanbanRulegoEditor | null;
38
+ iconOnly: boolean;
39
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
40
+ declare const _default: typeof __VLS_export;
41
+ export default _default;
42
+ type __VLS_TypePropsToOption<T> = {
43
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
44
+ type: import('vue').PropType<Required<T>[K]>;
45
+ } : {
46
+ type: import('vue').PropType<T[K]>;
47
+ required: true;
48
+ };
49
+ };
50
+ type __VLS_WithDefaults<P, D> = {
51
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
52
+ default: D[K];
53
+ }> : P[K];
54
+ };
55
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
56
+ [K in keyof T]: T[K];
57
+ } : {
58
+ [K in keyof T as K]: T[K];
59
+ }) & {};
60
+ //# sourceMappingURL=AIAssistant.vue.d.ts.map
@@ -1,3 +1,5 @@
1
+ import type { LocaleMessages } from '@huanban/rulego-editor-core';
2
+ import type { EditorTranslate } from '../i18n';
1
3
  export interface ComponentField {
2
4
  name: string;
3
5
  type: string;
@@ -23,16 +25,16 @@ export interface ComponentSidebarProps {
23
25
  onDragStart?: (component: RuleGoComponent) => void;
24
26
  collapsed?: boolean;
25
27
  searchPlaceholder?: string;
28
+ locale?: string;
29
+ messages?: LocaleMessages;
30
+ t?: EditorTranslate;
26
31
  }
27
32
  declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<ComponentSidebarProps>, {
28
33
  collapsed: boolean;
29
- searchPlaceholder: string;
30
34
  }>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<ComponentSidebarProps>, {
31
35
  collapsed: boolean;
32
- searchPlaceholder: string;
33
36
  }>>> & Readonly<{}>, {
34
37
  collapsed: boolean;
35
- searchPlaceholder: string;
36
38
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
37
39
  declare const _default: typeof __VLS_export;
38
40
  export default _default;
@@ -20,6 +20,8 @@ export interface ContextMenuProps {
20
20
  items: ContextMenuItem[];
21
21
  onClose: () => void;
22
22
  }
23
+ import type { FrameworkI18nProps } from '../i18n';
24
+ export type ContextMenuI18nOptions = FrameworkI18nProps;
23
25
  export declare function getNodeContextMenuItems(handlers: {
24
26
  onCopy?: () => void;
25
27
  onPaste?: () => void;
@@ -27,17 +29,19 @@ export declare function getNodeContextMenuItems(handlers: {
27
29
  onEditProperties?: () => void;
28
30
  onViewConnections?: () => void;
29
31
  onDuplicate?: () => void;
30
- }): ContextMenuItem[];
32
+ onRunFromNode?: () => void;
33
+ onRunSingleNode?: () => void;
34
+ }, i18n?: ContextMenuI18nOptions): ContextMenuItem[];
31
35
  export declare function getEdgeContextMenuItems(handlers: {
32
36
  onEditProperties?: () => void;
33
37
  onDelete?: () => void;
34
- }): ContextMenuItem[];
38
+ }, i18n?: ContextMenuI18nOptions): ContextMenuItem[];
35
39
  export declare function getCanvasContextMenuItems(handlers: {
36
40
  onPaste?: () => void;
37
41
  onSelectAll?: () => void;
38
42
  onFitView?: () => void;
39
43
  onResetZoom?: () => void;
40
- }): ContextMenuItem[];
44
+ }, i18n?: ContextMenuI18nOptions): ContextMenuItem[];
41
45
  declare const _default: typeof __VLS_export;
42
46
  export default _default;
43
47
  declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<ContextMenuProps>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<ContextMenuProps>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1,47 @@
1
+ import type { PropType } from 'vue';
2
+ import type { LocaleMessages } from '@huanban/rulego-editor-core';
3
+ import type { EditorTranslate } from '../i18n';
4
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
5
+ /** 绑定对话的规则链 ID,用于上下文隔离 */
6
+ ruleChainId: {
7
+ type: PropType<string>;
8
+ required: true;
9
+ };
10
+ locale: {
11
+ type: StringConstructor;
12
+ default: undefined;
13
+ };
14
+ messages: {
15
+ type: PropType<LocaleMessages>;
16
+ default: undefined;
17
+ };
18
+ t: {
19
+ type: PropType<EditorTranslate>;
20
+ default: undefined;
21
+ };
22
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
23
+ /** 绑定对话的规则链 ID,用于上下文隔离 */
24
+ ruleChainId: {
25
+ type: PropType<string>;
26
+ required: true;
27
+ };
28
+ locale: {
29
+ type: StringConstructor;
30
+ default: undefined;
31
+ };
32
+ messages: {
33
+ type: PropType<LocaleMessages>;
34
+ default: undefined;
35
+ };
36
+ t: {
37
+ type: PropType<EditorTranslate>;
38
+ default: undefined;
39
+ };
40
+ }>> & Readonly<{}>, {
41
+ locale: string;
42
+ t: EditorTranslate;
43
+ messages: LocaleMessages;
44
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
45
+ declare const _default: typeof __VLS_export;
46
+ export default _default;
47
+ //# sourceMappingURL=CopilotChat.vue.d.ts.map
@@ -1,3 +1,5 @@
1
+ import type { LocaleMessages } from '@huanban/rulego-editor-core';
2
+ import type { EditorTranslate } from '../i18n';
1
3
  export interface DataViewDialogProps {
2
4
  visible: boolean;
3
5
  data: unknown;
@@ -5,21 +7,21 @@ export interface DataViewDialogProps {
5
7
  fileNamePrefix?: string;
6
8
  onClose?: () => void;
7
9
  onNotify?: (type: 'success' | 'error' | 'info', content: string) => void;
10
+ locale?: string;
11
+ messages?: LocaleMessages;
12
+ t?: EditorTranslate;
8
13
  }
9
14
  declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<DataViewDialogProps>, {
10
- title: string;
11
15
  fileNamePrefix: string;
12
16
  }>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
13
17
  close: () => void;
14
18
  notify: (type: "error" | "success" | "info", content: string) => void;
15
19
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<DataViewDialogProps>, {
16
- title: string;
17
20
  fileNamePrefix: string;
18
21
  }>>> & Readonly<{
19
22
  onClose?: (() => any) | undefined;
20
23
  onNotify?: ((type: "error" | "success" | "info", content: string) => any) | undefined;
21
24
  }>, {
22
- title: string;
23
25
  fileNamePrefix: string;
24
26
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
25
27
  declare const _default: typeof __VLS_export;
@@ -1,3 +1,5 @@
1
+ import type { LocaleMessages } from '@huanban/rulego-editor-core';
2
+ import type { EditorTranslate } from '../i18n';
1
3
  export interface DebugLogItem {
2
4
  ts: number;
3
5
  flowType: string;
@@ -26,6 +28,9 @@ export interface DebugPanelProps {
26
28
  onFetchRunLogs?: () => Promise<unknown[]>;
27
29
  onNotify?: (type: 'success' | 'error' | 'warning' | 'info', content: string) => void;
28
30
  onClose?: () => void;
31
+ locale?: string;
32
+ messages?: LocaleMessages;
33
+ t?: EditorTranslate;
29
34
  }
30
35
  declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<DebugPanelProps>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
31
36
  close: () => void;
@@ -0,0 +1,96 @@
1
+ /**
2
+ * @file DynamicForm.vue
3
+ * @description Vue 3 版本的玻璃拟态风格动态属性表单
4
+ *
5
+ * 接收 JSON Schema 生成配置项列表,完全剥离 Element Plus,采用原生 HTML + HSL 变量完成拟态风格渲染。
6
+ */
7
+ import type { PropType } from 'vue';
8
+ import type { LocaleMessages } from '@huanban/rulego-editor-core';
9
+ import type { EditorTranslate } from '../i18n';
10
+ import { type SearchableSelectOption } from './SearchableSelect.vue';
11
+ export interface FormField {
12
+ /** 字段唯一标识,对应业务数据的 key */
13
+ key: string;
14
+ /** UI 呈现的中文标签 */
15
+ label: string;
16
+ /** 可选翻译 key,优先级高于 fields.<key> */
17
+ labelKey?: string;
18
+ /** 字段类型,支持数字、文本、布尔、复杂 JSON、下拉等 */
19
+ type: 'string' | 'number' | 'boolean' | 'json' | 'select' | 'textarea' | 'password';
20
+ /** 默认值 */
21
+ defaultValue?: any;
22
+ /** select 选项 */
23
+ options?: SearchableSelectOption[];
24
+ /** select 是否多选 */
25
+ multiple?: boolean;
26
+ /** 输入提示 */
27
+ placeholder?: string;
28
+ /** 帮助文本 */
29
+ help?: string;
30
+ /** textarea 行数 */
31
+ rows?: number;
32
+ }
33
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
34
+ /** 外部传入的 Schema 配置 */
35
+ schema: {
36
+ type: PropType<FormField[]>;
37
+ required: true;
38
+ };
39
+ /** 当前节点或配置面板绑定的实际数据模型 */
40
+ formData: {
41
+ type: PropType<Record<string, any>>;
42
+ required: true;
43
+ };
44
+ /** Current locale. Defaults to zh-CN. */
45
+ locale: {
46
+ type: StringConstructor;
47
+ default: undefined;
48
+ };
49
+ /** Extra locale messages merged into the selected locale. */
50
+ messages: {
51
+ type: PropType<LocaleMessages>;
52
+ default: undefined;
53
+ };
54
+ /** Host-provided translation function. */
55
+ t: {
56
+ type: PropType<EditorTranslate>;
57
+ default: undefined;
58
+ };
59
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
60
+ change: (key: string, value: any) => void;
61
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
62
+ /** 外部传入的 Schema 配置 */
63
+ schema: {
64
+ type: PropType<FormField[]>;
65
+ required: true;
66
+ };
67
+ /** 当前节点或配置面板绑定的实际数据模型 */
68
+ formData: {
69
+ type: PropType<Record<string, any>>;
70
+ required: true;
71
+ };
72
+ /** Current locale. Defaults to zh-CN. */
73
+ locale: {
74
+ type: StringConstructor;
75
+ default: undefined;
76
+ };
77
+ /** Extra locale messages merged into the selected locale. */
78
+ messages: {
79
+ type: PropType<LocaleMessages>;
80
+ default: undefined;
81
+ };
82
+ /** Host-provided translation function. */
83
+ t: {
84
+ type: PropType<EditorTranslate>;
85
+ default: undefined;
86
+ };
87
+ }>> & Readonly<{
88
+ onChange?: ((key: string, value: any) => any) | undefined;
89
+ }>, {
90
+ locale: string;
91
+ t: EditorTranslate;
92
+ messages: LocaleMessages;
93
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
94
+ declare const _default: typeof __VLS_export;
95
+ export default _default;
96
+ //# sourceMappingURL=DynamicForm.vue.d.ts.map
@@ -1,3 +1,5 @@
1
+ import type { LocaleMessages } from '@huanban/rulego-editor-core';
2
+ import type { EditorTranslate } from '../i18n';
1
3
  export interface EdgeModel {
2
4
  id: string;
3
5
  sourceNodeId: string;
@@ -9,8 +11,16 @@ export interface EdgeModel {
9
11
  export interface EdgePropertyDrawerProps {
10
12
  visible: boolean;
11
13
  edgeModel: EdgeModel | null;
14
+ relationTypes?: Array<string | {
15
+ value: string;
16
+ label?: string;
17
+ color?: string;
18
+ }>;
12
19
  onSubmit?: (model: EdgeModel) => void;
13
20
  onClose?: () => void;
21
+ locale?: string;
22
+ messages?: LocaleMessages;
23
+ t?: EditorTranslate;
14
24
  }
15
25
  declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<EdgePropertyDrawerProps>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
16
26
  submit: (model: EdgeModel) => void;
@@ -1,3 +1,5 @@
1
+ import type { LocaleMessages } from '@huanban/rulego-editor-core';
2
+ import type { EditorTranslate } from '../i18n';
1
3
  export interface ToolbarButton {
2
4
  key: string;
3
5
  icon: string;
@@ -34,6 +36,9 @@ export interface EditorToolbarProps {
34
36
  extraButtons?: ToolbarButton[];
35
37
  hiddenButtons?: string[];
36
38
  chainName?: string;
39
+ locale?: string;
40
+ messages?: LocaleMessages;
41
+ t?: EditorTranslate;
37
42
  }
38
43
  declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<EditorToolbarProps>, {
39
44
  canUndo: boolean;
@@ -1,3 +1,5 @@
1
+ import type { LocaleMessages } from '@huanban/rulego-editor-core';
2
+ import type { EditorTranslate } from '../i18n';
1
3
  export type ImportExportMode = 'import' | 'export';
2
4
  export interface ImportExportDialogProps {
3
5
  mode?: ImportExportMode;
@@ -6,6 +8,9 @@ export interface ImportExportDialogProps {
6
8
  onImport?: (data: any) => void;
7
9
  onClose?: () => void;
8
10
  onNotify?: (type: 'success' | 'error' | 'info', message: string) => void;
11
+ locale?: string;
12
+ messages?: LocaleMessages;
13
+ t?: EditorTranslate;
9
14
  }
10
15
  declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<ImportExportDialogProps>, {
11
16
  mode: string;
@@ -0,0 +1,64 @@
1
+ import type { PropType } from 'vue';
2
+ import type { LocaleMessages } from '@huanban/rulego-editor-core';
3
+ import type { EditorTranslate } from '../i18n';
4
+ export interface LogEntry {
5
+ /** 唯一日志标识 UUID */
6
+ id: string;
7
+ /** 产生日志的毫秒时间戳 */
8
+ timestamp: number;
9
+ /** 日志级别 */
10
+ level: 'info' | 'warn' | 'error' | 'debug';
11
+ /** 实际文本内容 */
12
+ message: string;
13
+ }
14
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
15
+ /** 从外层 WebSocket 接收并维护的日志数组 */
16
+ logs: {
17
+ type: PropType<LogEntry[]>;
18
+ default: () => never[];
19
+ };
20
+ /** Current locale. Defaults to zh-CN. */
21
+ locale: {
22
+ type: StringConstructor;
23
+ default: undefined;
24
+ };
25
+ /** Extra locale messages merged into the selected locale. */
26
+ messages: {
27
+ type: PropType<LocaleMessages>;
28
+ default: undefined;
29
+ };
30
+ /** Host-provided translation function. */
31
+ t: {
32
+ type: PropType<EditorTranslate>;
33
+ default: undefined;
34
+ };
35
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
36
+ /** 从外层 WebSocket 接收并维护的日志数组 */
37
+ logs: {
38
+ type: PropType<LogEntry[]>;
39
+ default: () => never[];
40
+ };
41
+ /** Current locale. Defaults to zh-CN. */
42
+ locale: {
43
+ type: StringConstructor;
44
+ default: undefined;
45
+ };
46
+ /** Extra locale messages merged into the selected locale. */
47
+ messages: {
48
+ type: PropType<LocaleMessages>;
49
+ default: undefined;
50
+ };
51
+ /** Host-provided translation function. */
52
+ t: {
53
+ type: PropType<EditorTranslate>;
54
+ default: undefined;
55
+ };
56
+ }>> & Readonly<{}>, {
57
+ locale: string;
58
+ t: EditorTranslate;
59
+ messages: LocaleMessages;
60
+ logs: LogEntry[];
61
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
62
+ declare const _default: typeof __VLS_export;
63
+ export default _default;
64
+ //# sourceMappingURL=LogViewer.vue.d.ts.map
@@ -1,3 +1,5 @@
1
+ import type { LocaleMessages } from '@huanban/rulego-editor-core';
2
+ import type { EditorTranslate } from '../i18n';
1
3
  export interface MiniMapNode {
2
4
  id: string;
3
5
  x: number;
@@ -26,6 +28,9 @@ export interface MiniMapProps {
26
28
  y: number;
27
29
  }) => void;
28
30
  onNodeClick?: (nodeId: string) => void;
31
+ locale?: string;
32
+ messages?: LocaleMessages;
33
+ t?: EditorTranslate;
29
34
  }
30
35
  declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<MiniMapProps>, {
31
36
  width: number;
@@ -1,9 +1,76 @@
1
+ import type { LocaleMessages } from '@huanban/rulego-editor-core';
2
+ import type { EditorTranslate } from '../i18n';
3
+ export type FieldOption = string | {
4
+ label?: string;
5
+ value?: string;
6
+ name?: string;
7
+ id?: string;
8
+ [key: string]: unknown;
9
+ };
10
+ export interface GraphNodeOptionSource {
11
+ id?: string;
12
+ nodeId?: string;
13
+ name?: string;
14
+ text?: string | {
15
+ value?: string;
16
+ };
17
+ type?: string;
18
+ properties?: Record<string, unknown>;
19
+ [key: string]: unknown;
20
+ }
21
+ export interface RuleChainOptionSource {
22
+ id?: string;
23
+ value?: string;
24
+ name?: string;
25
+ label?: string;
26
+ desc?: string;
27
+ description?: string;
28
+ root?: boolean;
29
+ ruleChain?: Record<string, unknown>;
30
+ [key: string]: unknown;
31
+ }
32
+ export interface RuleChainFetchParams {
33
+ root: boolean;
34
+ keywords: string;
35
+ page: number;
36
+ size: number;
37
+ signal?: AbortSignal;
38
+ }
39
+ export interface RuleChainFetchResult {
40
+ items?: RuleChainOptionSource[];
41
+ records?: RuleChainOptionSource[];
42
+ rows?: RuleChainOptionSource[];
43
+ list?: RuleChainOptionSource[];
44
+ total?: number;
45
+ page?: number;
46
+ current?: number;
47
+ size?: number;
48
+ pageSize?: number;
49
+ data?: unknown;
50
+ [key: string]: unknown;
51
+ }
1
52
  export interface FieldDef {
2
53
  name: string;
3
- type: string;
54
+ type?: string;
4
55
  label?: string;
5
56
  desc?: string;
6
57
  defaultValue?: unknown;
58
+ component?: {
59
+ type?: string;
60
+ caseType?: string;
61
+ source?: string;
62
+ options?: FieldOption[];
63
+ multiple?: boolean;
64
+ filterable?: boolean;
65
+ allowCreate?: boolean;
66
+ placeholder?: string;
67
+ disabled?: boolean;
68
+ rows?: number;
69
+ };
70
+ options?: FieldOption[];
71
+ fields?: FieldDef[];
72
+ ref?: string;
73
+ disabled?: boolean;
7
74
  rules?: unknown[];
8
75
  }
9
76
  export interface NodeModel {
@@ -29,6 +96,16 @@ export interface NodePropertyDrawerProps {
29
96
  nodeView: NodeView | null;
30
97
  onSubmit?: (model: NodeModel) => void;
31
98
  onClose?: () => void;
99
+ locale?: string;
100
+ messages?: LocaleMessages;
101
+ t?: EditorTranslate;
102
+ graphNodes?: GraphNodeOptionSource[];
103
+ ruleItems?: RuleChainOptionSource[];
104
+ currentRuleChain?: RuleChainOptionSource | null;
105
+ rulesApi?: string;
106
+ apiBase?: string;
107
+ rulePageSize?: number;
108
+ fetchRuleChains?: (params: RuleChainFetchParams) => Promise<RuleChainFetchResult | RuleChainOptionSource[] | unknown>;
32
109
  }
33
110
  declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<NodePropertyDrawerProps>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
34
111
  submit: (model: NodeModel) => void;
@@ -1,3 +1,5 @@
1
+ import type { LocaleMessages } from '@huanban/rulego-editor-core';
2
+ import type { EditorTranslate } from '../i18n';
1
3
  export interface RuleChainSettingsData {
2
4
  id?: string;
3
5
  name: string;
@@ -12,6 +14,9 @@ export interface RuleChainSettingsProps {
12
14
  data: RuleChainSettingsData;
13
15
  readOnly?: boolean;
14
16
  title?: string;
17
+ locale?: string;
18
+ messages?: LocaleMessages;
19
+ t?: EditorTranslate;
15
20
  customFields?: Array<{
16
21
  key: string;
17
22
  label: string;
@@ -27,20 +32,17 @@ export interface RuleChainSettingsProps {
27
32
  }
28
33
  declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<RuleChainSettingsProps>, {
29
34
  readOnly: boolean;
30
- title: string;
31
35
  customFields: () => never[];
32
36
  }>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
33
37
  save: (data: RuleChainSettingsData) => void;
34
38
  close: () => void;
35
39
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<RuleChainSettingsProps>, {
36
40
  readOnly: boolean;
37
- title: string;
38
41
  customFields: () => never[];
39
42
  }>>> & Readonly<{
40
43
  onSave?: ((data: RuleChainSettingsData) => any) | undefined;
41
44
  onClose?: (() => any) | undefined;
42
45
  }>, {
43
- title: string;
44
46
  readOnly: boolean;
45
47
  customFields: Array<{
46
48
  key: string;
@@ -4,28 +4,37 @@
4
4
  */
5
5
  import { type PropType } from 'vue';
6
6
  import { HuanbanRulegoEditor } from '@huanban/rulego-editor-core';
7
- import type { HuanbanRulegoEditorOptions, EditorCore, RuleChainData, ComponentDefinition } from '@huanban/rulego-editor-core';
7
+ import type { AIAssistantOpenOptions, HuanbanRulegoEditorOptions, EditorCore, RuleChainData, RawComponentData } from '@huanban/rulego-editor-core';
8
8
  import LogicFlow from '@logicflow/core';
9
9
  export interface RuleGoEditorProps {
10
10
  options?: Partial<HuanbanRulegoEditorOptions>;
11
11
  data?: RuleChainData | null;
12
- components?: ComponentDefinition[];
12
+ components?: RawComponentData;
13
13
  height?: string | number;
14
14
  width?: string | number;
15
15
  /** 额外 CSS 类名 — 对齐 React 版 className prop */
16
16
  className?: string;
17
17
  /** 额外内联样式 — 对齐 React 版 style prop */
18
18
  customStyle?: Record<string, string | number>;
19
+ /**
20
+ * 自定义无头节点渲染器
21
+ * 当使用 HeadlessHtmlNode 时,核心引擎会派发 `node:html-mount` 事件。
22
+ * Vue 适配层会捕获该事件并调用本函数/插槽,将返回的 Vue 虚拟节点通过 Teleport 挂载到画布内部。
23
+ */
24
+ renderNode?: (type: string, data: any, model: any) => any;
19
25
  }
20
26
  export interface RuleGoEditorRef {
21
27
  editor: HuanbanRulegoEditor | null;
22
28
  lf: LogicFlow | null;
23
29
  core: EditorCore | null;
24
30
  loadData: (data: RuleChainData) => void;
25
- loadComponents: (components: ComponentDefinition[]) => void;
31
+ loadComponents: (components: RawComponentData) => void;
26
32
  exportData: () => RuleChainData | null;
27
33
  toggleMiniMap: () => void;
28
34
  autoLayout: () => void;
35
+ openSettings: (initialTab?: 'user' | 'setting' | 'ai' | 'skills') => void;
36
+ openAiAssistant: (options?: AIAssistantOpenOptions) => void;
37
+ closeAiAssistant: () => void;
29
38
  }
30
39
  export declare const RuleGoEditor: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
31
40
  options: {
@@ -37,7 +46,7 @@ export declare const RuleGoEditor: import("vue").DefineComponent<import("vue").E
37
46
  default: null;
38
47
  };
39
48
  components: {
40
- type: PropType<ComponentDefinition[]>;
49
+ type: PropType<RawComponentData>;
41
50
  default: () => never[];
42
51
  };
43
52
  height: {
@@ -56,6 +65,10 @@ export declare const RuleGoEditor: import("vue").DefineComponent<import("vue").E
56
65
  type: PropType<Record<string, string | number>>;
57
66
  default: () => {};
58
67
  };
68
+ renderNode: {
69
+ type: PropType<(type: string, data: any, model: any) => any>;
70
+ default: undefined;
71
+ };
59
72
  }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
60
73
  [key: string]: any;
61
74
  }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, "ready" | "save" | "node-click" | "node-dbclick" | "edge-click" | "change" | "info-click" | "export-dsl" | "run-click" | "component-manage" | "locale-change" | "deploy" | "select-rule-chain" | "delete-rule-chain" | "run-history", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
@@ -68,7 +81,7 @@ export declare const RuleGoEditor: import("vue").DefineComponent<import("vue").E
68
81
  default: null;
69
82
  };
70
83
  components: {
71
- type: PropType<ComponentDefinition[]>;
84
+ type: PropType<RawComponentData>;
72
85
  default: () => never[];
73
86
  };
74
87
  height: {
@@ -87,14 +100,19 @@ export declare const RuleGoEditor: import("vue").DefineComponent<import("vue").E
87
100
  type: PropType<Record<string, string | number>>;
88
101
  default: () => {};
89
102
  };
103
+ renderNode: {
104
+ type: PropType<(type: string, data: any, model: any) => any>;
105
+ default: undefined;
106
+ };
90
107
  }>> & Readonly<{}>, {
91
108
  data: RuleChainData | null;
92
- components: ComponentDefinition[];
109
+ components: RawComponentData;
93
110
  options: Partial<HuanbanRulegoEditorOptions>;
94
111
  height: string | number;
95
112
  width: string | number;
96
113
  className: string;
97
114
  customStyle: Record<string, string | number>;
115
+ renderNode: (type: string, data: any, model: any) => any;
98
116
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
99
117
  export default RuleGoEditor;
100
118
  //# sourceMappingURL=RuleGoEditor.d.ts.map