@flowgram.ai/form-materials 0.5.5 → 0.5.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/cjs/components/batch-outputs/index.js +5 -3
- package/dist/cjs/components/batch-outputs/styles.css +13 -0
- package/dist/cjs/components/code-editor/editor.js +16 -12
- package/dist/cjs/components/code-editor/styles.css +4 -0
- package/dist/cjs/components/code-editor-mini/index.js +2 -16
- package/dist/cjs/components/condition-row/index.js +14 -12
- package/dist/cjs/components/condition-row/styles.css +19 -0
- package/dist/cjs/components/coze-editor-extensions/extensions/variable-tag.js +28 -10
- package/dist/{esm/components/coze-editor-extensions/styles.mjs → cjs/components/coze-editor-extensions/styles.css} +19 -18
- package/dist/cjs/components/db-condition-row/index.js +16 -13
- package/dist/cjs/components/db-condition-row/styles.css +30 -0
- package/dist/cjs/components/display-inputs-values/index.js +3 -2
- package/dist/cjs/components/display-inputs-values/styles.css +6 -0
- package/dist/cjs/components/display-outputs/index.js +3 -2
- package/dist/cjs/components/display-outputs/styles.css +6 -0
- package/dist/cjs/components/display-schema-tag/index.js +7 -4
- package/dist/cjs/components/display-schema-tag/styles.css +21 -0
- package/dist/cjs/components/display-schema-tree/index.js +12 -7
- package/dist/cjs/components/display-schema-tree/styles.css +64 -0
- package/dist/cjs/components/dynamic-value-input/index.js +9 -5
- package/dist/{esm/components/dynamic-value-input/styles.mjs → cjs/components/dynamic-value-input/styles.css} +23 -30
- package/dist/cjs/components/inputs-values/index.js +5 -3
- package/dist/cjs/components/inputs-values/styles.css +13 -0
- package/dist/cjs/components/inputs-values-tree/icon.js +70 -0
- package/dist/cjs/components/inputs-values-tree/index.js +3 -2
- package/dist/cjs/components/inputs-values-tree/row.js +19 -15
- package/dist/cjs/components/inputs-values-tree/styles.css +85 -0
- package/dist/cjs/components/json-schema-editor/default-value.js +2 -2
- package/dist/cjs/components/json-schema-editor/icon.js +70 -0
- package/dist/cjs/components/json-schema-editor/index.js +37 -25
- package/dist/cjs/components/json-schema-editor/styles.css +113 -0
- package/dist/cjs/components/prompt-editor/editor.js +16 -6
- package/dist/cjs/components/prompt-editor/styles.css +10 -0
- package/dist/cjs/components/prompt-editor-with-inputs/index.js +16 -26
- package/dist/cjs/components/prompt-editor-with-variables/index.js +17 -26
- package/dist/cjs/components/variable-selector/context.js +7 -3
- package/dist/cjs/components/variable-selector/index.js +16 -10
- package/dist/{esm/components/variable-selector/styles.mjs → cjs/components/variable-selector/styles.css} +37 -29
- package/dist/cjs/components/variable-selector/use-variable-tree.js +3 -1
- package/dist/esm/components/batch-outputs/index.mjs +5 -3
- package/dist/esm/components/batch-outputs/styles.css +13 -0
- package/dist/esm/components/code-editor/editor.mjs +16 -11
- package/dist/esm/components/code-editor/styles.css +4 -0
- package/dist/esm/components/code-editor-mini/index.mjs +2 -6
- package/dist/esm/components/condition-row/index.mjs +14 -12
- package/dist/esm/components/condition-row/styles.css +19 -0
- package/dist/esm/components/coze-editor-extensions/extensions/variable-tag.mjs +29 -11
- package/dist/esm/components/coze-editor-extensions/styles.css +37 -0
- package/dist/esm/components/db-condition-row/index.mjs +16 -13
- package/dist/esm/components/db-condition-row/styles.css +30 -0
- package/dist/esm/components/display-inputs-values/index.mjs +3 -2
- package/dist/esm/components/display-inputs-values/styles.css +6 -0
- package/dist/esm/components/display-outputs/index.mjs +3 -2
- package/dist/esm/components/display-outputs/styles.css +6 -0
- package/dist/esm/components/display-schema-tag/index.mjs +8 -5
- package/dist/esm/components/display-schema-tag/styles.css +21 -0
- package/dist/esm/components/display-schema-tree/index.mjs +12 -7
- package/dist/esm/components/display-schema-tree/styles.css +64 -0
- package/dist/esm/components/dynamic-value-input/index.mjs +9 -5
- package/dist/esm/components/dynamic-value-input/styles.css +48 -0
- package/dist/esm/components/inputs-values/index.mjs +5 -3
- package/dist/esm/components/inputs-values/styles.css +13 -0
- package/dist/esm/components/inputs-values-tree/icon.mjs +26 -0
- package/dist/esm/components/inputs-values-tree/index.mjs +3 -2
- package/dist/esm/components/inputs-values-tree/row.mjs +18 -14
- package/dist/esm/components/inputs-values-tree/styles.css +85 -0
- package/dist/esm/components/json-schema-editor/default-value.mjs +2 -2
- package/dist/esm/components/json-schema-editor/icon.mjs +26 -0
- package/dist/esm/components/json-schema-editor/index.mjs +36 -24
- package/dist/esm/components/json-schema-editor/styles.css +113 -0
- package/dist/esm/components/prompt-editor/editor.mjs +16 -6
- package/dist/esm/components/prompt-editor/styles.css +10 -0
- package/dist/esm/components/prompt-editor-with-inputs/index.mjs +12 -4
- package/dist/esm/components/prompt-editor-with-variables/index.mjs +13 -4
- package/dist/esm/components/variable-selector/context.mjs +7 -3
- package/dist/esm/components/variable-selector/index.mjs +17 -11
- package/{src/components/variable-selector/styles.tsx → dist/esm/components/variable-selector/styles.css} +35 -38
- package/dist/esm/components/variable-selector/use-variable-tree.mjs +3 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/components/batch-outputs/index.d.ts +1 -0
- package/dist/types/components/code-editor/editor.d.ts +1 -0
- package/dist/types/components/condition-row/index.d.ts +5 -1
- package/dist/types/components/coze-editor-extensions/extensions/variable-tag.d.ts +1 -0
- package/dist/types/components/db-condition-row/index.d.ts +4 -0
- package/dist/types/components/db-condition-row/types.d.ts +0 -1
- package/dist/types/components/display-inputs-values/index.d.ts +1 -0
- package/dist/types/components/display-outputs/index.d.ts +1 -0
- package/dist/types/components/display-schema-tag/index.d.ts +1 -0
- package/dist/types/components/display-schema-tree/index.d.ts +1 -0
- package/dist/types/components/dynamic-value-input/index.d.ts +1 -0
- package/dist/types/components/inputs-values/index.d.ts +1 -0
- package/dist/types/components/inputs-values-tree/icon.d.ts +6 -0
- package/dist/types/components/inputs-values-tree/index.d.ts +1 -0
- package/dist/types/components/inputs-values-tree/row.d.ts +1 -0
- package/dist/types/components/json-schema-editor/icon.d.ts +6 -0
- package/dist/types/components/json-schema-editor/index.d.ts +1 -0
- package/dist/types/components/prompt-editor/editor.d.ts +1 -0
- package/dist/types/components/prompt-editor-with-inputs/index.d.ts +7 -2
- package/dist/types/components/prompt-editor-with-variables/index.d.ts +5 -2
- package/dist/types/components/variable-selector/context.d.ts +16 -3
- package/dist/types/components/variable-selector/index.d.ts +1 -0
- package/package.json +7 -10
- package/src/components/batch-outputs/index.tsx +5 -5
- package/src/components/batch-outputs/{styles.tsx → styles.css} +4 -6
- package/src/components/code-editor/editor.tsx +19 -14
- package/src/components/code-editor/styles.css +11 -0
- package/src/components/code-editor-mini/index.tsx +2 -9
- package/src/components/condition-row/index.tsx +15 -22
- package/src/components/condition-row/{styles.tsx → styles.css} +10 -11
- package/src/components/coze-editor-extensions/extensions/variable-tag.tsx +18 -13
- package/src/components/coze-editor-extensions/{styles.tsx → styles.css} +8 -11
- package/src/components/db-condition-row/index.tsx +17 -26
- package/src/components/db-condition-row/{styles.tsx → styles.css} +14 -16
- package/src/components/db-condition-row/types.ts +0 -1
- package/src/components/display-inputs-values/index.tsx +3 -3
- package/src/components/display-inputs-values/{styles.ts → styles.css} +2 -4
- package/src/components/display-outputs/index.tsx +3 -3
- package/src/components/display-outputs/{styles.ts → styles.css} +2 -4
- package/src/components/display-schema-tag/index.tsx +7 -7
- package/src/components/display-schema-tag/{styles.ts → styles.css} +7 -10
- package/src/components/display-schema-tree/index.tsx +10 -10
- package/src/components/display-schema-tree/{styles.tsx → styles.css} +18 -24
- package/src/components/dynamic-value-input/index.tsx +6 -6
- package/src/components/dynamic-value-input/{styles.tsx → styles.css} +8 -12
- package/src/components/inputs-values/index.tsx +5 -5
- package/src/components/inputs-values/{styles.tsx → styles.css} +4 -6
- package/src/components/inputs-values-tree/icon.tsx +28 -0
- package/src/components/inputs-values-tree/index.tsx +3 -3
- package/src/components/inputs-values-tree/row.tsx +25 -27
- package/src/components/inputs-values-tree/styles.css +94 -0
- package/src/components/json-schema-editor/default-value.tsx +2 -4
- package/src/components/json-schema-editor/icon.tsx +28 -0
- package/src/components/json-schema-editor/index.tsx +45 -50
- package/src/components/json-schema-editor/styles.css +135 -0
- package/src/components/prompt-editor/editor.tsx +18 -7
- package/src/components/prompt-editor/styles.css +14 -0
- package/src/components/prompt-editor-with-inputs/index.tsx +18 -5
- package/src/components/prompt-editor-with-variables/index.tsx +13 -5
- package/src/components/variable-selector/context.tsx +22 -2
- package/src/components/variable-selector/index.tsx +24 -14
- package/src/components/variable-selector/styles.css +70 -0
- package/src/components/variable-selector/use-variable-tree.tsx +9 -1
- package/dist/cjs/components/batch-outputs/styles.js +0 -60
- package/dist/cjs/components/condition-row/styles.js +0 -78
- package/dist/cjs/components/coze-editor-extensions/styles.js +0 -89
- package/dist/cjs/components/db-condition-row/styles.js +0 -94
- package/dist/cjs/components/display-inputs-values/styles.js +0 -51
- package/dist/cjs/components/display-outputs/styles.js +0 -51
- package/dist/cjs/components/display-schema-tag/styles.js +0 -71
- package/dist/cjs/components/display-schema-tree/styles.js +0 -135
- package/dist/cjs/components/dynamic-value-input/styles.js +0 -108
- package/dist/cjs/components/inputs-values/styles.js +0 -60
- package/dist/cjs/components/inputs-values-tree/styles.js +0 -177
- package/dist/cjs/components/json-schema-editor/styles.js +0 -231
- package/dist/cjs/components/prompt-editor/styles.js +0 -55
- package/dist/cjs/components/prompt-editor-with-inputs/editor.js +0 -47
- package/dist/cjs/components/prompt-editor-with-variables/editor.js +0 -48
- package/dist/cjs/components/variable-selector/styles.js +0 -114
- package/dist/esm/components/batch-outputs/styles.mjs +0 -13
- package/dist/esm/components/condition-row/styles.mjs +0 -22
- package/dist/esm/components/db-condition-row/styles.mjs +0 -32
- package/dist/esm/components/display-inputs-values/styles.mjs +0 -7
- package/dist/esm/components/display-outputs/styles.mjs +0 -7
- package/dist/esm/components/display-schema-tag/styles.mjs +0 -21
- package/dist/esm/components/display-schema-tree/styles.mjs +0 -79
- package/dist/esm/components/inputs-values/styles.mjs +0 -13
- package/dist/esm/components/inputs-values-tree/styles.mjs +0 -105
- package/dist/esm/components/json-schema-editor/styles.mjs +0 -138
- package/dist/esm/components/prompt-editor/styles.mjs +0 -11
- package/dist/esm/components/prompt-editor-with-inputs/editor.mjs +0 -13
- package/dist/esm/components/prompt-editor-with-variables/editor.mjs +0 -14
- package/dist/types/components/batch-outputs/styles.d.ts +0 -6
- package/dist/types/components/condition-row/styles.d.ts +0 -9
- package/dist/types/components/coze-editor-extensions/styles.d.ts +0 -9
- package/dist/types/components/db-condition-row/styles.d.ts +0 -12
- package/dist/types/components/display-inputs-values/styles.d.ts +0 -5
- package/dist/types/components/display-outputs/styles.d.ts +0 -5
- package/dist/types/components/display-schema-tag/styles.d.ts +0 -8
- package/dist/types/components/display-schema-tree/styles.d.ts +0 -11
- package/dist/types/components/dynamic-value-input/styles.d.ts +0 -8
- package/dist/types/components/inputs-values/styles.d.ts +0 -6
- package/dist/types/components/inputs-values-tree/styles.d.ts +0 -23
- package/dist/types/components/json-schema-editor/styles.d.ts +0 -30
- package/dist/types/components/prompt-editor/styles.d.ts +0 -7
- package/dist/types/components/prompt-editor-with-inputs/editor.d.ts +0 -11
- package/dist/types/components/prompt-editor-with-variables/editor.d.ts +0 -9
- package/dist/types/components/variable-selector/styles.d.ts +0 -14
- package/src/components/inputs-values-tree/styles.tsx +0 -128
- package/src/components/json-schema-editor/styles.tsx +0 -168
- package/src/components/prompt-editor/styles.tsx +0 -18
- package/src/components/prompt-editor-with-inputs/editor.tsx +0 -25
- package/src/components/prompt-editor-with-variables/editor.tsx +0 -20
|
@@ -33,15 +33,17 @@ const semi_ui_namespaceObject = require("@douyinfe/semi-ui");
|
|
|
33
33
|
const semi_icons_namespaceObject = require("@douyinfe/semi-icons");
|
|
34
34
|
const index_js_namespaceObject = require("../../hooks/index.js");
|
|
35
35
|
const external_variable_selector_index_js_namespaceObject = require("../variable-selector/index.js");
|
|
36
|
-
|
|
36
|
+
require("./styles.css");
|
|
37
37
|
function BatchOutputs(props) {
|
|
38
38
|
const { readonly, style } = props;
|
|
39
39
|
const { list, add, updateKey, updateValue, remove } = (0, index_js_namespaceObject.useObjectList)(props);
|
|
40
40
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
41
41
|
children: [
|
|
42
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
42
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
43
|
+
className: "gedit-m-batch-outputs-rows",
|
|
43
44
|
style: style,
|
|
44
|
-
children: list.map((item)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(
|
|
45
|
+
children: list.map((item)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
46
|
+
className: "gedit-m-batch-outputs-row",
|
|
45
47
|
children: [
|
|
46
48
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(semi_ui_namespaceObject.Input, {
|
|
47
49
|
style: {
|
|
@@ -37,13 +37,12 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
37
37
|
});
|
|
38
38
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
39
39
|
const external_react_namespaceObject = require("react");
|
|
40
|
-
const external_styled_components_namespaceObject = require("styled-components");
|
|
41
|
-
var external_styled_components_default = /*#__PURE__*/ __webpack_require__.n(external_styled_components_namespaceObject);
|
|
42
40
|
const react_namespaceObject = require("@flowgram.ai/coze-editor/react");
|
|
43
41
|
const preset_code_namespaceObject = require("@flowgram.ai/coze-editor/preset-code");
|
|
44
42
|
var preset_code_default = /*#__PURE__*/ __webpack_require__.n(preset_code_namespaceObject);
|
|
45
43
|
const view_namespaceObject = require("@codemirror/view");
|
|
46
44
|
const external_utils_js_namespaceObject = require("./utils.js");
|
|
45
|
+
require("./styles.css");
|
|
47
46
|
const OriginCodeEditor = (0, react_namespaceObject.createRenderer)(preset_code_default(), [
|
|
48
47
|
view_namespaceObject.EditorView.theme({
|
|
49
48
|
'&.cm-focused': {
|
|
@@ -51,23 +50,28 @@ const OriginCodeEditor = (0, react_namespaceObject.createRenderer)(preset_code_d
|
|
|
51
50
|
}
|
|
52
51
|
})
|
|
53
52
|
]);
|
|
54
|
-
const UIContainer = external_styled_components_default().div`
|
|
55
|
-
${({ $mini })=>$mini && (0, external_styled_components_namespaceObject.css)`
|
|
56
|
-
height: 24px;
|
|
57
|
-
`}
|
|
58
|
-
`;
|
|
59
53
|
function BaseCodeEditor({ value, onChange, languageId = 'python', theme = 'light', children, placeholder, activeLinePlaceholder, options, readonly, mini }) {
|
|
60
54
|
const editorRef = (0, external_react_namespaceObject.useRef)(null);
|
|
55
|
+
const editorValue = String(value || '');
|
|
61
56
|
(0, external_react_namespaceObject.useEffect)(()=>{
|
|
62
|
-
if (editorRef.current?.getValue() !==
|
|
57
|
+
if (editorRef.current?.getValue() !== editorValue) {
|
|
58
|
+
const editorView = editorRef.current?.$view;
|
|
59
|
+
editorView?.dispatch({
|
|
60
|
+
changes: {
|
|
61
|
+
from: 0,
|
|
62
|
+
to: editorView?.state.doc.length,
|
|
63
|
+
insert: editorValue
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
}
|
|
63
67
|
}, [
|
|
64
|
-
|
|
68
|
+
editorValue
|
|
65
69
|
]);
|
|
66
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
67
|
-
$mini:
|
|
70
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
71
|
+
className: `gedit-m-code-editor-container ${mini ? 'mini' : ''}`,
|
|
68
72
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_namespaceObject.EditorProvider, {
|
|
69
73
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(OriginCodeEditor, {
|
|
70
|
-
defaultValue:
|
|
74
|
+
defaultValue: editorValue,
|
|
71
75
|
options: {
|
|
72
76
|
uri: `file:///untitled${(0, external_utils_js_namespaceObject.getSuffixByLanguageId)(languageId)}`,
|
|
73
77
|
languageId,
|
|
@@ -1,14 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __webpack_require__ = {};
|
|
3
|
-
(()=>{
|
|
4
|
-
__webpack_require__.n = (module)=>{
|
|
5
|
-
var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
|
|
6
|
-
__webpack_require__.d(getter, {
|
|
7
|
-
a: getter
|
|
8
|
-
});
|
|
9
|
-
return getter;
|
|
10
|
-
};
|
|
11
|
-
})();
|
|
12
3
|
(()=>{
|
|
13
4
|
__webpack_require__.d = (exports1, definition)=>{
|
|
14
5
|
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
@@ -37,15 +28,10 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
37
28
|
});
|
|
38
29
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
39
30
|
require("react");
|
|
40
|
-
const external_styled_components_namespaceObject = require("styled-components");
|
|
41
|
-
var external_styled_components_default = /*#__PURE__*/ __webpack_require__.n(external_styled_components_namespaceObject);
|
|
42
31
|
const index_js_namespaceObject = require("../code-editor/index.js");
|
|
43
|
-
const UIMini = external_styled_components_default().div`
|
|
44
|
-
.ͼ1 .cm-content {
|
|
45
|
-
}
|
|
46
|
-
`;
|
|
47
32
|
function CodeEditorMini(props) {
|
|
48
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
33
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
34
|
+
className: "gedit-m-code-editor-mini",
|
|
49
35
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(index_js_namespaceObject.CodeEditor, {
|
|
50
36
|
...props,
|
|
51
37
|
options: {
|
|
@@ -35,12 +35,8 @@ const semi_icons_namespaceObject = require("@douyinfe/semi-icons");
|
|
|
35
35
|
const index_js_namespaceObject = require("../variable-selector/index.js");
|
|
36
36
|
const external_dynamic_value_input_index_js_namespaceObject = require("../dynamic-value-input/index.js");
|
|
37
37
|
const external_condition_context_index_js_namespaceObject = require("../condition-context/index.js");
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
ops: {},
|
|
41
|
-
rules: {}
|
|
42
|
-
};
|
|
43
|
-
function ConditionRow({ style, value, onChange, readonly, ruleConfig = defaultRuleConfig }) {
|
|
38
|
+
require("./styles.css");
|
|
39
|
+
function ConditionRow({ style, value, onChange, readonly, ruleConfig }) {
|
|
44
40
|
const { left, operator, right } = value || {};
|
|
45
41
|
const available = (0, editor_namespaceObject.useScopeAvailable)();
|
|
46
42
|
const variable = (0, external_react_namespaceObject.useMemo)(()=>{
|
|
@@ -60,7 +56,8 @@ function ConditionRow({ style, value, onChange, readonly, ruleConfig = defaultRu
|
|
|
60
56
|
]);
|
|
61
57
|
const { rule, opConfig, opOptionList, targetSchema } = (0, external_condition_context_index_js_namespaceObject.useCondition)({
|
|
62
58
|
leftSchema,
|
|
63
|
-
operator
|
|
59
|
+
operator,
|
|
60
|
+
ruleConfig
|
|
64
61
|
});
|
|
65
62
|
const renderOpSelect = ()=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(semi_ui_namespaceObject.Select, {
|
|
66
63
|
style: {
|
|
@@ -84,15 +81,19 @@ function ConditionRow({ style, value, onChange, readonly, ruleConfig = defaultRu
|
|
|
84
81
|
})
|
|
85
82
|
})
|
|
86
83
|
});
|
|
87
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(
|
|
84
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
85
|
+
className: "gedit-m-condition-row-container",
|
|
88
86
|
style: style,
|
|
89
87
|
children: [
|
|
90
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
88
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
89
|
+
className: "gedit-m-condition-row-operator",
|
|
91
90
|
children: renderOpSelect()
|
|
92
91
|
}),
|
|
93
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(
|
|
92
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
93
|
+
className: "gedit-m-condition-row-values",
|
|
94
94
|
children: [
|
|
95
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
95
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
96
|
+
className: "gedit-m-condition-row-left",
|
|
96
97
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(index_js_namespaceObject.InjectVariableSelector, {
|
|
97
98
|
readonly: readonly,
|
|
98
99
|
style: {
|
|
@@ -108,7 +109,8 @@ function ConditionRow({ style, value, onChange, readonly, ruleConfig = defaultRu
|
|
|
108
109
|
})
|
|
109
110
|
})
|
|
110
111
|
}),
|
|
111
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
112
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
113
|
+
className: "gedit-m-condition-row-right",
|
|
112
114
|
children: targetSchema ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_dynamic_value_input_index_js_namespaceObject.InjectDynamicValueInput, {
|
|
113
115
|
readonly: readonly || !rule,
|
|
114
116
|
value: right,
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
.gedit-m-condition-row-container {
|
|
2
|
+
align-items: center;
|
|
3
|
+
gap: 4px;
|
|
4
|
+
display: flex;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.gedit-m-condition-row-left, .gedit-m-condition-row-right {
|
|
8
|
+
width: 100%;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.gedit-m-condition-row-values {
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
flex-grow: 1;
|
|
14
|
+
align-items: center;
|
|
15
|
+
gap: 4px;
|
|
16
|
+
display: flex;
|
|
17
|
+
overflow: hidden;
|
|
18
|
+
}
|
|
19
|
+
|
|
@@ -35,7 +35,7 @@ const semi_ui_namespaceObject = require("@douyinfe/semi-ui");
|
|
|
35
35
|
const semi_icons_namespaceObject = require("@douyinfe/semi-icons");
|
|
36
36
|
const view_namespaceObject = require("@codemirror/view");
|
|
37
37
|
const index_js_namespaceObject = require("../../../shared/index.js");
|
|
38
|
-
|
|
38
|
+
require("../styles.css");
|
|
39
39
|
class VariableTagWidget extends view_namespaceObject.WidgetType {
|
|
40
40
|
constructor({ keyPath, scope }){
|
|
41
41
|
super(), this.toDispose = new editor_namespaceObject.DisposableCollection(), this.renderIcon = (icon)=>{
|
|
@@ -53,32 +53,50 @@ class VariableTagWidget extends view_namespaceObject.WidgetType {
|
|
|
53
53
|
this.scope = scope;
|
|
54
54
|
}
|
|
55
55
|
renderVariable(v) {
|
|
56
|
-
if (!v) return void this.root.render(/*#__PURE__*/ (0, jsx_runtime_namespaceObject.
|
|
57
|
-
|
|
56
|
+
if (!v) return void this.root.render(/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(semi_ui_namespaceObject.Tag, {
|
|
57
|
+
className: "gedit-m-coze-editor-tag",
|
|
58
58
|
color: "amber",
|
|
59
|
-
children:
|
|
59
|
+
children: [
|
|
60
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(semi_icons_namespaceObject.IconIssueStroked, {
|
|
61
|
+
style: {
|
|
62
|
+
marginRight: '4px'
|
|
63
|
+
}
|
|
64
|
+
}),
|
|
65
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
66
|
+
children: "Unknown"
|
|
67
|
+
})
|
|
68
|
+
]
|
|
60
69
|
}));
|
|
61
70
|
const rootField = (0, external_lodash_es_namespaceObject.last)(v.parentFields) || v;
|
|
62
71
|
const isRoot = v === rootField;
|
|
63
|
-
const rootTitle = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
72
|
+
const rootTitle = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
73
|
+
className: "gedit-m-coze-editor-root-title",
|
|
64
74
|
children: rootField.meta?.title ? `${rootField.meta.title} ${isRoot ? '' : '-'} ` : ''
|
|
65
75
|
});
|
|
66
76
|
const rootIcon = this.renderIcon(rootField?.meta.icon);
|
|
67
77
|
this.root.render(/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(semi_ui_namespaceObject.Popover, {
|
|
68
|
-
content: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(
|
|
78
|
+
content: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
79
|
+
className: "gedit-m-coze-editor-popover-content",
|
|
69
80
|
children: [
|
|
70
81
|
rootIcon,
|
|
71
82
|
rootTitle,
|
|
72
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
83
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
84
|
+
className: "gedit-m-coze-editor-var-name",
|
|
73
85
|
children: v?.keyPath.slice(1).join('.')
|
|
74
86
|
})
|
|
75
87
|
]
|
|
76
88
|
}),
|
|
77
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(
|
|
78
|
-
|
|
89
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(semi_ui_namespaceObject.Tag, {
|
|
90
|
+
className: "gedit-m-coze-editor-tag",
|
|
91
|
+
style: {
|
|
92
|
+
display: 'inline-flex',
|
|
93
|
+
alignItems: 'center'
|
|
94
|
+
},
|
|
79
95
|
children: [
|
|
96
|
+
rootIcon,
|
|
80
97
|
rootTitle,
|
|
81
|
-
!isRoot && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
98
|
+
!isRoot && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
99
|
+
className: "gedit-m-coze-editor-var-name",
|
|
82
100
|
children: v?.key
|
|
83
101
|
})
|
|
84
102
|
]
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
import { Tag } from "@douyinfe/semi-ui";
|
|
3
|
-
const UIRootTitle = styled_components.div`
|
|
4
|
-
margin-right: 4px;
|
|
5
|
-
min-width: 20px;
|
|
6
|
-
overflow: hidden;
|
|
1
|
+
.gedit-m-coze-editor-root-title {
|
|
7
2
|
text-overflow: ellipsis;
|
|
8
3
|
white-space: nowrap;
|
|
4
|
+
min-width: 20px;
|
|
9
5
|
color: var(--semi-color-text-2);
|
|
10
|
-
|
|
11
|
-
const UIVarName = styled_components.div`
|
|
6
|
+
margin-right: 4px;
|
|
12
7
|
overflow: hidden;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.gedit-m-coze-editor-var-name {
|
|
13
11
|
text-overflow: ellipsis;
|
|
14
12
|
white-space: nowrap;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
overflow: hidden;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.gedit-m-coze-editor-tag {
|
|
19
17
|
justify-content: flex-start;
|
|
18
|
+
align-items: center;
|
|
20
19
|
max-width: 300px;
|
|
20
|
+
display: inline-flex;
|
|
21
21
|
|
|
22
22
|
& .semi-tag-content-center {
|
|
23
23
|
justify-content: flex-start;
|
|
@@ -26,11 +26,12 @@ const UITag = styled_components(Tag)`
|
|
|
26
26
|
&.semi-tag {
|
|
27
27
|
margin: 0 5px;
|
|
28
28
|
}
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.gedit-m-coze-editor-popover-content {
|
|
32
|
+
justify-content: flex-start;
|
|
33
|
+
align-items: center;
|
|
31
34
|
padding: 10px;
|
|
32
35
|
display: inline-flex;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
`;
|
|
36
|
-
export { UIPopoverContent, UIRootTitle, UITag, UIVarName };
|
|
36
|
+
}
|
|
37
|
+
|
|
@@ -34,12 +34,8 @@ const semi_icons_namespaceObject = require("@douyinfe/semi-icons");
|
|
|
34
34
|
const index_js_namespaceObject = require("../../plugins/index.js");
|
|
35
35
|
const external_dynamic_value_input_index_js_namespaceObject = require("../dynamic-value-input/index.js");
|
|
36
36
|
const external_condition_context_index_js_namespaceObject = require("../condition-context/index.js");
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
ops: {},
|
|
40
|
-
rules: {}
|
|
41
|
-
};
|
|
42
|
-
function DBConditionRow({ style, value, onChange, readonly, options, ruleConfig = defaultRuleConfig }) {
|
|
37
|
+
require("./styles.css");
|
|
38
|
+
function DBConditionRow({ style, value, onChange, readonly, options, ruleConfig }) {
|
|
43
39
|
const { left, operator, right } = value || {};
|
|
44
40
|
const typeManager = (0, index_js_namespaceObject.useTypeManager)();
|
|
45
41
|
const leftSchema = (0, external_react_namespaceObject.useMemo)(()=>options?.find((item)=>item.value === left)?.schema, [
|
|
@@ -51,7 +47,8 @@ function DBConditionRow({ style, value, onChange, readonly, options, ruleConfig
|
|
|
51
47
|
operator,
|
|
52
48
|
ruleConfig
|
|
53
49
|
});
|
|
54
|
-
const renderDBOptionSelect = ()=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
50
|
+
const renderDBOptionSelect = ()=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(semi_ui_namespaceObject.Select, {
|
|
51
|
+
className: "gedit-m-db-condition-row-select",
|
|
55
52
|
disabled: readonly,
|
|
56
53
|
size: "small",
|
|
57
54
|
style: {
|
|
@@ -63,7 +60,8 @@ function DBConditionRow({ style, value, onChange, readonly, options, ruleConfig
|
|
|
63
60
|
left: v
|
|
64
61
|
}),
|
|
65
62
|
optionList: options?.map((item)=>({
|
|
66
|
-
label: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(
|
|
63
|
+
label: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
64
|
+
className: "gedit-m-db-condition-row-option-label",
|
|
67
65
|
children: [
|
|
68
66
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(semi_ui_namespaceObject.Icon, {
|
|
69
67
|
size: "small",
|
|
@@ -97,18 +95,23 @@ function DBConditionRow({ style, value, onChange, readonly, options, ruleConfig
|
|
|
97
95
|
})
|
|
98
96
|
})
|
|
99
97
|
});
|
|
100
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(
|
|
98
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
99
|
+
className: "gedit-m-db-condition-row-container",
|
|
101
100
|
style: style,
|
|
102
101
|
children: [
|
|
103
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
102
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
103
|
+
className: "gedit-m-db-condition-row-operator",
|
|
104
104
|
children: renderOpSelect()
|
|
105
105
|
}),
|
|
106
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(
|
|
106
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
107
|
+
className: "gedit-m-db-condition-row-values",
|
|
107
108
|
children: [
|
|
108
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
109
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
110
|
+
className: "gedit-m-db-condition-row-left",
|
|
109
111
|
children: renderDBOptionSelect()
|
|
110
112
|
}),
|
|
111
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
113
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
114
|
+
className: "gedit-m-db-condition-row-right",
|
|
112
115
|
children: targetSchema ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_dynamic_value_input_index_js_namespaceObject.InjectDynamicValueInput, {
|
|
113
116
|
readonly: readonly || !rule,
|
|
114
117
|
value: right,
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
.gedit-m-db-condition-row-container {
|
|
2
|
+
align-items: center;
|
|
3
|
+
gap: 4px;
|
|
4
|
+
display: flex;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.gedit-m-db-condition-row-left, .gedit-m-db-condition-row-right {
|
|
8
|
+
width: 100%;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.gedit-m-db-condition-row-values {
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
flex-grow: 1;
|
|
14
|
+
align-items: center;
|
|
15
|
+
gap: 4px;
|
|
16
|
+
display: flex;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.gedit-m-db-condition-row-option-label {
|
|
20
|
+
align-items: center;
|
|
21
|
+
gap: 10px;
|
|
22
|
+
display: flex;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.gedit-m-db-condition-row-select {
|
|
26
|
+
& .semi-select-selection {
|
|
27
|
+
margin-left: 5px;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
@@ -33,11 +33,12 @@ const external_lodash_es_namespaceObject = require("lodash-es");
|
|
|
33
33
|
const editor_namespaceObject = require("@flowgram.ai/editor");
|
|
34
34
|
const index_js_namespaceObject = require("../../shared/index.js");
|
|
35
35
|
const external_display_flow_value_index_js_namespaceObject = require("../display-flow-value/index.js");
|
|
36
|
-
|
|
36
|
+
require("./styles.css");
|
|
37
37
|
const external_display_schema_tag_index_js_namespaceObject = require("../display-schema-tag/index.js");
|
|
38
38
|
function DisplayInputsValues({ value, showIconInTree }) {
|
|
39
39
|
const childEntries = Object.entries(value || {});
|
|
40
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
40
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
41
|
+
className: "gedit-m-display-inputs-wrapper",
|
|
41
42
|
children: childEntries.map(([key, value])=>{
|
|
42
43
|
if (index_js_namespaceObject.FlowValueUtils.isFlowValue(value)) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_display_flow_value_index_js_namespaceObject.DisplayFlowValue, {
|
|
43
44
|
title: key,
|
|
@@ -31,7 +31,7 @@ const external_react_namespaceObject = require("react");
|
|
|
31
31
|
const json_schema_namespaceObject = require("@flowgram.ai/json-schema");
|
|
32
32
|
const editor_namespaceObject = require("@flowgram.ai/editor");
|
|
33
33
|
const index_js_namespaceObject = require("../display-schema-tag/index.js");
|
|
34
|
-
|
|
34
|
+
require("./styles.css");
|
|
35
35
|
function DisplayOutputs({ value, showIconInTree, displayFromScope }) {
|
|
36
36
|
const scope = (0, editor_namespaceObject.useCurrentScope)();
|
|
37
37
|
const refresh = (0, editor_namespaceObject.useRefresh)();
|
|
@@ -54,7 +54,8 @@ function DisplayOutputs({ value, showIconInTree, displayFromScope }) {
|
|
|
54
54
|
return acm;
|
|
55
55
|
}, {}) : value?.properties || {};
|
|
56
56
|
const childEntries = Object.entries(properties || {});
|
|
57
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
57
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
58
|
+
className: "gedit-m-display-outputs-wrapper",
|
|
58
59
|
children: childEntries.map(([key, schema])=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(index_js_namespaceObject.DisplaySchemaTag, {
|
|
59
60
|
title: key,
|
|
60
61
|
value: schema,
|
|
@@ -41,27 +41,30 @@ var external_react_default = /*#__PURE__*/ __webpack_require__.n(external_react_
|
|
|
41
41
|
const semi_ui_namespaceObject = require("@douyinfe/semi-ui");
|
|
42
42
|
const index_js_namespaceObject = require("../../plugins/index.js");
|
|
43
43
|
const external_display_schema_tree_index_js_namespaceObject = require("../display-schema-tree/index.js");
|
|
44
|
-
|
|
44
|
+
require("./styles.css");
|
|
45
45
|
function DisplaySchemaTag({ value = {}, showIconInTree, title, warning }) {
|
|
46
46
|
const typeManager = (0, index_js_namespaceObject.useTypeManager)();
|
|
47
47
|
const icon = typeManager?.getDisplayIcon(value) || typeManager.getDisplayIcon({
|
|
48
48
|
type: 'unknown'
|
|
49
49
|
});
|
|
50
50
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(semi_ui_namespaceObject.Popover, {
|
|
51
|
-
content: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
51
|
+
content: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
52
|
+
className: "gedit-m-display-schema-tag-popover-content",
|
|
52
53
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_display_schema_tree_index_js_namespaceObject.DisplaySchemaTree, {
|
|
53
54
|
value: value,
|
|
54
55
|
typeManager: typeManager,
|
|
55
56
|
showIcon: showIconInTree
|
|
56
57
|
})
|
|
57
58
|
}),
|
|
58
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(
|
|
59
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(semi_ui_namespaceObject.Tag, {
|
|
59
60
|
color: warning ? 'amber' : 'white',
|
|
61
|
+
className: "gedit-m-display-schema-tag-tag",
|
|
60
62
|
children: [
|
|
61
63
|
icon && /*#__PURE__*/ external_react_default().cloneElement(icon, {
|
|
62
64
|
className: 'tag-icon'
|
|
63
65
|
}),
|
|
64
|
-
title && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
66
|
+
title && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
67
|
+
className: "gedit-m-display-schema-tag-title",
|
|
65
68
|
children: title
|
|
66
69
|
})
|
|
67
70
|
]
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
.gedit-m-display-schema-tag-popover-content {
|
|
2
|
+
padding: 10px;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.gedit-m-display-schema-tag-tag {
|
|
6
|
+
padding: 4px;
|
|
7
|
+
|
|
8
|
+
& .tag-icon {
|
|
9
|
+
width: 12px;
|
|
10
|
+
height: 12px;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.gedit-m-display-schema-tag-title {
|
|
15
|
+
text-overflow: ellipsis;
|
|
16
|
+
margin-top: -1px;
|
|
17
|
+
margin-left: 4px;
|
|
18
|
+
display: inline-block;
|
|
19
|
+
overflow: hidden;
|
|
20
|
+
}
|
|
21
|
+
|
|
@@ -39,7 +39,7 @@ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
|
39
39
|
const external_react_namespaceObject = require("react");
|
|
40
40
|
var external_react_default = /*#__PURE__*/ __webpack_require__.n(external_react_namespaceObject);
|
|
41
41
|
const json_schema_namespaceObject = require("@flowgram.ai/json-schema");
|
|
42
|
-
|
|
42
|
+
require("./styles.css");
|
|
43
43
|
function DisplaySchemaTree(props) {
|
|
44
44
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(SchemaTree, {
|
|
45
45
|
...props
|
|
@@ -53,16 +53,20 @@ function SchemaTree(props) {
|
|
|
53
53
|
const icon = typeManager?.getDisplayIcon(schema);
|
|
54
54
|
let properties = drilldown && config ? config.getTypeSchemaProperties(schema) : {};
|
|
55
55
|
const childEntries = Object.entries(properties || {});
|
|
56
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(
|
|
57
|
-
|
|
56
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
57
|
+
className: `gedit-m-display-schema-tree-item depth-${depth}`,
|
|
58
58
|
children: [
|
|
59
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(
|
|
59
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
60
|
+
className: "gedit-m-display-schema-tree-row",
|
|
60
61
|
children: [
|
|
61
|
-
0 !== depth && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
62
|
+
0 !== depth && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
63
|
+
className: "gedit-m-display-schema-tree-horizontal-line"
|
|
64
|
+
}),
|
|
62
65
|
showIcon && icon && /*#__PURE__*/ external_react_default().cloneElement(icon, {
|
|
63
66
|
className: 'tree-icon'
|
|
64
67
|
}),
|
|
65
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
68
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
69
|
+
className: "gedit-m-display-schema-tree-title",
|
|
66
70
|
children: parentKey ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment, {
|
|
67
71
|
children: [
|
|
68
72
|
`${parentKey} (`,
|
|
@@ -73,7 +77,8 @@ function SchemaTree(props) {
|
|
|
73
77
|
})
|
|
74
78
|
]
|
|
75
79
|
}),
|
|
76
|
-
childEntries?.length ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
80
|
+
childEntries?.length ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
81
|
+
className: "gedit-m-display-schema-tree-level",
|
|
77
82
|
children: childEntries.map(([key, value])=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(SchemaTree, {
|
|
78
83
|
...props,
|
|
79
84
|
parentKey: key,
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
.gedit-m-display-schema-tree-row {
|
|
2
|
+
align-items: center;
|
|
3
|
+
display: flex;
|
|
4
|
+
|
|
5
|
+
& .tree-icon {
|
|
6
|
+
width: 14px;
|
|
7
|
+
height: 14px;
|
|
8
|
+
margin-right: 8px;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
white-space: nowrap;
|
|
12
|
+
height: 27px;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.gedit-m-display-schema-tree-horizontal-line {
|
|
16
|
+
position: relative;
|
|
17
|
+
|
|
18
|
+
&:before, &:after {
|
|
19
|
+
content: "";
|
|
20
|
+
background-color: var(--semi-color-text-3);
|
|
21
|
+
position: absolute;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&:after {
|
|
25
|
+
width: 15px;
|
|
26
|
+
height: 1px;
|
|
27
|
+
top: 0;
|
|
28
|
+
right: 6px;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.gedit-m-display-schema-tree-level {
|
|
33
|
+
padding-left: 30px;
|
|
34
|
+
position: relative;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.gedit-m-display-schema-tree-item {
|
|
38
|
+
position: relative;
|
|
39
|
+
|
|
40
|
+
&:before {
|
|
41
|
+
content: "";
|
|
42
|
+
background-color: var(--semi-color-text-3);
|
|
43
|
+
position: absolute;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&:not(:last-child):before {
|
|
47
|
+
width: 1px;
|
|
48
|
+
top: 0;
|
|
49
|
+
bottom: 0;
|
|
50
|
+
left: -22px;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&:last-child:before {
|
|
54
|
+
width: 1px;
|
|
55
|
+
height: 14px;
|
|
56
|
+
top: 0;
|
|
57
|
+
left: -22px;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&.depth-0:before {
|
|
61
|
+
width: 0 !important;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|