@huanban/rulego-editor-core 1.4.2 → 2.0.0
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 +20 -8
- package/dist/ai/ai-chat-options.d.ts +12 -0
- package/dist/api/AIAssistantAPI.d.ts +29 -0
- package/dist/api/AIManager.d.ts +7 -1
- package/dist/api/ApiProvider.d.ts +17 -4
- package/dist/api/DebugSocketClient.d.ts +2 -0
- package/dist/api/GlobalConfigAPI.d.ts +35 -0
- package/dist/api/IoTPointTemplateAPI.d.ts +32 -0
- package/dist/api/MarketplaceAPI.d.ts +39 -0
- package/dist/api/RuleChainAPI.d.ts +23 -4
- package/dist/api/RuleChainVersionsAPI.d.ts +28 -0
- package/dist/api/SkillsAPI.d.ts +31 -0
- package/dist/api/UserAPI.d.ts +39 -0
- package/dist/api/extended-api-shared.d.ts +25 -0
- package/dist/api/index.d.ts +19 -2
- package/dist/api/public-api.test-d.d.ts +87 -0
- package/dist/api/response-utils.d.ts +1 -0
- package/dist/api/types.d.ts +86 -14
- package/dist/chunks/editor-core-api-BQiYFuIO.js +1157 -0
- package/dist/chunks/editor-core-canvas-nodes-BE9eN51s.js +6921 -0
- package/dist/chunks/editor-core-code-editor-DFm5Owtv.js +660 -0
- package/dist/chunks/{editor-core-default-components-BjF65lar.js → editor-core-default-components-BsNP8ma1.js} +98 -98
- package/dist/chunks/editor-core-dialogs-D9YHvzys.js +12009 -0
- package/dist/chunks/{editor-core-locales-i6o28vm2.js → editor-core-locales-CsqTh7Wh.js} +1723 -11
- package/dist/chunks/{editor-core-node-patches-BJTT3TuX.js → editor-core-node-patches-Dbi8XYxu.js} +633 -184
- package/dist/chunks/{editor-core-node-views-BOaPVdmN.js → editor-core-node-views-C8FQYC3E.js} +39 -29
- package/dist/chunks/editor-core-property-drawers-Bqmp9B_J.js +9562 -0
- package/dist/chunks/editor-core-settings-DcGCJSc7.js +4161 -0
- package/dist/chunks/editor-core-standalone-C7pzm8ZB.js +10013 -0
- package/dist/chunks/{editor-core-styles-DFhXz0vB.js → editor-core-styles-CwjFPfAo.js} +967 -510
- package/dist/chunks/vendor-highlight-acC2fLd8.js +5868 -0
- package/dist/chunks/vendor-logicflow-core-runtime-DpsWXOGl.js +4 -0
- package/dist/chunks/vendor-logicflow-shared-C_kIdBKO.js +4 -0
- package/dist/core/ActionRegistry.d.ts +4 -2
- package/dist/core/DataAdapter.d.ts +17 -1
- package/dist/core/DialogProvider.d.ts +33 -0
- package/dist/core/EditorCore.d.ts +16 -3
- package/dist/core/FieldCapabilityRegistry.d.ts +4 -1
- package/dist/core/FieldChangeRegistry.d.ts +3 -1
- package/dist/core/I18nManager.d.ts +1 -1
- package/dist/core/IdentityProvider.d.ts +32 -0
- package/dist/core/OptionSourceRegistry.d.ts +4 -1
- package/dist/core/PropertyControlRegistry.d.ts +29 -0
- package/dist/core/ThemeManager.d.ts +7 -0
- package/dist/core/anchored-popover.d.ts +16 -0
- package/dist/core/assistant-dsl.d.ts +18 -0
- package/dist/core/business-log-config.d.ts +18 -0
- package/dist/core/clean-snapshot.d.ts +14 -0
- package/dist/core/component-localization.d.ts +17 -0
- package/dist/core/component-palette.d.ts +3 -0
- package/dist/core/connection-status.d.ts +11 -0
- package/dist/core/dialog-styles.d.ts +1 -0
- package/dist/core/editor-capabilities.d.ts +82 -1
- package/dist/core/editor-edge-anchors.d.ts +16 -0
- package/dist/core/endpoint-protocol.d.ts +15 -0
- package/dist/core/expression-preview.d.ts +6 -0
- package/dist/core/field-protocol.d.ts +19 -4
- package/dist/core/global-config.d.ts +47 -0
- package/dist/core/global-search.d.ts +31 -0
- package/dist/core/group-protocol.d.ts +56 -0
- package/dist/core/identity-provider-default.d.ts +32 -0
- package/dist/core/index.d.ts +31 -5
- package/dist/core/keymap.d.ts +10 -0
- package/dist/core/payload-kv.d.ts +7 -0
- package/dist/core/rule-chain-versions.d.ts +143 -0
- package/dist/core/run-analysis.d.ts +126 -0
- package/dist/core/runtime-field-dictionary.d.ts +3 -0
- package/dist/core/save-conflict.d.ts +1 -0
- package/dist/core/server-status.d.ts +1 -0
- package/dist/core/toolbar-icons.d.ts +1 -1
- package/dist/core/variable-completion.d.ts +13 -0
- package/dist/core/websocket-auth.d.ts +2 -0
- package/dist/defaults/analysis-locales.d.ts +241 -0
- package/dist/defaults/component-locale-categories.d.ts +14 -0
- package/dist/defaults/component-locale-data.d.ts +4 -0
- package/dist/defaults/component-locale-en-US.d.ts +10 -0
- package/dist/defaults/component-locale-summaries.d.ts +15 -0
- package/dist/defaults/component-locale-zh-CN.d.ts +10 -0
- package/dist/defaults/editor-shell-locales.d.ts +290 -0
- package/dist/defaults/example-chain.d.ts +2 -0
- package/dist/defaults/field-interaction-locales.d.ts +19 -0
- package/dist/defaults/global-config-locales.d.ts +166 -0
- package/dist/defaults/official-component-fallbacks.d.ts +2 -1
- package/dist/defaults/point-template-locales.d.ts +64 -0
- package/dist/index.cjs +2856 -2086
- package/dist/index.d.ts +33 -10
- package/dist/index.esm.js +1182 -810
- package/dist/index.umd.js +2850 -2080
- package/dist/nodes/UnknownNodeModel.d.ts +12 -1
- package/dist/standalone/HuanbanRulegoEditor.d.ts +145 -13
- package/dist/standalone/auth-fetch.d.ts +1 -0
- package/dist/standalone/auth-ui-defaults.d.ts +15 -0
- package/dist/standalone/code-editor.d.ts +7 -5
- package/dist/standalone/connection-status-binding.d.ts +3 -2
- package/dist/standalone/custom-nodes.d.ts +13 -0
- package/dist/standalone/drawer-locale.d.ts +12 -0
- package/dist/standalone/drawer-unsaved-guard.d.ts +6 -1
- package/dist/standalone/dynamic-field-browse.d.ts +25 -0
- package/dist/standalone/edge-label-quick-editor.d.ts +2 -1
- package/dist/standalone/editor-actions.d.ts +1 -0
- package/dist/standalone/editor-canvas-anchors.d.ts +19 -0
- package/dist/standalone/editor-canvas-shortcuts.d.ts +1 -0
- package/dist/standalone/editor-chain-info.d.ts +1 -0
- package/dist/standalone/editor-debug-data.d.ts +18 -0
- package/dist/standalone/editor-debug-ws.d.ts +2 -0
- package/dist/standalone/editor-delete.d.ts +5 -3
- package/dist/standalone/editor-dialog-provider.d.ts +3 -0
- package/dist/standalone/editor-dialogs.d.ts +25 -2
- package/dist/standalone/editor-global-config.d.ts +44 -0
- package/dist/standalone/editor-group-interactions.d.ts +1 -0
- package/dist/standalone/editor-host-region-styles.d.ts +1 -0
- package/dist/standalone/editor-host-regions.d.ts +53 -0
- package/dist/standalone/editor-login.d.ts +15 -0
- package/dist/standalone/editor-overlays.d.ts +5 -0
- package/dist/standalone/editor-property-drawers.d.ts +3 -1
- package/dist/standalone/editor-run-analysis.d.ts +81 -0
- package/dist/standalone/editor-run-compare.d.ts +20 -0
- package/dist/standalone/editor-run-waterfall.d.ts +11 -0
- package/dist/standalone/editor-toast.d.ts +1 -1
- package/dist/standalone/editor-toolbar-presentation.d.ts +12 -0
- package/dist/standalone/editor-toolbar.d.ts +5 -1
- package/dist/standalone/editor-ui-configuration.d.ts +55 -0
- package/dist/standalone/editor-ui-settings.d.ts +26 -0
- package/dist/standalone/editor-user-menu.d.ts +8 -0
- package/dist/standalone/editor-version-history.d.ts +82 -0
- package/dist/standalone/editor-workspace-shell.d.ts +47 -0
- package/dist/standalone/editor-workspace-styles.d.ts +1 -0
- package/dist/standalone/field-expression-preview.d.ts +12 -0
- package/dist/standalone/group-node.d.ts +19 -3
- package/dist/standalone/icon-utils.d.ts +7 -0
- package/dist/standalone/index.d.ts +17 -5
- package/dist/standalone/keyboard-events.d.ts +3 -0
- package/dist/standalone/multi-select-popover.d.ts +16 -0
- package/dist/standalone/node-copy.d.ts +1 -0
- package/dist/standalone/node-definitions.d.ts +4 -0
- package/dist/standalone/node-renderer-utils.d.ts +21 -0
- package/dist/standalone/node-theme.d.ts +1 -1
- package/dist/standalone/point-template-actions.d.ts +43 -0
- package/dist/standalone/property-field-draft.d.ts +5 -0
- package/dist/standalone/question-list-editor.d.ts +35 -0
- package/dist/standalone/shared-node-manager.d.ts +14 -0
- package/dist/standalone/single-select-popover.d.ts +6 -0
- package/dist/standalone/theme-scope.d.ts +15 -0
- package/dist/standalone/themes.d.ts +4 -0
- package/dist/standalone/variable-completion-dropdown.d.ts +18 -0
- package/dist/types/component.d.ts +22 -1
- package/dist/types/editor.d.ts +41 -0
- package/dist/utils/relation-utils.d.ts +19 -1
- package/dist/version.d.ts +2 -2
- package/package.json +3 -3
- package/vite-chunks.mjs +66 -0
- package/dist/chunks/editor-core-code-editor-CRki2wA_.js +0 -512
- package/dist/chunks/editor-core-dialogs-BMWb0WRN.js +0 -17228
- package/dist/chunks/editor-core-property-drawers-BPh-jj1b.js +0 -7998
- package/dist/chunks/editor-core-standalone-Cls7lcgT.js +0 -11302
- package/dist/chunks/vendor-logicflow-core-runtime-Cp6IBEjB.js +0 -217
- package/dist/chunks/vendor-logicflow-shared-C7YynLDn.js +0 -4
package/dist/chunks/{editor-core-node-views-BOaPVdmN.js → editor-core-node-views-C8FQYC3E.js}
RENAMED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { O as
|
|
1
|
+
import { O as r } from "./editor-core-node-patches-Dbi8XYxu.js";
|
|
2
2
|
const e = (l = []) => ({
|
|
3
3
|
type: "select",
|
|
4
4
|
filterable: !0,
|
|
5
5
|
allowCreate: !0,
|
|
6
6
|
multiple: !1,
|
|
7
7
|
...l.length ? { options: l } : {}
|
|
8
|
-
}),
|
|
8
|
+
}), t = (l = []) => ({
|
|
9
9
|
type: "select",
|
|
10
10
|
filterable: !0,
|
|
11
11
|
allowCreate: !1,
|
|
@@ -15,19 +15,19 @@ const e = (l = []) => ({
|
|
|
15
15
|
function b(l) {
|
|
16
16
|
return !!l && typeof l == "object" && !Array.isArray(l);
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function i(l, c) {
|
|
19
19
|
const a = { ...l };
|
|
20
|
-
for (const [s,
|
|
21
|
-
b(a[s]) && b(
|
|
20
|
+
for (const [s, d] of Object.entries(c || {}))
|
|
21
|
+
b(a[s]) && b(d) ? a[s] = i(a[s], d) : a[s] = d;
|
|
22
22
|
return a;
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function n(l, c) {
|
|
25
25
|
const a = { ...l };
|
|
26
|
-
for (const [s,
|
|
27
|
-
a[s] =
|
|
26
|
+
for (const [s, d] of Object.entries(c || {}))
|
|
27
|
+
a[s] = i(a[s] || {}, d);
|
|
28
28
|
return a;
|
|
29
29
|
}
|
|
30
|
-
const
|
|
30
|
+
const m = {
|
|
31
31
|
delay: {
|
|
32
32
|
label: "延迟",
|
|
33
33
|
icon: "images/delay.svg",
|
|
@@ -65,7 +65,7 @@ const n = {
|
|
|
65
65
|
desc: "打印日志",
|
|
66
66
|
jsScript: { label: "function String(msg, metadata, msgType) {", desc: "}" }
|
|
67
67
|
}
|
|
68
|
-
},
|
|
68
|
+
}, p = {
|
|
69
69
|
break: { label: "中断", icon: "images/break.svg", desc: "中断当前流程" },
|
|
70
70
|
comment: { label: "注释", icon: "images/comment.svg", desc: "添加注释说明" },
|
|
71
71
|
end: { label: "结束", icon: "images/end.svg", desc: "结束当前流程" },
|
|
@@ -126,7 +126,7 @@ const n = {
|
|
|
126
126
|
icon: "images/while.svg",
|
|
127
127
|
desc: "While循环",
|
|
128
128
|
condition: { label: "循环条件", desc: "例如: msg.count==nil || msg.count< 5", component: { type: "expr" } },
|
|
129
|
-
do: { label: "处理节点", desc: "处理链的起始节点", component:
|
|
129
|
+
do: { label: "处理节点", desc: "处理链的起始节点", component: t() },
|
|
130
130
|
mode: { label: "执行模式", component: e([
|
|
131
131
|
{ label: "同步不合并执行结果", value: 0 },
|
|
132
132
|
{ label: "同步合并执行结果", value: 1 },
|
|
@@ -141,7 +141,7 @@ const n = {
|
|
|
141
141
|
fieldName: { label: "字段名", desc: "" },
|
|
142
142
|
jsScript: { label: "迭代脚本", desc: "" }
|
|
143
143
|
}
|
|
144
|
-
},
|
|
144
|
+
}, g = {
|
|
145
145
|
exprFilter: {
|
|
146
146
|
label: "表达式过滤",
|
|
147
147
|
icon: "images/exprFilter.svg",
|
|
@@ -178,7 +178,7 @@ const n = {
|
|
|
178
178
|
desc: "使用Lua脚本过滤消息",
|
|
179
179
|
script: { label: "Lua脚本", desc: "" }
|
|
180
180
|
}
|
|
181
|
-
},
|
|
181
|
+
}, u = {
|
|
182
182
|
exprTransform: {
|
|
183
183
|
label: "表达式转换",
|
|
184
184
|
icon: "images/exprTransform.svg",
|
|
@@ -209,7 +209,7 @@ const n = {
|
|
|
209
209
|
desc: "使用Lua脚本转换消息",
|
|
210
210
|
script: { label: "Lua脚本", desc: "" }
|
|
211
211
|
}
|
|
212
|
-
},
|
|
212
|
+
}, v = {
|
|
213
213
|
cacheDelete: {
|
|
214
214
|
label: "缓存删除",
|
|
215
215
|
icon: "images/cacheDelete.svg",
|
|
@@ -549,7 +549,7 @@ const n = {
|
|
|
549
549
|
kickBound: { label: "唤醒的Job数量上限", desc: "" },
|
|
550
550
|
pauseTime: { label: "暂停时间", desc: "" }
|
|
551
551
|
}
|
|
552
|
-
},
|
|
552
|
+
}, y = {
|
|
553
553
|
flow: {
|
|
554
554
|
label: "子规则链",
|
|
555
555
|
targetId: { label: "子规则链ID", desc: "" },
|
|
@@ -612,7 +612,7 @@ const n = {
|
|
|
612
612
|
url: { label: "请求地址", desc: "" },
|
|
613
613
|
action: { label: "SOAP Action", desc: "" }
|
|
614
614
|
}
|
|
615
|
-
},
|
|
615
|
+
}, T = {
|
|
616
616
|
"ai/llm": {
|
|
617
617
|
label: "AI文本生成",
|
|
618
618
|
icon: "images/aiLlm.svg",
|
|
@@ -629,7 +629,7 @@ const n = {
|
|
|
629
629
|
]) },
|
|
630
630
|
systemPrompt: { label: "系统提示", desc: "用于预先定义模型的基础行为框架和响应风格。可以使用${} 占位符变量", component: { type: "textarea" } },
|
|
631
631
|
messages: { label: "上下文/用户消息列表", desc: "", component: { type: "table", options: [
|
|
632
|
-
{ name: "role", label: "角色", type: "string", component:
|
|
632
|
+
{ name: "role", label: "角色", type: "string", component: t([{ label: "USER", value: "user" }, { label: "ASSISTANT", value: "assistant" }]) },
|
|
633
633
|
{ name: "content", label: "消息内容", type: "string", component: { type: "textarea" } }
|
|
634
634
|
] } },
|
|
635
635
|
images: { label: "图片列表", desc: "" },
|
|
@@ -667,7 +667,7 @@ const n = {
|
|
|
667
667
|
]) },
|
|
668
668
|
systemPrompt: { label: "系统提示", desc: "用于预先定义模型的基础行为框架和响应风格。可以使用${} 占位符变量", component: { type: "textarea" } },
|
|
669
669
|
messages: { label: "内置消息列表", desc: "输入消息没有 messages 字段时自动使用。", component: { type: "table", options: [
|
|
670
|
-
{ name: "role", label: "角色", type: "string", component:
|
|
670
|
+
{ name: "role", label: "角色", type: "string", component: t([{ label: "USER", value: "user" }, { label: "ASSISTANT", value: "assistant" }]) },
|
|
671
671
|
{ name: "content", label: "消息内容", type: "string", component: { type: "textarea" } }
|
|
672
672
|
] } },
|
|
673
673
|
images: { label: "图片列表", desc: "多模态模型输入图片列表" },
|
|
@@ -751,7 +751,7 @@ const n = {
|
|
|
751
751
|
"ai/indexer/redis": { label: "Redis索引", icon: "images/redis.svg", desc: "写入 Redis 向量索引。" },
|
|
752
752
|
"ai/retriever/milvus": { label: "Milvus检索", icon: "images/aiLlm.svg", desc: "从 Milvus 向量索引检索。" },
|
|
753
753
|
"ai/retriever/redis": { label: "Redis检索", icon: "images/redis.svg", desc: "从 Redis 向量索引检索。" }
|
|
754
|
-
},
|
|
754
|
+
}, h = {
|
|
755
755
|
"ci/gitClone": {
|
|
756
756
|
label: "Git拉取",
|
|
757
757
|
icon: "images/gitClone.svg",
|
|
@@ -820,7 +820,7 @@ const n = {
|
|
|
820
820
|
icon: "images/ssh.svg",
|
|
821
821
|
desc: "只执行系统白名单的命令。"
|
|
822
822
|
}
|
|
823
|
-
},
|
|
823
|
+
}, S = {
|
|
824
824
|
"x/modbus": {
|
|
825
825
|
label: "Modbus读写",
|
|
826
826
|
icon: "images/modbus.svg",
|
|
@@ -927,7 +927,7 @@ const n = {
|
|
|
927
927
|
startChar: { label: "起始字符", desc: "" },
|
|
928
928
|
splitTimeout: { label: "分割超时(毫秒)", desc: "" }
|
|
929
929
|
}
|
|
930
|
-
},
|
|
930
|
+
}, f = {
|
|
931
931
|
"x/streamAggregator": {
|
|
932
932
|
label: "流聚合器",
|
|
933
933
|
icon: "images/streamAggregator.svg",
|
|
@@ -948,7 +948,7 @@ const n = {
|
|
|
948
948
|
rules: [{ noTemplateVariables: !0, message: "SQL 不支持 ${} 占位符变量,请直接引用 msg 数据字段" }]
|
|
949
949
|
}
|
|
950
950
|
}
|
|
951
|
-
},
|
|
951
|
+
}, P = {
|
|
952
952
|
"endpoint/http": {
|
|
953
953
|
label: "HTTP",
|
|
954
954
|
icon: "images/rest.svg",
|
|
@@ -1102,7 +1102,7 @@ const n = {
|
|
|
1102
1102
|
label: "TCP/UDP",
|
|
1103
1103
|
icon: "images/net.svg",
|
|
1104
1104
|
desc: "TCP/UDP服务端点",
|
|
1105
|
-
protocol: { label: "协议", desc: "tcp/udp", component:
|
|
1105
|
+
protocol: { label: "协议", desc: "tcp/udp", component: t([{ label: "TCP", value: "tcp" }, { label: "UDP", value: "udp" }]) },
|
|
1106
1106
|
server: { ref: "primary", label: "监听地址", desc: "示例: :6335" },
|
|
1107
1107
|
readTimeout: { label: "读取超时(秒)", desc: "" },
|
|
1108
1108
|
encode: { label: "编码方式", desc: "" },
|
|
@@ -1244,7 +1244,7 @@ const n = {
|
|
|
1244
1244
|
icon: "images/net.svg",
|
|
1245
1245
|
desc: "TCP/UDP 客户端端点",
|
|
1246
1246
|
server: { ref: "primary", label: "服务地址", desc: "" },
|
|
1247
|
-
protocol: { label: "协议", desc: "tcp/udp", component:
|
|
1247
|
+
protocol: { label: "协议", desc: "tcp/udp", component: t([{ label: "TCP", value: "tcp" }, { label: "UDP", value: "udp" }]) },
|
|
1248
1248
|
connectTimeout: { label: "连接超时(秒)", desc: "" },
|
|
1249
1249
|
readTimeout: { label: "读取超时(秒)", desc: "" },
|
|
1250
1250
|
reconnectInterval: { label: "重连间隔(秒)", desc: "" },
|
|
@@ -1270,8 +1270,7 @@ const n = {
|
|
|
1270
1270
|
allowBinary: { label: "接收二进制消息", desc: "" },
|
|
1271
1271
|
router: { from: { path: { label: "路由正则表达式", desc: "* 表示匹配所有" } } }
|
|
1272
1272
|
}
|
|
1273
|
-
},
|
|
1274
|
-
...n,
|
|
1273
|
+
}, o = n({
|
|
1275
1274
|
...m,
|
|
1276
1275
|
...p,
|
|
1277
1276
|
...g,
|
|
@@ -1281,8 +1280,19 @@ const n = {
|
|
|
1281
1280
|
...T,
|
|
1282
1281
|
...h,
|
|
1283
1282
|
...S,
|
|
1284
|
-
...f
|
|
1285
|
-
|
|
1283
|
+
...f,
|
|
1284
|
+
...P
|
|
1285
|
+
}, r);
|
|
1286
|
+
for (const [l, c] of Object.entries({
|
|
1287
|
+
exec: "images/exec.svg",
|
|
1288
|
+
exprTransform: "images/exprTransform.svg",
|
|
1289
|
+
switch: "images/switch.svg",
|
|
1290
|
+
"x/luaFilter": "images/luaFilter.svg",
|
|
1291
|
+
"x/luaTransform": "images/luaTransform.svg",
|
|
1292
|
+
"x/redisPub": "images/redisPub.svg",
|
|
1293
|
+
"ci/gitClone": "images/gitClone.svg"
|
|
1294
|
+
}))
|
|
1295
|
+
o[l] = { ...o[l], icon: c };
|
|
1286
1296
|
export {
|
|
1287
|
-
|
|
1297
|
+
o as D
|
|
1288
1298
|
};
|