@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
|
@@ -36,7 +36,7 @@ const index_js_namespaceObject = require("../../shared/index.js");
|
|
|
36
36
|
const external_variable_selector_index_js_namespaceObject = require("../variable-selector/index.js");
|
|
37
37
|
const external_type_selector_index_js_namespaceObject = require("../type-selector/index.js");
|
|
38
38
|
const external_constant_input_index_js_namespaceObject = require("../constant-input/index.js");
|
|
39
|
-
|
|
39
|
+
require("./styles.css");
|
|
40
40
|
const external_hooks_js_namespaceObject = require("./hooks.js");
|
|
41
41
|
const DEFAULT_VALUE = {
|
|
42
42
|
type: 'constant',
|
|
@@ -146,16 +146,20 @@ function DynamicValueInput({ value, onChange, readonly, style, schema: schemaFro
|
|
|
146
146
|
})
|
|
147
147
|
})
|
|
148
148
|
});
|
|
149
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(
|
|
149
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
150
|
+
className: "gedit-m-dynamic-value-input-container",
|
|
150
151
|
style: style,
|
|
151
152
|
children: [
|
|
152
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
153
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
154
|
+
className: "gedit-m-dynamic-value-input-type",
|
|
153
155
|
children: renderTypeSelector()
|
|
154
156
|
}),
|
|
155
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
157
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
158
|
+
className: "gedit-m-dynamic-value-input-main",
|
|
156
159
|
children: renderMain()
|
|
157
160
|
}),
|
|
158
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
161
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
162
|
+
className: "gedit-m-dynamic-value-input-trigger",
|
|
159
163
|
children: renderTrigger()
|
|
160
164
|
})
|
|
161
165
|
]
|
|
@@ -1,55 +1,48 @@
|
|
|
1
|
-
|
|
2
|
-
const UIContainer = styled_components.div`
|
|
3
|
-
display: flex;
|
|
4
|
-
align-items: center;
|
|
5
|
-
border-radius: 4px;
|
|
1
|
+
.gedit-m-dynamic-value-input-container {
|
|
6
2
|
border: 1px solid var(--semi-color-border);
|
|
3
|
+
background-color: var(--semi-color-fill-0);
|
|
4
|
+
border-radius: 4px;
|
|
5
|
+
align-items: center;
|
|
7
6
|
line-height: normal;
|
|
8
|
-
|
|
7
|
+
display: flex;
|
|
9
8
|
overflow: hidden;
|
|
9
|
+
}
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
`;
|
|
13
|
-
const UIMain = styled_components.div`
|
|
14
|
-
flex-grow: 1;
|
|
15
|
-
overflow: hidden;
|
|
16
|
-
min-width: 0;
|
|
11
|
+
.gedit-m-dynamic-value-input-main {
|
|
17
12
|
border-left: 1px solid var(--semi-color-border);
|
|
18
13
|
border-right: 1px solid var(--semi-color-border);
|
|
14
|
+
flex-grow: 1;
|
|
15
|
+
min-width: 0;
|
|
16
|
+
overflow: hidden;
|
|
19
17
|
|
|
20
|
-
& .semi-tree-select,
|
|
21
|
-
& .semi-input-number,
|
|
22
|
-
& .semi-select {
|
|
23
|
-
width: 100%;
|
|
24
|
-
border: none;
|
|
25
|
-
border-radius: 0;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
& .semi-input-wrapper {
|
|
18
|
+
& .semi-tree-select, & .semi-input-number, & .semi-select {
|
|
29
19
|
border: none;
|
|
30
20
|
border-radius: 0;
|
|
21
|
+
width: 100%;
|
|
31
22
|
}
|
|
32
23
|
|
|
33
|
-
& .semi-input-textarea-wrapper {
|
|
24
|
+
& .semi-input-wrapper, & .semi-input-textarea-wrapper {
|
|
34
25
|
border: none;
|
|
35
26
|
border-radius: 0;
|
|
36
27
|
}
|
|
37
28
|
|
|
38
29
|
& .semi-input-textarea {
|
|
39
|
-
|
|
30
|
+
word-break: break-all;
|
|
40
31
|
border: none;
|
|
41
32
|
border-radius: 0;
|
|
42
|
-
|
|
33
|
+
padding: 2px 6px;
|
|
43
34
|
}
|
|
44
|
-
|
|
45
|
-
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.gedit-m-dynamic-value-input-type {
|
|
46
38
|
& .semi-button {
|
|
47
39
|
border-radius: 0;
|
|
48
40
|
}
|
|
49
|
-
|
|
50
|
-
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.gedit-m-dynamic-value-input-trigger {
|
|
51
44
|
& .semi-button {
|
|
52
45
|
border-radius: 0;
|
|
53
46
|
}
|
|
54
|
-
|
|
55
|
-
|
|
47
|
+
}
|
|
48
|
+
|
|
@@ -34,7 +34,7 @@ const semi_icons_namespaceObject = require("@douyinfe/semi-icons");
|
|
|
34
34
|
const index_js_namespaceObject = require("../../hooks/index.js");
|
|
35
35
|
const external_dynamic_value_input_index_js_namespaceObject = require("../dynamic-value-input/index.js");
|
|
36
36
|
const external_blur_input_index_js_namespaceObject = require("../blur-input/index.js");
|
|
37
|
-
|
|
37
|
+
require("./styles.css");
|
|
38
38
|
function InputsValues({ value, onChange, style, readonly, constantProps, schema, hasError }) {
|
|
39
39
|
const { list, updateKey, updateValue, remove, add } = (0, index_js_namespaceObject.useObjectList)({
|
|
40
40
|
value,
|
|
@@ -43,9 +43,11 @@ function InputsValues({ value, onChange, style, readonly, constantProps, schema,
|
|
|
43
43
|
});
|
|
44
44
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
45
45
|
children: [
|
|
46
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
46
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
47
|
+
className: "gedit-m-inputs-values-rows",
|
|
47
48
|
style: style,
|
|
48
|
-
children: list.map((item)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(
|
|
49
|
+
children: list.map((item)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
50
|
+
className: "gedit-m-inputs-values-row",
|
|
49
51
|
children: [
|
|
50
52
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_blur_input_index_js_namespaceObject.BlurInput, {
|
|
51
53
|
style: {
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
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
|
+
(()=>{
|
|
13
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
14
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: definition[key]
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
})();
|
|
20
|
+
(()=>{
|
|
21
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
22
|
+
})();
|
|
23
|
+
(()=>{
|
|
24
|
+
__webpack_require__.r = (exports1)=>{
|
|
25
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
26
|
+
value: 'Module'
|
|
27
|
+
});
|
|
28
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
29
|
+
value: true
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
})();
|
|
33
|
+
var __webpack_exports__ = {};
|
|
34
|
+
__webpack_require__.r(__webpack_exports__);
|
|
35
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
36
|
+
IconAddChildren: ()=>IconAddChildren
|
|
37
|
+
});
|
|
38
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
39
|
+
require("react");
|
|
40
|
+
const semi_icons_namespaceObject = require("@douyinfe/semi-icons");
|
|
41
|
+
var semi_icons_default = /*#__PURE__*/ __webpack_require__.n(semi_icons_namespaceObject);
|
|
42
|
+
const iconAddChildrenSvg = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("svg", {
|
|
43
|
+
className: "icon-icon icon-icon-coz_add_node ",
|
|
44
|
+
width: "1em",
|
|
45
|
+
height: "1em",
|
|
46
|
+
viewBox: "0 0 24 24",
|
|
47
|
+
fill: "currentColor",
|
|
48
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
49
|
+
children: [
|
|
50
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("path", {
|
|
51
|
+
fillRule: "evenodd",
|
|
52
|
+
clipRule: "evenodd",
|
|
53
|
+
d: "M11 6.49988C11 8.64148 9.50397 10.4337 7.49995 10.8884V15.4998C7.49995 16.0521 7.94767 16.4998 8.49995 16.4998H11.208C11.0742 16.8061 11 17.1443 11 17.4998C11 17.8554 11.0742 18.1936 11.208 18.4998H8.49995C6.8431 18.4998 5.49995 17.1567 5.49995 15.4998V10.8884C3.49599 10.4336 2 8.64145 2 6.49988C2 4.0146 4.01472 1.99988 6.5 1.99988C8.98528 1.99988 11 4.0146 11 6.49988ZM6.5 8.99988C7.88071 8.99988 9 7.88059 9 6.49988C9 5.11917 7.88071 3.99988 6.5 3.99988C5.11929 3.99988 4 5.11917 4 6.49988C4 7.88059 5.11929 8.99988 6.5 8.99988Z"
|
|
54
|
+
}),
|
|
55
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("path", {
|
|
56
|
+
d: "M17.5 12.4999C18.0523 12.4999 18.5 12.9476 18.5 13.4999V16.4999H21.5C22.0523 16.4999 22.5 16.9476 22.5 17.4999C22.5 18.0522 22.0523 18.4999 21.5 18.4999H18.5V21.4999C18.5 22.0522 18.0523 22.4999 17.5 22.4999C16.9477 22.4999 16.5 22.0522 16.5 21.4999V18.4999H13.5C12.9477 18.4999 12.5 18.0522 12.5 17.4999C12.5 16.9476 12.9477 16.4999 13.5 16.4999H16.5V13.4999C16.5 12.9476 16.9477 12.4999 17.5 12.4999Z"
|
|
57
|
+
})
|
|
58
|
+
]
|
|
59
|
+
});
|
|
60
|
+
const IconAddChildren = ()=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(semi_icons_default(), {
|
|
61
|
+
size: "small",
|
|
62
|
+
svg: iconAddChildrenSvg
|
|
63
|
+
});
|
|
64
|
+
exports.IconAddChildren = __webpack_exports__.IconAddChildren;
|
|
65
|
+
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
66
|
+
"IconAddChildren"
|
|
67
|
+
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
68
|
+
Object.defineProperty(exports, '__esModule', {
|
|
69
|
+
value: true
|
|
70
|
+
});
|
|
@@ -33,7 +33,7 @@ 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("../../shared/index.js");
|
|
35
35
|
const external_hooks_index_js_namespaceObject = require("../../hooks/index.js");
|
|
36
|
-
|
|
36
|
+
require("./styles.css");
|
|
37
37
|
const external_row_js_namespaceObject = require("./row.js");
|
|
38
38
|
function InputsValuesTree(props) {
|
|
39
39
|
const { value, onChange, readonly, hasError, constantProps } = props;
|
|
@@ -44,7 +44,8 @@ function InputsValuesTree(props) {
|
|
|
44
44
|
});
|
|
45
45
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
46
46
|
children: [
|
|
47
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
47
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
48
|
+
className: "gedit-m-inputs-values-tree-tree-items",
|
|
48
49
|
children: list.map((item)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_row_js_namespaceObject.InputValueRow, {
|
|
49
50
|
keyName: item.key,
|
|
50
51
|
value: item.value,
|
|
@@ -31,10 +31,11 @@ const external_react_namespaceObject = require("react");
|
|
|
31
31
|
const editor_namespaceObject = require("@flowgram.ai/editor");
|
|
32
32
|
const semi_ui_namespaceObject = require("@douyinfe/semi-ui");
|
|
33
33
|
const semi_icons_namespaceObject = require("@douyinfe/semi-icons");
|
|
34
|
-
|
|
34
|
+
require("./styles.css");
|
|
35
35
|
const use_child_list_js_namespaceObject = require("./hooks/use-child-list.js");
|
|
36
36
|
const index_js_namespaceObject = require("../dynamic-value-input/index.js");
|
|
37
37
|
const external_blur_input_index_js_namespaceObject = require("../blur-input/index.js");
|
|
38
|
+
const external_icon_js_namespaceObject = require("./icon.js");
|
|
38
39
|
const AddObjectChildStrategy = {
|
|
39
40
|
hit: (schema)=>'object' === schema.type,
|
|
40
41
|
Renderer: ()=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(semi_ui_namespaceObject.Input, {
|
|
@@ -70,11 +71,10 @@ function InputValueRow(props) {
|
|
|
70
71
|
]);
|
|
71
72
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment, {
|
|
72
73
|
children: [
|
|
73
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
74
|
-
$isLast: $
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
children: hasChildren && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_styles_js_namespaceObject.UICollapseTrigger, {
|
|
74
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
75
|
+
className: `gedit-m-inputs-values-tree-tree-item-left ${$level > 0 ? 'show-line' : ''} ${$isLast ? 'is-last' : ''} ${hasChildren ? 'show-collapse' : ''}`,
|
|
76
|
+
children: hasChildren && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
77
|
+
className: "gedit-m-inputs-values-tree-collapse-trigger",
|
|
78
78
|
onClick: ()=>setCollapse((_collapse)=>!_collapse),
|
|
79
79
|
children: collapse ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(semi_icons_namespaceObject.IconChevronDown, {
|
|
80
80
|
size: "small"
|
|
@@ -83,10 +83,13 @@ function InputValueRow(props) {
|
|
|
83
83
|
})
|
|
84
84
|
})
|
|
85
85
|
}),
|
|
86
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(
|
|
86
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
87
|
+
className: "gedit-m-inputs-values-tree-tree-item-right",
|
|
87
88
|
children: [
|
|
88
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
89
|
-
|
|
89
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
90
|
+
className: "gedit-m-inputs-values-tree-tree-item-main",
|
|
91
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
92
|
+
className: "gedit-m-inputs-values-tree-row",
|
|
90
93
|
children: [
|
|
91
94
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_blur_input_index_js_namespaceObject.BlurInput, {
|
|
92
95
|
style: {
|
|
@@ -113,13 +116,14 @@ function InputValueRow(props) {
|
|
|
113
116
|
strategies
|
|
114
117
|
}
|
|
115
118
|
}),
|
|
116
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(
|
|
119
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
120
|
+
className: "gedit-m-inputs-values-tree-actions",
|
|
117
121
|
children: [
|
|
118
122
|
canAddField && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(semi_ui_namespaceObject.IconButton, {
|
|
119
123
|
disabled: readonly,
|
|
120
124
|
size: "small",
|
|
121
125
|
theme: "borderless",
|
|
122
|
-
icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
126
|
+
icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_icon_js_namespaceObject.IconAddChildren, {}),
|
|
123
127
|
onClick: ()=>{
|
|
124
128
|
add({
|
|
125
129
|
type: 'constant',
|
|
@@ -145,10 +149,10 @@ function InputValueRow(props) {
|
|
|
145
149
|
]
|
|
146
150
|
})
|
|
147
151
|
}),
|
|
148
|
-
hasChildren && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
149
|
-
$collapse:
|
|
150
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
151
|
-
|
|
152
|
+
hasChildren && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
153
|
+
className: `gedit-m-inputs-values-tree-collapsible ${collapse ? 'collapse' : ''}`,
|
|
154
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
155
|
+
className: "gedit-m-inputs-values-tree-tree-items shrink",
|
|
152
156
|
children: list.map((_item, index)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(InputValueRow, {
|
|
153
157
|
readonly: readonly,
|
|
154
158
|
hasError: hasError,
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
.gedit-m-inputs-values-tree-row {
|
|
2
|
+
align-items: flex-start;
|
|
3
|
+
gap: 5px;
|
|
4
|
+
display: flex;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.gedit-m-inputs-values-tree-collapse-trigger {
|
|
8
|
+
cursor: pointer;
|
|
9
|
+
margin-right: 5px;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.gedit-m-inputs-values-tree-tree-items {
|
|
13
|
+
grid-template-columns: auto 1fr;
|
|
14
|
+
display: grid;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.gedit-m-inputs-values-tree-tree-items.shrink {
|
|
18
|
+
margin-top: 10px;
|
|
19
|
+
padding-left: 3px;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.gedit-m-inputs-values-tree-tree-item-left {
|
|
23
|
+
grid-column: 1;
|
|
24
|
+
width: 16px;
|
|
25
|
+
position: relative;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.gedit-m-inputs-values-tree-tree-item-left.show-line:before {
|
|
29
|
+
content: "";
|
|
30
|
+
height: var(--line-height, 100%);
|
|
31
|
+
background: #d9d9d9;
|
|
32
|
+
width: 1px;
|
|
33
|
+
display: block;
|
|
34
|
+
position: absolute;
|
|
35
|
+
top: -16px;
|
|
36
|
+
left: -14px;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.gedit-m-inputs-values-tree-tree-item-left.show-line:after {
|
|
40
|
+
content: "";
|
|
41
|
+
width: var(--line-width, 30px);
|
|
42
|
+
background: #d9d9d9;
|
|
43
|
+
height: 1px;
|
|
44
|
+
display: block;
|
|
45
|
+
position: absolute;
|
|
46
|
+
top: 8px;
|
|
47
|
+
left: -14px;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.gedit-m-inputs-values-tree-tree-item-left.show-line.is-last:before {
|
|
51
|
+
height: 24px;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.gedit-m-inputs-values-tree-tree-item-left.show-line.show-collapse:after {
|
|
55
|
+
width: 12px;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.gedit-m-inputs-values-tree-tree-item-right {
|
|
59
|
+
grid-column: 2;
|
|
60
|
+
margin-bottom: 10px;
|
|
61
|
+
|
|
62
|
+
&:last-child {
|
|
63
|
+
margin-bottom: 0;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.gedit-m-inputs-values-tree-tree-item-main {
|
|
68
|
+
flex-direction: column;
|
|
69
|
+
gap: 10px;
|
|
70
|
+
display: flex;
|
|
71
|
+
position: relative;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.gedit-m-inputs-values-tree-collapsible {
|
|
75
|
+
display: none;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.gedit-m-inputs-values-tree-collapsible.collapse {
|
|
79
|
+
display: block;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.gedit-m-inputs-values-tree-actions {
|
|
83
|
+
white-space: nowrap;
|
|
84
|
+
}
|
|
85
|
+
|
|
@@ -30,10 +30,10 @@ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
|
30
30
|
require("react");
|
|
31
31
|
const editor_namespaceObject = require("@flowgram.ai/editor");
|
|
32
32
|
const index_js_namespaceObject = require("../constant-input/index.js");
|
|
33
|
-
const external_styles_js_namespaceObject = require("./styles.js");
|
|
34
33
|
function DefaultValue(props) {
|
|
35
34
|
const { value, schema, onChange, placeholder } = props;
|
|
36
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
35
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
36
|
+
className: "gedit-m-json-schema-editor-constant-input-wrapper",
|
|
37
37
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(index_js_namespaceObject.ConstantInput, {
|
|
38
38
|
value: value,
|
|
39
39
|
onChange: (_v)=>onChange(_v),
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
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
|
+
(()=>{
|
|
13
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
14
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: definition[key]
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
})();
|
|
20
|
+
(()=>{
|
|
21
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
22
|
+
})();
|
|
23
|
+
(()=>{
|
|
24
|
+
__webpack_require__.r = (exports1)=>{
|
|
25
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
26
|
+
value: 'Module'
|
|
27
|
+
});
|
|
28
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
29
|
+
value: true
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
})();
|
|
33
|
+
var __webpack_exports__ = {};
|
|
34
|
+
__webpack_require__.r(__webpack_exports__);
|
|
35
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
36
|
+
IconAddChildren: ()=>IconAddChildren
|
|
37
|
+
});
|
|
38
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
39
|
+
require("react");
|
|
40
|
+
const semi_icons_namespaceObject = require("@douyinfe/semi-icons");
|
|
41
|
+
var semi_icons_default = /*#__PURE__*/ __webpack_require__.n(semi_icons_namespaceObject);
|
|
42
|
+
const iconAddChildrenSvg = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("svg", {
|
|
43
|
+
className: "icon-icon icon-icon-coz_add_node ",
|
|
44
|
+
width: "1em",
|
|
45
|
+
height: "1em",
|
|
46
|
+
viewBox: "0 0 24 24",
|
|
47
|
+
fill: "currentColor",
|
|
48
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
49
|
+
children: [
|
|
50
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("path", {
|
|
51
|
+
fillRule: "evenodd",
|
|
52
|
+
clipRule: "evenodd",
|
|
53
|
+
d: "M11 6.49988C11 8.64148 9.50397 10.4337 7.49995 10.8884V15.4998C7.49995 16.0521 7.94767 16.4998 8.49995 16.4998H11.208C11.0742 16.8061 11 17.1443 11 17.4998C11 17.8554 11.0742 18.1936 11.208 18.4998H8.49995C6.8431 18.4998 5.49995 17.1567 5.49995 15.4998V10.8884C3.49599 10.4336 2 8.64145 2 6.49988C2 4.0146 4.01472 1.99988 6.5 1.99988C8.98528 1.99988 11 4.0146 11 6.49988ZM6.5 8.99988C7.88071 8.99988 9 7.88059 9 6.49988C9 5.11917 7.88071 3.99988 6.5 3.99988C5.11929 3.99988 4 5.11917 4 6.49988C4 7.88059 5.11929 8.99988 6.5 8.99988Z"
|
|
54
|
+
}),
|
|
55
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("path", {
|
|
56
|
+
d: "M17.5 12.4999C18.0523 12.4999 18.5 12.9476 18.5 13.4999V16.4999H21.5C22.0523 16.4999 22.5 16.9476 22.5 17.4999C22.5 18.0522 22.0523 18.4999 21.5 18.4999H18.5V21.4999C18.5 22.0522 18.0523 22.4999 17.5 22.4999C16.9477 22.4999 16.5 22.0522 16.5 21.4999V18.4999H13.5C12.9477 18.4999 12.5 18.0522 12.5 17.4999C12.5 16.9476 12.9477 16.4999 13.5 16.4999H16.5V13.4999C16.5 12.9476 16.9477 12.4999 17.5 12.4999Z"
|
|
57
|
+
})
|
|
58
|
+
]
|
|
59
|
+
});
|
|
60
|
+
const IconAddChildren = ()=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(semi_icons_default(), {
|
|
61
|
+
size: "small",
|
|
62
|
+
svg: iconAddChildrenSvg
|
|
63
|
+
});
|
|
64
|
+
exports.IconAddChildren = __webpack_exports__.IconAddChildren;
|
|
65
|
+
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
66
|
+
"IconAddChildren"
|
|
67
|
+
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
68
|
+
Object.defineProperty(exports, '__esModule', {
|
|
69
|
+
value: true
|
|
70
|
+
});
|
|
@@ -33,19 +33,21 @@ 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("../type-selector/index.js");
|
|
35
35
|
const external_blur_input_index_js_namespaceObject = require("../blur-input/index.js");
|
|
36
|
-
const
|
|
36
|
+
const external_icon_js_namespaceObject = require("./icon.js");
|
|
37
37
|
const external_hooks_js_namespaceObject = require("./hooks.js");
|
|
38
38
|
const external_default_value_js_namespaceObject = require("./default-value.js");
|
|
39
|
+
require("./styles.css");
|
|
39
40
|
const DEFAULT = {
|
|
40
41
|
type: 'object'
|
|
41
42
|
};
|
|
42
43
|
function JsonSchemaEditor(props) {
|
|
43
44
|
const { value = DEFAULT, config = {}, onChange: onChangeProps, readonly } = props;
|
|
44
45
|
const { propertyList, onAddProperty, onRemoveProperty, onEditProperty } = (0, external_hooks_js_namespaceObject.usePropertiesEdit)(value, onChangeProps);
|
|
45
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(
|
|
46
|
-
className:
|
|
46
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
47
|
+
className: "gedit-m-json-schema-editor-container",
|
|
47
48
|
children: [
|
|
48
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
49
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
50
|
+
className: "gedit-m-json-schema-editor-tree-items",
|
|
49
51
|
children: propertyList.map((_property)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(PropertyEdit, {
|
|
50
52
|
readonly: readonly,
|
|
51
53
|
value: _property,
|
|
@@ -94,11 +96,10 @@ function PropertyEdit(props) {
|
|
|
94
96
|
const showCollapse = canAddField && propertyList.length > 0;
|
|
95
97
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment, {
|
|
96
98
|
children: [
|
|
97
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
98
|
-
$isLast: $
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
children: showCollapse && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_styles_js_namespaceObject.UICollapseTrigger, {
|
|
99
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
100
|
+
className: `gedit-m-json-schema-editor-tree-item-left ${$level > 0 ? 'show-line' : ''} ${$isLast ? 'is-last' : ''} ${showCollapse ? 'show-collapse' : ''}`,
|
|
101
|
+
children: showCollapse && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
102
|
+
className: "gedit-m-json-schema-editor-collapse-trigger",
|
|
102
103
|
onClick: ()=>setCollapse((_collapse)=>!_collapse),
|
|
103
104
|
children: collapse ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(semi_icons_namespaceObject.IconChevronDown, {
|
|
104
105
|
size: "small"
|
|
@@ -107,13 +108,17 @@ function PropertyEdit(props) {
|
|
|
107
108
|
})
|
|
108
109
|
})
|
|
109
110
|
}),
|
|
110
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(
|
|
111
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
112
|
+
className: "gedit-m-json-schema-editor-tree-item-right",
|
|
111
113
|
children: [
|
|
112
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(
|
|
114
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
115
|
+
className: "gedit-m-json-schema-editor-tree-item-main",
|
|
113
116
|
children: [
|
|
114
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(
|
|
117
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
118
|
+
className: "gedit-m-json-schema-editor-row",
|
|
115
119
|
children: [
|
|
116
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
120
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
121
|
+
className: "gedit-m-json-schema-editor-name",
|
|
117
122
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_blur_input_index_js_namespaceObject.BlurInput, {
|
|
118
123
|
disabled: readonly,
|
|
119
124
|
placeholder: config?.placeholder ?? editor_namespaceObject.I18n.t('Input Variable Name'),
|
|
@@ -122,7 +127,8 @@ function PropertyEdit(props) {
|
|
|
122
127
|
onChange: (value)=>onChange('name', value)
|
|
123
128
|
})
|
|
124
129
|
}),
|
|
125
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
130
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
131
|
+
className: "gedit-m-json-schema-editor-type",
|
|
126
132
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(index_js_namespaceObject.InjectTypeSelector, {
|
|
127
133
|
value: typeSelectorValue,
|
|
128
134
|
readonly: readonly,
|
|
@@ -134,14 +140,16 @@ function PropertyEdit(props) {
|
|
|
134
140
|
}
|
|
135
141
|
})
|
|
136
142
|
}),
|
|
137
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
143
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
144
|
+
className: "gedit-m-json-schema-editor-required",
|
|
138
145
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(semi_ui_namespaceObject.Checkbox, {
|
|
139
146
|
disabled: readonly,
|
|
140
147
|
checked: isPropertyRequired,
|
|
141
148
|
onChange: (e)=>onChange('isPropertyRequired', e.target.checked)
|
|
142
149
|
})
|
|
143
150
|
}),
|
|
144
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(
|
|
151
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
152
|
+
className: "gedit-m-json-schema-editor-actions",
|
|
145
153
|
children: [
|
|
146
154
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(semi_ui_namespaceObject.IconButton, {
|
|
147
155
|
disabled: readonly,
|
|
@@ -160,7 +168,7 @@ function PropertyEdit(props) {
|
|
|
160
168
|
disabled: readonly,
|
|
161
169
|
size: "small",
|
|
162
170
|
theme: "borderless",
|
|
163
|
-
icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
171
|
+
icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_icon_js_namespaceObject.IconAddChildren, {}),
|
|
164
172
|
onClick: ()=>{
|
|
165
173
|
onAddProperty();
|
|
166
174
|
setCollapse(true);
|
|
@@ -179,9 +187,11 @@ function PropertyEdit(props) {
|
|
|
179
187
|
})
|
|
180
188
|
]
|
|
181
189
|
}),
|
|
182
|
-
expand && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(
|
|
190
|
+
expand && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
191
|
+
className: "gedit-m-json-schema-editor-expand-detail",
|
|
183
192
|
children: [
|
|
184
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
193
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
194
|
+
className: "gedit-m-json-schema-editor-label",
|
|
185
195
|
children: config?.descTitle ?? editor_namespaceObject.I18n.t("Description")
|
|
186
196
|
}),
|
|
187
197
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_blur_input_index_js_namespaceObject.BlurInput, {
|
|
@@ -193,13 +203,15 @@ function PropertyEdit(props) {
|
|
|
193
203
|
}),
|
|
194
204
|
0 === $level && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment, {
|
|
195
205
|
children: [
|
|
196
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
206
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
207
|
+
className: "gedit-m-json-schema-editor-label",
|
|
197
208
|
style: {
|
|
198
209
|
marginTop: 10
|
|
199
210
|
},
|
|
200
211
|
children: config?.defaultValueTitle ?? editor_namespaceObject.I18n.t('Default Value')
|
|
201
212
|
}),
|
|
202
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
213
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
214
|
+
className: "gedit-m-json-schema-editor-default-value-wrapper",
|
|
203
215
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_default_value_js_namespaceObject.DefaultValue, {
|
|
204
216
|
value: defaultValue,
|
|
205
217
|
schema: value,
|
|
@@ -213,10 +225,10 @@ function PropertyEdit(props) {
|
|
|
213
225
|
})
|
|
214
226
|
]
|
|
215
227
|
}),
|
|
216
|
-
showCollapse && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
217
|
-
$collapse:
|
|
218
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
219
|
-
|
|
228
|
+
showCollapse && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
229
|
+
className: `gedit-m-json-schema-editor-collapsible ${collapse ? 'collapse' : ''}`,
|
|
230
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
231
|
+
className: "gedit-m-json-schema-editor-tree-items shrink",
|
|
220
232
|
children: propertyList.map((_property, index)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(PropertyEdit, {
|
|
221
233
|
readonly: readonly,
|
|
222
234
|
value: _property,
|