@digitalsee-ai/rcs 2.0.3-rc → 2.0.4-beta
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/components/digitalsee/workflow/NodesConfig/components/EditInOnlineIDE/index.d.ts +2 -1
- package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/fields/TextField/index.d.ts +4 -0
- package/dist/components/digitalsee/workflow/NodesConfig/components/online-ide/components/title/index.d.ts +3 -2
- package/dist/components/digitalsee/workflow/NodesConfig/components/online-ide/index.d.ts +2 -1
- package/dist/components/dynamic-form/components/ValueModeWrapper/index.d.ts +5 -1
- package/dist/components/dynamic-form/types/form-schema.d.ts +2 -0
- package/dist/{index-8OuPlj3E.mjs → index-B9JVnuFQ.mjs} +45234 -44665
- package/dist/{index-Dk9kFqym.mjs → index-DpXmOZ5U.mjs} +83 -77
- package/dist/locales/en-US/link/flow.d.ts +2 -0
- package/dist/locales/en-US.d.ts +2 -0
- package/dist/locales/zh-CN/link/flow.d.ts +2 -0
- package/dist/locales/zh-CN.d.ts +2 -0
- package/dist/locales/zh-TW/link/flow.d.ts +2 -0
- package/dist/locales/zh-TW.d.ts +2 -0
- package/dist/rcs.css +1 -1
- package/dist/rcs.es.js +1 -1
- package/dist/rcs.umd.js +88 -76
- package/package.json +2 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import { D as
|
|
3
|
-
import { useEventEmitter as B, useReactive as
|
|
4
|
-
import { FormattedMessage as
|
|
5
|
-
import { CloseCircleFilled as
|
|
6
|
-
import { Button as
|
|
7
|
-
import * as
|
|
8
|
-
import { useRef as I, useEffect as
|
|
9
|
-
import { createPortal as
|
|
10
|
-
import
|
|
11
|
-
const
|
|
12
|
-
modalContainer:
|
|
13
|
-
editorContainer:
|
|
14
|
-
sider:
|
|
1
|
+
import { jsx as t, jsxs as _ } from "react/jsx-runtime";
|
|
2
|
+
import { D as L, V as T, e as E, i as P, t as l, f as R, d as O } from "./index-B9JVnuFQ.mjs";
|
|
3
|
+
import { useEventEmitter as B, useReactive as A, useSize as W } from "ahooks";
|
|
4
|
+
import { FormattedMessage as b } from "react-intl";
|
|
5
|
+
import { CloseCircleFilled as H, CheckCircleFilled as G } from "@ant-design/icons";
|
|
6
|
+
import { Button as D } from "antd";
|
|
7
|
+
import * as K from "monaco-editor";
|
|
8
|
+
import { useRef as I, useEffect as M } from "react";
|
|
9
|
+
import { createPortal as z } from "react-dom";
|
|
10
|
+
import q from "react-monaco-editor";
|
|
11
|
+
const U = "_modalContainer_1ajlo_5", J = "_editorContainer_1ajlo_16", Q = "_sider_1ajlo_25", X = "_main_1ajlo_34", Y = "_header_1ajlo_40", Z = "_editor_1ajlo_16", w = {
|
|
12
|
+
modalContainer: U,
|
|
13
|
+
editorContainer: J,
|
|
14
|
+
sider: Q,
|
|
15
15
|
main: X,
|
|
16
16
|
header: Y,
|
|
17
17
|
editor: Z
|
|
@@ -21,37 +21,43 @@ const G = "_modalContainer_1ajlo_5", Q = "_editorContainer_1ajlo_16", U = "_side
|
|
|
21
21
|
const { nodeId: i, onInsert: o, open: c } = e, s = B();
|
|
22
22
|
return s.useSubscription((a) => {
|
|
23
23
|
a.type === "insert" && o(a.expression);
|
|
24
|
-
}), /* @__PURE__ */ t(
|
|
24
|
+
}), /* @__PURE__ */ t(L.Provider, { value: { event$: s }, children: /* @__PURE__ */ t("div", { className: ne.ideWrapper, children: /* @__PURE__ */ t(T, { nodeId: i, onInsert: o, open: c }) }) });
|
|
25
25
|
}, ie = "_siderContainer_fhkbn_1", oe = {
|
|
26
26
|
siderContainer: ie
|
|
27
27
|
};
|
|
28
28
|
function re(e) {
|
|
29
29
|
return /* @__PURE__ */ t("div", { className: oe.siderContainer, children: /* @__PURE__ */ t(te, { open: e.open, nodeId: e.nodeId, onInsert: e.onInsert }) });
|
|
30
30
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
const se = {
|
|
32
|
+
javascript: "link.flow.code_editor_language_javascript",
|
|
33
|
+
json: "link.flow.code_editor_language_json"
|
|
34
|
+
};
|
|
35
|
+
function ae({ language: e = "javascript" }) {
|
|
36
|
+
return /* @__PURE__ */ _("h2", { id: "workflow-online-ide-title", className: "workflow-online-ide-title", children: [
|
|
37
|
+
/* @__PURE__ */ t(b, { id: "link.flow.code_editor" }),
|
|
38
|
+
" (",
|
|
39
|
+
/* @__PURE__ */ t(b, { id: se[e] }),
|
|
40
|
+
")"
|
|
35
41
|
] });
|
|
36
42
|
}
|
|
37
|
-
function
|
|
38
|
-
return /* @__PURE__ */
|
|
39
|
-
/* @__PURE__ */ t(
|
|
40
|
-
/* @__PURE__ */ t(
|
|
43
|
+
function le(e) {
|
|
44
|
+
return /* @__PURE__ */ _("div", { className: "workflow-online-ide-toolbar", children: [
|
|
45
|
+
/* @__PURE__ */ t(D, { size: "small", onClick: e.onCancel, icon: /* @__PURE__ */ t(H, {}), children: /* @__PURE__ */ t(b, { id: "app.common.word.cancel" }) }),
|
|
46
|
+
/* @__PURE__ */ t(D, { type: "primary", size: "small", onClick: e.onFinish, icon: /* @__PURE__ */ t(G, {}), children: /* @__PURE__ */ t(b, { id: "app.common.word.finish" }) })
|
|
41
47
|
] });
|
|
42
48
|
}
|
|
43
|
-
const
|
|
49
|
+
const de = [{ trigger: "log", content: "console.log('$1');$2", desc: "输出日志" }, { trigger: "imp", content: "import $1 from '$2';$3" }, { trigger: "loop", content: `for (let $1=0; i< $2.length;i++) {
|
|
44
50
|
|
|
45
|
-
}`, desc: "循环操作" }],
|
|
46
|
-
snippets:
|
|
47
|
-
},
|
|
51
|
+
}`, desc: "循环操作" }], ce = {
|
|
52
|
+
snippets: de
|
|
53
|
+
}, ue = {
|
|
48
54
|
selectOnLineNumbers: !0,
|
|
49
55
|
automaticLayout: !0,
|
|
50
56
|
padding: {
|
|
51
57
|
top: 10
|
|
52
58
|
}
|
|
53
59
|
};
|
|
54
|
-
function
|
|
60
|
+
function ge(e) {
|
|
55
61
|
if (e.type === "global")
|
|
56
62
|
return [
|
|
57
63
|
`**${l("link.flow.variable_type_global")}**`,
|
|
@@ -83,7 +89,7 @@ function ue(e) {
|
|
|
83
89
|
|
|
84
90
|
`);
|
|
85
91
|
}
|
|
86
|
-
const
|
|
92
|
+
const fe = (e) => ({
|
|
87
93
|
code: e.code,
|
|
88
94
|
severity: e.severity,
|
|
89
95
|
message: e.message,
|
|
@@ -97,7 +103,7 @@ const ge = (e) => ({
|
|
|
97
103
|
tags: e.tags
|
|
98
104
|
});
|
|
99
105
|
function N(e, i) {
|
|
100
|
-
const o =
|
|
106
|
+
const o = E(i.getValue());
|
|
101
107
|
if (!o.length)
|
|
102
108
|
return;
|
|
103
109
|
const c = e.editor.getModelMarkers({ resource: i.uri }), s = /* @__PURE__ */ new Map();
|
|
@@ -106,9 +112,9 @@ function N(e, i) {
|
|
|
106
112
|
d.push(a), s.set(a.owner, d);
|
|
107
113
|
}), s.forEach((a, d) => {
|
|
108
114
|
const u = a.filter(
|
|
109
|
-
(g) => !o.some((
|
|
115
|
+
(g) => !o.some((y) => O(y, g))
|
|
110
116
|
);
|
|
111
|
-
u.length !== a.length && e.editor.setModelMarkers(i, d, u.map(
|
|
117
|
+
u.length !== a.length && e.editor.setModelMarkers(i, d, u.map(fe));
|
|
112
118
|
});
|
|
113
119
|
}
|
|
114
120
|
function pe(e, i) {
|
|
@@ -130,7 +136,7 @@ function pe(e, i) {
|
|
|
130
136
|
// 触发提示的字符 可以定义多个
|
|
131
137
|
});
|
|
132
138
|
}
|
|
133
|
-
function
|
|
139
|
+
function me(e) {
|
|
134
140
|
return e.languages.typescript.javascriptDefaults.setDiagnosticsOptions({
|
|
135
141
|
noSemanticValidation: !0,
|
|
136
142
|
noSyntaxValidation: !1
|
|
@@ -139,7 +145,7 @@ function fe(e) {
|
|
|
139
145
|
allowNonTsExtensions: !0
|
|
140
146
|
}), e.languages.registerCompletionItemProvider("javascript", {
|
|
141
147
|
provideCompletionItems: () => ({
|
|
142
|
-
suggestions:
|
|
148
|
+
suggestions: ce.snippets.map((o) => ({
|
|
143
149
|
label: o.trigger,
|
|
144
150
|
kind: e.languages.CompletionItemKind.Method,
|
|
145
151
|
detail: o.desc ?? "",
|
|
@@ -150,61 +156,61 @@ function fe(e) {
|
|
|
150
156
|
});
|
|
151
157
|
}
|
|
152
158
|
function $e(e) {
|
|
153
|
-
const { open: i, nodeId: o, initialValue: c, language: s = "javascript", showVariableSidebar: a = !0 } = e, d = I(null), u = I([]), g =
|
|
159
|
+
const { open: i, nodeId: o, initialValue: c, language: s = "javascript", showVariableSidebar: a = !0 } = e, d = I(null), u = I([]), g = A({
|
|
154
160
|
code: "",
|
|
155
|
-
range: new
|
|
156
|
-
}),
|
|
157
|
-
n.onDidChangeCursorPosition((
|
|
158
|
-
const m =
|
|
159
|
-
g.range = new r.Range(
|
|
161
|
+
range: new K.Range(1, 1, 1, 1)
|
|
162
|
+
}), y = (n, r) => {
|
|
163
|
+
n.onDidChangeCursorPosition((f) => {
|
|
164
|
+
const m = f.position, { lineNumber: p = 0, column: C = 0 } = m;
|
|
165
|
+
g.range = new r.Range(p, C, p, C);
|
|
160
166
|
}), d.current = n, n.focus(), g.code = n.getValue();
|
|
161
|
-
const
|
|
162
|
-
provideHover: (
|
|
163
|
-
const h =
|
|
167
|
+
const x = r.languages.registerHoverProvider(s, {
|
|
168
|
+
provideHover: (f, m) => new Promise((p) => {
|
|
169
|
+
const h = E(f.getValue()).find(
|
|
164
170
|
(F) => P(F, m.lineNumber, m.column)
|
|
165
171
|
);
|
|
166
172
|
if (!h) {
|
|
167
|
-
|
|
173
|
+
p(null);
|
|
168
174
|
return;
|
|
169
175
|
}
|
|
170
|
-
|
|
176
|
+
p({
|
|
171
177
|
range: new r.Range(
|
|
172
178
|
h.startLine,
|
|
173
179
|
h.startColumn,
|
|
174
180
|
h.endLine,
|
|
175
181
|
h.endColumn
|
|
176
182
|
),
|
|
177
|
-
contents: [{ value:
|
|
183
|
+
contents: [{ value: ge(h) }]
|
|
178
184
|
});
|
|
179
185
|
})
|
|
180
|
-
}),
|
|
181
|
-
if (
|
|
182
|
-
let
|
|
183
|
-
const m = r.editor.onDidChangeMarkers((
|
|
184
|
-
|
|
186
|
+
}), v = n.getModel();
|
|
187
|
+
if (v) {
|
|
188
|
+
let f = !1;
|
|
189
|
+
const m = r.editor.onDidChangeMarkers((p) => {
|
|
190
|
+
f || !p.some((C) => C.toString() === v.uri.toString()) || (f = !0, window.setTimeout(() => {
|
|
185
191
|
try {
|
|
186
|
-
N(r,
|
|
192
|
+
N(r, v);
|
|
187
193
|
} finally {
|
|
188
|
-
|
|
194
|
+
f = !1;
|
|
189
195
|
}
|
|
190
196
|
}, 0));
|
|
191
197
|
});
|
|
192
|
-
N(r,
|
|
198
|
+
N(r, v), n.onDidDispose(() => m.dispose());
|
|
193
199
|
}
|
|
194
|
-
n.onDidDispose(() =>
|
|
195
|
-
},
|
|
200
|
+
n.onDidDispose(() => x.dispose());
|
|
201
|
+
}, V = (n) => {
|
|
196
202
|
u.current.forEach((r) => {
|
|
197
203
|
r.dispose();
|
|
198
|
-
}), u.current = [pe(n, s)], s === "javascript" && u.current.push(
|
|
204
|
+
}), u.current = [pe(n, s)], s === "javascript" && u.current.push(me(n));
|
|
199
205
|
};
|
|
200
|
-
|
|
206
|
+
M(
|
|
201
207
|
() => () => {
|
|
202
208
|
u.current.forEach((n) => {
|
|
203
209
|
n.dispose();
|
|
204
210
|
}), u.current = [];
|
|
205
211
|
},
|
|
206
212
|
[]
|
|
207
|
-
),
|
|
213
|
+
), M(() => {
|
|
208
214
|
if (!i)
|
|
209
215
|
return;
|
|
210
216
|
const n = (r) => {
|
|
@@ -212,7 +218,7 @@ function $e(e) {
|
|
|
212
218
|
};
|
|
213
219
|
return window.addEventListener("keydown", n), () => window.removeEventListener("keydown", n);
|
|
214
220
|
}, [i, e.onCancel]);
|
|
215
|
-
const
|
|
221
|
+
const S = (n) => {
|
|
216
222
|
const r = [
|
|
217
223
|
{
|
|
218
224
|
range: g.range,
|
|
@@ -221,51 +227,51 @@ function $e(e) {
|
|
|
221
227
|
}
|
|
222
228
|
];
|
|
223
229
|
d.current && g.range && d.current.executeEdits("my-source", r);
|
|
224
|
-
},
|
|
230
|
+
}, $ = () => {
|
|
225
231
|
var n;
|
|
226
232
|
(n = e.onFinish) == null || n.call(e, g.code);
|
|
227
|
-
},
|
|
228
|
-
return
|
|
233
|
+
}, j = I(null), k = W(j);
|
|
234
|
+
return z(
|
|
229
235
|
/* @__PURE__ */ t(
|
|
230
236
|
"div",
|
|
231
237
|
{
|
|
232
238
|
className: w.modalContainer,
|
|
233
|
-
ref:
|
|
239
|
+
ref: j,
|
|
234
240
|
style: { display: i ? "flex" : "none" },
|
|
235
241
|
role: "dialog",
|
|
236
242
|
"aria-modal": "true",
|
|
237
243
|
"aria-labelledby": "workflow-online-ide-title",
|
|
238
|
-
children: /* @__PURE__ */
|
|
244
|
+
children: /* @__PURE__ */ _("div", { className: w.editorContainer, id: "javascript-code-editor", children: [
|
|
239
245
|
a ? /* @__PURE__ */ t("div", { className: w.sider, style: { maxWidth: "20%", padding: 0 }, children: /* @__PURE__ */ t(
|
|
240
246
|
re,
|
|
241
247
|
{
|
|
242
248
|
onCancel: e.onCancel,
|
|
243
|
-
onFinish:
|
|
249
|
+
onFinish: $,
|
|
244
250
|
editor: d.current,
|
|
245
251
|
nodeId: o,
|
|
246
252
|
open: i,
|
|
247
|
-
onInsert:
|
|
253
|
+
onInsert: S
|
|
248
254
|
}
|
|
249
255
|
) }) : null,
|
|
250
|
-
/* @__PURE__ */
|
|
251
|
-
/* @__PURE__ */
|
|
252
|
-
/* @__PURE__ */ t(
|
|
253
|
-
/* @__PURE__ */ t(
|
|
256
|
+
/* @__PURE__ */ _("div", { className: w.main, children: [
|
|
257
|
+
/* @__PURE__ */ _("div", { className: w.header, children: [
|
|
258
|
+
/* @__PURE__ */ t(ae, { language: s }),
|
|
259
|
+
/* @__PURE__ */ t(le, { onCancel: e.onCancel, onFinish: $ })
|
|
254
260
|
] }),
|
|
255
261
|
/* @__PURE__ */ t("div", { className: w.editor, children: /* @__PURE__ */ t(
|
|
256
|
-
|
|
262
|
+
q,
|
|
257
263
|
{
|
|
258
264
|
width: "100%",
|
|
259
|
-
height: ((
|
|
265
|
+
height: ((k == null ? void 0 : k.height) ?? 0) - 40,
|
|
260
266
|
language: s,
|
|
261
267
|
theme: "vs-dark",
|
|
262
268
|
value: c,
|
|
263
|
-
options:
|
|
269
|
+
options: ue,
|
|
264
270
|
onChange: (n) => {
|
|
265
271
|
g.code = n;
|
|
266
272
|
},
|
|
267
|
-
editorWillMount:
|
|
268
|
-
editorDidMount:
|
|
273
|
+
editorWillMount: V,
|
|
274
|
+
editorDidMount: y
|
|
269
275
|
},
|
|
270
276
|
o
|
|
271
277
|
) })
|
|
@@ -279,4 +285,4 @@ function $e(e) {
|
|
|
279
285
|
export {
|
|
280
286
|
$e as default
|
|
281
287
|
};
|
|
282
|
-
//# sourceMappingURL=index-
|
|
288
|
+
//# sourceMappingURL=index-DpXmOZ5U.mjs.map
|
|
@@ -69,6 +69,8 @@ declare const _default: {
|
|
|
69
69
|
'link.flow.loop_node_output': string;
|
|
70
70
|
'link.flow.not_selected': string;
|
|
71
71
|
'link.flow.code_editor': string;
|
|
72
|
+
'link.flow.code_editor_language_javascript': string;
|
|
73
|
+
'link.flow.code_editor_language_json': string;
|
|
72
74
|
'link.flow.open_code_editor': string;
|
|
73
75
|
'link.flow.format_json': string;
|
|
74
76
|
'link.flow.format_json_failed': string;
|
package/dist/locales/en-US.d.ts
CHANGED
|
@@ -69,6 +69,8 @@ declare const _default: {
|
|
|
69
69
|
'link.flow.loop_node_output': string;
|
|
70
70
|
'link.flow.not_selected': string;
|
|
71
71
|
'link.flow.code_editor': string;
|
|
72
|
+
'link.flow.code_editor_language_javascript': string;
|
|
73
|
+
'link.flow.code_editor_language_json': string;
|
|
72
74
|
'link.flow.open_code_editor': string;
|
|
73
75
|
'link.flow.format_json': string;
|
|
74
76
|
'link.flow.format_json_failed': string;
|
|
@@ -69,6 +69,8 @@ declare const _default: {
|
|
|
69
69
|
'link.flow.loop_node_output': string;
|
|
70
70
|
'link.flow.not_selected': string;
|
|
71
71
|
'link.flow.code_editor': string;
|
|
72
|
+
'link.flow.code_editor_language_javascript': string;
|
|
73
|
+
'link.flow.code_editor_language_json': string;
|
|
72
74
|
'link.flow.open_code_editor': string;
|
|
73
75
|
'link.flow.format_json': string;
|
|
74
76
|
'link.flow.format_json_failed': string;
|
package/dist/locales/zh-CN.d.ts
CHANGED
|
@@ -69,6 +69,8 @@ declare const _default: {
|
|
|
69
69
|
'link.flow.loop_node_output': string;
|
|
70
70
|
'link.flow.not_selected': string;
|
|
71
71
|
'link.flow.code_editor': string;
|
|
72
|
+
'link.flow.code_editor_language_javascript': string;
|
|
73
|
+
'link.flow.code_editor_language_json': string;
|
|
72
74
|
'link.flow.open_code_editor': string;
|
|
73
75
|
'link.flow.format_json': string;
|
|
74
76
|
'link.flow.format_json_failed': string;
|
|
@@ -69,6 +69,8 @@ declare const _default: {
|
|
|
69
69
|
'link.flow.loop_node_output': string;
|
|
70
70
|
'link.flow.not_selected': string;
|
|
71
71
|
'link.flow.code_editor': string;
|
|
72
|
+
'link.flow.code_editor_language_javascript': string;
|
|
73
|
+
'link.flow.code_editor_language_json': string;
|
|
72
74
|
'link.flow.open_code_editor': string;
|
|
73
75
|
'link.flow.format_json': string;
|
|
74
76
|
'link.flow.format_json_failed': string;
|
package/dist/locales/zh-TW.d.ts
CHANGED
|
@@ -69,6 +69,8 @@ declare const _default: {
|
|
|
69
69
|
'link.flow.loop_node_output': string;
|
|
70
70
|
'link.flow.not_selected': string;
|
|
71
71
|
'link.flow.code_editor': string;
|
|
72
|
+
'link.flow.code_editor_language_javascript': string;
|
|
73
|
+
'link.flow.code_editor_language_json': string;
|
|
72
74
|
'link.flow.open_code_editor': string;
|
|
73
75
|
'link.flow.format_json': string;
|
|
74
76
|
'link.flow.format_json_failed': string;
|